Rocrail Pro
Wiki Documentation
Support Forum
Mobile
- andRoc Android
- Rocweb Browser
- WIO-Control ESP32
- Rocview Tablet
DIY
User
Wiki writer
Special
Legal
Rocrail Pro
Wiki Documentation
Support Forum
Mobile
DIY
User
Wiki writer
Special
Legal
All requests and responses are prefixed with a XML-Header which announce the contents.
BEGIN HEADER
<xmlh> <xml size="23" name="cmd"/> <bin size="4711" name="readme.pdf"/> </xmlh>
END HEADER BEGIN XML
<cmd auto="off"/>
END XML BEGIN BIN
A6007B98FF...
END BIN
After the end tag of header, </xmlh>
, no extra chars are allowed. (Even a '\0' is not allowed.)
Name | Description |
---|---|
size | length in bytes of the xml or binary stream |
name | xml document name or binary file name |
Clients can send almost everything found in the protocol definition, and the following list is not complete.
Model commands: http://www.rocrail.net/doc/rocrail-wrappers/wrapper-en.html#model
<model cmd="plan"/>
The locomotives:
<model cmd="lclist"/>
The switches:
<model cmd="swlist"/>
Locomotive:
<model cmd="lcprops" val="locoID"/>
<xmlh><xml size="84" name="lc"/></xmlh><lc id="4711" V_raw="87" V_rawMax="100" cmd="velocity" throttleid="192.168.100.32"/>
For every client request there is a server response.
<plan>...</plan>
Many events are broadcasted to all clients including modifications by other clients.
Just a few example events.
Track power became high:
<state power="true"/>
Automode is switched on:
<auto cmd="on"/>