Skip to content

Sensor state

Defines the possible states of a track sensor. Depending on the set type sensors report section occupancy (free/occupied), or event triggers (idle/triggered).

Constants

enum.sensor_state.FREE

Section-based state indicating that no train is present in the monitored track section.

enum.sensor_state.IDLE

Position-based state indicating that the sensor is inactive and waiting to be triggered (e.g., reed switch, IR sensor, or hall sensor).

enum.sensor_state.OCCUPIED

Section-based state indicating that a train occupies the monitored track section.

enum.sensor_state.TRIGGERED

Position-based state indicating that the sensor has been activated by a passing train.

enum.sensor_state.UNKNOWN

Indicates that the current sensor state cannot be determined, possibly due to communication issues or an uninitialized input.

See also