DCC++ Command Structure
DCC++ commands, from the Laptop (4) to the Raspberry Pi (3), to the Base Station running on the Arduino (2) are sent as text strings and have the following structure
<cmd[[[[ value1 value2] value3] value4 value5] value6]>
In response the Base Station or the Raspberry Pi (3) may return nothing or text strings as follows
<response[[[ value1 value2] value3] value4 value5 value6 value7 value8 value9]>
There should not be a space between the "<" and single command or response character. Nor should there be a space before the ">". The DCC++ command documentation states the space is optional, however, JMRI does not allow the space. So neither will I.
Each command value must be preceded by a space.
- < -- The beginning of a DCC++ command or response
- Identifier
- cmd -- The single character "0" or "1" or upper/lower case letter
- response -- A single upper/lower case letter
- data value(s) -- zero to nine values/string each preceded by a space. The response from the Arduino to power on/off (<1> or <0>) is an exception (<p1> or <p0>).
- > -- The end of the DCC++ command or response
The following is a summary of the DCC++ and Added command characters
0 - DCC++ |
1 - DCC++ |
a - DCC++ |
A - addedS |
b - DCC++ |
B - DCC++ |
c - DCC++ |
D - DCC++ |
e - DCC++ |
E - DCC++ |
f - DCC++ |
F - DCC++ |
G - addedS |
h - addedT |
H - addedT |
I - addedo |
J - |
K - addedS |
L - DCC++ |
M - DCC++ |
n - addedS |
N - addedS |
O - |
P - DCC++ |
Q - DCC++T |
R - DCC++ |
s - DCC++ & o |
S - DCC++T |
t - DCC++ |
T - DCC++ |
U - |
V - |
w - DCC++ |
W - DCC++ |
X - |
Y - |
Z - DCC++ |
space - DCC++ |
|
|
|
|
The following is a summary of the DCC++ and Added responses characters
a - DCC++ |
e - DCC++ |
f - DCC++ |
G - addedS |
h - addedT |
H - DCC++ |
i - addedo |
K - addedS |
n - addedS |
O - DCC++T |
p - DCC++ |
q - DCC++T |
Q - DCC++T |
r - DCC++ |
T - DCC++ |
t - DCC++ |
U - addedS |
V - addedS |
X - DCC++T |
Y - DCC++ |
"CR" - DCC++ |
|
|
|
|
Added S for Semaphores. Added T for Turnouts. Added o for other commands.