Format: [<MjPri?><MinPri?=2><CANID>]<21><Session>
<Dat1> is the engine session number.
The command station decrements the reference counter for the engine record. If the reference count is 0, the command station removes the engine from the engine list.
Format: <22><Session>
<Dat1> is the engine session number.
The command station responds with PLOC if the NN is assigned. Otherwise responds with ERR: engine not found.
Format: <24><Session>
<Dat1> is the engine session number.
Sent by a cab to notify it is active. If a cab does not send this message within the life time-out period, it is removed from the refresh list.
Probably not needed. Deleted in Ver 6.
Format: <40><AAAAAAAA><AAAAAAAA>
<Dat1> and <Dat2> are [AddrH] and [AddrL] of the decoder, respectively. 7 bit addresses have (AddrH=0). 14 bit addresses have bits 7,8 of AddrH set to 0.
The command station responds with (PLOC) if engine is free and is being assigned. Otherwise responds with (ERR): engine in use. This command is typically sent by a cab to the command station following a change of the controlled decoder address.
Format: <41><ConID><Index>
Allows enumeration of a consist. Command station responds with PLOC if an engine exists at the specified index, otherwise responds with ERR: no more engines.
Format: <44><Session><MMMMMMMM>
Sent from a cab to the command station to change the number of speed steps used, to that supported by the decoder. The command station should remember the setting and send it in PLOC replies for this decoder.
Format: <45><Session><Consist#>
Adds a decoder to a consist. If consisting is successful, an ACK is sent. If engine is consisted already, an error is reported: engine in use.
Format: <46><Session><Consist#>
Removes a decoder from a consist. If deconsisting is successful an ACK is sent. If engine is not consisted, an error is reported: Engine not found.
Format: <47><Session><Speed/Dir>
Sent by a device to request an engine speed/dir change. The speed is in the DCC format for the number of speed steps. For 128 steps, bit 7 is the direction, 1 for forward. The other 7 bits are the speed, 0 is stop, 1 is emergency stop. For 14 or 28 steps, bit 6 is 1, bit 5 is the direction, bit 4 is the lsb of the 28 step speed, the other 4 bits are the speed, with 0 is stop and 1 is emergency stop.
Format: <48><Session><DDDDDDDD>
Sent by a cab to notify the command station of a change in engine flags. Probably not needed see opcodes 44 and E1.
Format: <49><MMMMAAAA><AAAAAAAA>
Sent by a cab to initiate an event - DCC accessory mapping action. Possible actions are to learn a new mapping (the command station enters learn mode and captures the next CBUS event to create a mapping) and unlearn a mapping.
Format: <60><Session><Dat1><Dat2>
Sent by a device to request an engine Fn state change.
There are 2 formats for this:
Format1: <E1><Session><AddrH><AddrL><Speed/Dir> | Consist#><Fn1><Fn2><Fn3>
Session for engine assigned by the command station. This session number is used in all referenced to the engine until it is released.
AddrH and AddrL is the DCC address. For short addresses AddrH it is set to 0. If the engine is consisted, AddrL is the consist address.
Speed/Direction value. Bit 7 is the direction bit and bits 0-6 are the speed value.
<Fn1> is the function byte F0 to F4 <Fn2> is the function byte F5 to F8 <Fn3> is the function byte F9 to F12
Format2: <E1><Session><AddrH><AddrL><Flags><Speed/Dir | Consist#><B1><B2>
Due to the number of functions, these states are in the opcode E8 PLOCF packet, which may be before or after the PLOC packet.
A report of an engine entry sent by the command station. Usually sent in response to QLOC or as an acknowledgement of acquiring an engine requested by a cab (RLOC).
Format: <E8><Session><AddrH><AddrL><FN0><FN5><FN13><FN21>
The PLOCF may appear before or after the PLOC, and is usually a reply to a QLOC or RLOC request.