class documentation
DCC Speed Command Packet
Speed commands are built for specific DCC addresses and are retained on the packet list for periodic transmission. The speed and direction may be updated and this will rebuild the packet, recalculating the checksum.
| Method | __init__ |
Construct a speed command |
| Method | update |
Update Speed Command |
| Constant | TYPE |
S - Speed Command Packet |
| Instance Variable | _address |
Undocumented |
| Instance Variable | _byte |
Undocumented |
| Instance Variable | _type |
Undocumented |
Inherited from CommandPacket:
| Method | is |
Is Locked |
| Method | set |
Set buffer contents |
| Constant | BASE |
DCC long mobile address range base |
| Constant | MAX |
DCC long address upper limit (inclusive) |
| Constant | MIN |
DCC long address lower limit (inclusive) |
| Instance Variable | NOT |
Return value for command not sent (command being updated) |
| Instance Variable | SENT |
Return value for command serialised |
| Instance Variable | SENT |
Return valued for Program on Main second send |
| Property | address |
Get Address |
| Property | packet |
Get the Packet Buffer |
| Property | type |
Get the command type |
| Instance Variable | _packet |
Undocumented |
Construct a speed command
This constructs a speed command. It calls __init__ in the base class. It sets the type, address, direction and speed. Direction and speed may be updated later.
Note
Parameters not validated here.
| Parameters | |
| address | DCC address of target decoder |
| dir | Direction (1:forward or 0:reverse) |
| speed | Speed |