¿ªÔÆÌåÓý

Locked Re: How Engine driver resend command if not feedback from web server?


 

Despx,

So, you've written your own server code to replace the WiThrottle server and send/receive responses according to the WiThrottle protocol? Is that correct?


There is currently no defined WiThrottle command for the server to request a resend of the "last" command, because the 3 servers I'm familiar with have no way to know that a command was missed. I'm not sure under what scenario a command would be received by the server, but not understood by the server. Can you provide an example?


The normal situation I've seen is when the client's sending of a command fails to send. In that event, the client closes its socket connection and starts a retry loop. If the connection retry is successful, the client re-requests any acquired locos. To which the server responds by sending speed, direction and all function states. The client uses these to update the UI.
I doubt the academics would call that "error correction", but it works well in practice.


Regarding documentation, JMRI and EngineDriver are open-source, hosted on github, so specific questions about the protocol and its implementation can be answered by reading the code for both sides.


The EngineDriver client log is part of Android's logcat feature. I access it using adb from my laptop. The "View Log" window in the client is simply a client-side display of this same logcat log.


HTH,
SteveT

Join [email protected] to automatically receive all group messages.