Introduction
I working on a specification for the Advanced Protocol concept as a alternative for the Generic protocol and address is limitations include de limitations for using network socket and add support for non Serial USB devices and websockets.
And add XML and JSON beside the current binary and ASCII mode for exchange format for IO exchange.
Basic dising
The Advanced Protocol work with two mode State Machine and Periodic.
The first mode "State Machine":
This mode create a interactive that external external hardware/application can request data.
The second mode is the "Periodic":
This mode create small State Machine is send data periodically external hardware/application that is connect to flight gear, this can be each 0.1 sec or every 5 seconds or change in one of the property that can message.
Command line potions
The foaling list how command line options for Advanced Protocol looks
- Code: Select all
--Advanced=<medium>,<myproto>,<medium_options>
<medium> = { serial, socketserver, socketclient, wsserver, wsclient, sereal, usb }
Network socket Server:
--Advanced=socketserver,<myproto>,<port>,<style>
port = port, leave empty to let system choose
style = tcp or udp
--Advanced=socketserver,foobar,1337,tcp
--Advanced=socketserver,spam,1903,udp
Network socket client:
--Advanced=socketclient,<myproto>,<machine>,<port>,<style>
machine = machine name or ip address if client (leave empty if server)
port = port, leave empty to let system choose
style = tcp or udp
--Advanced=socketclient,foobar,192.168.0.55,1337,tcp
--Advanced=socketclient,spam,"test.flightgear.org",1903,udp
Web socket Server:
--Advanced=wsserver,<myproto>,<path>
Note this work only in combination with --httpd
<path> = is path on the server after <server_host>/AdvanceWS/
--httpd=1337 --Advanced=wsserver,spam,"spam"
Web socket client:
--Advanced=wsclient,<myproto>,<URL>
<url> = URL path of the websockets
--Advanced=wsclent,spam,"ws://192.168.0.0.1/randomwebsockets/"
--Advanced=wsclent,spam,"wss://test.flightgear.org:5555/randomwebsockets/"
serial:
--Advanced=serial,<myproto>,<device>,<baud>
device = OS device name of serial line to be open()'ed
baud = {300, 1200, 2400, ..., 230400}
--Advanced=serial,foobar,COM0,2400
--Advanced=serial,spam,"/dev/ttyUSB0,230400
USB:
--Advanced=usb,<myproto>,<vid>,<pid>
<vid> = USB vender ID
<pid> = USB product ID
--Advanced=usb,SpamBacoEggs,0x1337,0x1903