Skip to main content

Module cmd

Module cmd 

Source
Expand description

Traction Control command and sub-command byte values.

Byte 0 of every command and reply is one of the top-level values; for CONTROLLER_CONFIG and MANAGEMENT, byte 1 is a sub-command.

Constantsยง

CONSIST_CONFIG
Consist (listener) Configuration group. Not decoded by this crate.
CONTROLLER_ASSIGN
Controller Configuration sub-command: Assign Controller.
CONTROLLER_CHANGED
Controller Configuration sub-command: Controller Changing Notify. As a command the train sends it to its current controller when another node asks to take over; as a reply the controller accepts (0) or refuses the handover.
CONTROLLER_CONFIG
Controller Configuration group (assign/release/query controller).
CONTROLLER_QUERY
Controller Configuration sub-command: Query Controller.
CONTROLLER_RELEASE
Controller Configuration sub-command: Release Controller.
EMERGENCY_STOP
Emergency Stop: stop now and stay stopped until a new speed is set.
LISTENER_FLAG
Set on commands forwarded to consist listeners.
MANAGEMENT
Traction Management group (reserve/release/noop).
MGMT_NOOP
Management sub-command: No-op / heartbeat. As a command it is a keep-alive; as a reply it is a heartbeat request with a timeout.
MGMT_RELEASE
Management sub-command: Release a reservation.
MGMT_RESERVE
Management sub-command: Reserve (lock the train for a multi-step operation).
QUERY_FUNCTION
Query Function (24-bit function address).
QUERY_SPEED
Query Speed; the reply carries set, commanded and actual speeds.
SET_FUNCTION
Set Function (24-bit function address, 16-bit value).
SET_SPEED
Set Speed (followed by a 2-byte half-float speed).