Board index FlightGear Development New features

[proposal] Advanced Protocol

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

[proposal] Advanced Protocol

Postby www2 » Sun Jun 16, 2019 1:26 am

PROPOSAL
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
www2
 
Posts: 319
Joined: Thu Apr 16, 2009 2:58 pm
OS: Ubuntu

Re: [proposal] Advanced Protocol

Postby www2 » Sun Jun 16, 2019 2:18 am

Background :

This is a idea come form my problems with the current situation and limitations of Generic protocol as array/list (e.g. proptree object like foo/bar[n]), lack of bi directional communication for Network sockets, state machine and execute nasal scrips for for home build cockpits (e.g. CDU interface).
And add support for USB device and websockets communication, XML and json for Data interchange and split network sockets in a server and client component.
www2
 
Posts: 319
Joined: Thu Apr 16, 2009 2:58 pm
OS: Ubuntu


Return to New features

Who is online

Users browsing this forum: No registered users and 6 guests