User:Www2/Advanced Protocol

From FlightGear wiki
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>