Module baseline

Module baseline 

Source
Expand description

This module provides types and serialisers for each “baseline” packet type defined by the NMRA standard.

https://www.nmra.org/sites/default/files/s-92-2004-07.pdf

Structs§

BroadcastStop
Instruct all decoders to stop, either immediately or by simply removing motor power (“float”). The specification allows a direction field, but that is not implemented here because in situations where a BroadcastStop is being sent it is unlikely that direction settings will be important. (whereas a regular stop might wish to retain headlight states)
Idle
An Idle packet is one in which the address is 0xff and instruction 0x00. Upon receiving this, a decoder performs no new action.
Reset
A Reset packet is one in which the address, instruction, and ECC are all zero. All decoders will, upon receiving this packet, reset to their normal power-up state. Any speed or direction will be cleared and locomotives stopped.
SpeedAndDirection
Speed and Direction packet. Used to command a loco to move in the given direction at the given speed.
SpeedAndDirectionBuilder
Builder used to construct a SpeedAndDirection packet

Enums§

Direction
Possible directions, usually referenced to the “forward” direction of a loco