User:Www2/Advanced Protocol

From FlightGear wiki
< User:Www2
Revision as of 22:29, 15 June 2019 by Www2 (talk | contribs) (→‎file layout)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

proposal

The advanced communication protocall for FlightGear provides a more powerful way than generic communication protocol of adding ASCII base or binary input/output ptorocall for socket, websockets, Sireal or USB communication, just by defining an XML encoded configuration file and placing it in the $FG_ROOT/Protocol/Advaneds or $FG_AIRCRAFT/Protocol directory.

file layout

  <?xml version="1.0"?>
  <PropertyList>
    <advancedProtocol>
      <setup>
        <type></type>
        <endian></endian>
	<line_separator></line_separator>
	<var_separator></var_separator>
      </setup>

      <statemachine>
        <state>
	        ... first state spec ...
	</state>
	
	<state>
	        ... another state etc. ...
	</state>
      </statemachine>
      
      <periodic>
        <block>
                ... First block spec. ...
        </block>
        <block>
                ... another block etc. ...
        </block>
      </periodic>
    
    </advancedProtocol>
  </PropertyList>