Multiplayer protocol: Difference between revisions

Jump to navigation Jump to search
Line 340: Line 340:
* You can see an example of the encode and decode methods with property ID 108 ''gear/launchbar/state'' which although it is a string in FlightGear it will be transmitted as a SHORT_INT based on the known values. When received the property 120 will act as an intermediary an set the decoded value into ''gear/launchbar/state'' as though it had been transmitted as a string.
* You can see an example of the encode and decode methods with property ID 108 ''gear/launchbar/state'' which although it is a string in FlightGear it will be transmitted as a SHORT_INT based on the known values. When received the property 120 will act as an intermediary an set the decoded value into ''gear/launchbar/state'' as though it had been transmitted as a string.


Supported Transmission Types
{| class="wikitable"
! Encoding !! Description
|-
|TT_ASIS = 0||  transmit as defined in the property. This is the default||
|-
|TT_BOOL||NOT USED||
|-
|TT_INT||32bit integer||
|-
|TT_FLOAT||32bit floating point value||
|-
|TT_STRING||string (deprecated)||
|-
|TT_SHORTINT||16bit integer (lower 16 bits of 32bit int)||
|-
|TT_SHORT_FLOAT_NORM||  -1 .. 1 encoded into a short int (16 bit)||
|-
|TT_SHORT_FLOAT_1|| range -3276.7 .. 3276.7  float encoded into a short int (16 bit)||
|-
|TT_SHORT_FLOAT_2|| range -327.67 .. 327.67  float encoded into a short int (16 bit)||
|-
|TT_SHORT_FLOAT_3|| range -32.767 .. 32.767  float encoded into a short int (16 bit)||
|-
|TT_SHORT_FLOAT_4|| range -3.2767 .. 3.2767  float encoded into a short int (16 bit)||
|-
|TT_BOOLARRAY||31 boolean values mapped to a 32bit int||
|-
|TT_CHAR||NOT USED||
|-
|TT_NOSEND|| Do not send this property - probably the receive element for a custom encoded property||
|-
|}
=== Properties transmitted ===
NOTE: Only properties present in the property tree will be transmitted.


{| class="wikitable"
{| class="wikitable"
308

edits

Navigation menu