read_rail_signal
- class ReadRailSignalMixin
(Implicitly inherits
ControlBehaviorMixin
)Allows the Entity to set red, yellow, and green circuit output signals.
- property green_output_signal: dict
The green output signal. Sent when the rail signal’s state is green.
Stored as a
dict
in the format{"name": str, "type": str}
, wherename
is the name of the signal andtype
is it’s type, either"item"
,"fluid"
, or"signal"
.However, because a signal’s type is always constant and can be inferred, it is recommended to simply set the attribute to the string name of the signal which will automatically be converted to the above format.
- Getter:
Gets the green output signal, or
None
if not set.- Setter:
Sets the green output signal. Removes the key if set to
None
.- Type:
- Raises:
InvalidSignalID – If set to a string that is not a valid signal name.
DataFormatError – If set to a dict that does not match the dict format specified above.
- property red_output_signal: dict
The red output signal. Sent when the rail signal’s state is red.
Stored as a
dict
in the format{"name": str, "type": str}
, wherename
is the name of the signal andtype
is it’s type, either"item"
,"fluid"
, or"signal"
.However, because a signal’s type is always constant and can be inferred, it is recommended to simply set the attribute to the string name of the signal which will automatically be converted to the above format.
- Getter:
Gets the red output signal, or
None
if not set.- Setter:
Sets the red output signal. Removes the key if set to
None
.- Type:
- Raises:
InvalidSignalID – If set to a string that is not a valid signal name.
DataFormatError – If set to a dict that does not match the dict format specified above.
- property yellow_output_signal: dict
The yellow output signal. Sent when the rail signal’s state is yellow.
Stored as a
dict
in the format{"name": str, "type": str}
, wherename
is the name of the signal andtype
is it’s type, either"item"
,"fluid"
, or"signal"
.However, because a signal’s type is always constant and can be inferred, it is recommended to simply set the attribute to the string name of the signal which will automatically be converted to the above format.
- Getter:
Gets the yellow output signal, or
None
if not set.- Setter:
Sets the yellow output signal. Removes the key if set to
None
.- Type:
- Raises:
InvalidSignalID – If set to a string that is not a valid signal name.
DataFormatError – If set to a dict that does not match the dict format specified above.