diff --git a/src/MultiPlayer/mpmessages.hxx b/src/MultiPlayer/mpmessages.hxx index 354249287..96dfa76a0 100644 --- a/src/MultiPlayer/mpmessages.hxx +++ b/src/MultiPlayer/mpmessages.hxx @@ -71,7 +71,7 @@ struct T_MsgHdr { xdr_data_t Version; // Protocoll version xdr_data_t MsgId; // Message identifier xdr_data_t MsgLen; // absolute length of message - xdr_data_t MsgLen2; // Used to be - ReplyAddress; // (player's receiver address + xdr_data_t RequestedRangeNm; // start of second partition of message xdr_data_t ReplyPort; // player's receiver port char Callsign[MAX_CALLSIGN_LEN]; // Callsign used by the player }; diff --git a/src/MultiPlayer/multiplaymgr.cxx b/src/MultiPlayer/multiplaymgr.cxx index cb33c089a..51ec02b9a 100644 --- a/src/MultiPlayer/multiplaymgr.cxx +++ b/src/MultiPlayer/multiplaymgr.cxx @@ -70,7 +70,12 @@ enum TransmissionType { TT_FLOAT = simgear::props::FLOAT, TT_STRING = simgear::props::STRING, TT_SHORTINT = 0x100, - TT_BOOLARRAY, + TT_SHORT_FLOAT_NORM = 0x101, // -1 .. 1 encoded into a short int (16 bit) + TT_SHORT_FLOAT_1 = 0x102, // float encoded into a short int (16 bit) range -6553.5 .. 6553.5 + TT_SHORT_FLOAT_2 = 0x103, // float encoded into a short int (16 bit) range -655.35 .. 655.35 + TT_SHORT_FLOAT_3 = 0x103, // float encoded into a short int (16 bit) range -65.535 .. 65.535 + TT_SHORT_FLOAT_4 = 0x103, // float encoded into a short int (16 bit) range -6.5535 .. 6.5535 + TT_BOOLARRAY, TT_CHAR, }; /* @@ -87,15 +92,15 @@ enum TransmissionType { */ const int V1_1_PROP_ID = 1; const int V1_1_2_PROP_ID = 2; - +const int V2_PAD_MAGIC = 0x1face1337; struct IdPropertyList { - unsigned id; - const char* name; - simgear::props::Type type; - TransmissionType TransmitAs; - int version; - int(*convert)(int direction, xdr_data_t*, FGPropertyData*); + unsigned id; + const char* name; + simgear::props::Type type; + TransmissionType TransmitAs; + int version; + int(*convert)(int direction, xdr_data_t*, FGPropertyData*); }; static const IdPropertyList* findProperty(unsigned id); @@ -107,30 +112,30 @@ static int convert_launchbar_state(int direction, xdr_data_t*, FGPropertyData*) // This should be extendable dynamically for every specific aircraft ... // For now only that static list static const IdPropertyList sIdPropertyList[] = { - { 100, "surface-positions/left-aileron-pos-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10, "surface-positions/left-aileron-pos-norm", simgear::props::INT, TT_SHORTINT, V1_1_PROP_ID, NULL }, + { 100, "surface-positions/left-aileron-pos-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 101, "surface-positions/right-aileron-pos-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 102, "surface-positions/elevator-pos-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 103, "surface-positions/rudder-pos-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 104, "surface-positions/flap-pos-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 105, "surface-positions/speedbrake-pos-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, - { 106, "gear/tailhook/position-norm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 107, "gear/launchbar/position-norm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 108, "gear/launchbar/state", simgear::props::STRING, TT_ASIS, V1_1_PROP_ID, NULL }, - { 109, "gear/launchbar/holdback-position-norm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 110, "canopy/position-norm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 111, "surface-positions/wing-pos-norm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 112, "surface-positions/wing-fold-pos-norm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 113, "gear/launchbar/state", simgear::props::STRING, TT_ASIS, V1_1_2_PROP_ID, convert_launchbar_state }, + { 106, "gear/tailhook/position-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 107, "gear/launchbar/position-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 108, "gear/launchbar/state", simgear::props::STRING, TT_ASIS, V1_1_2_PROP_ID, NULL }, + { 109, "gear/launchbar/holdback-position-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 110, "canopy/position-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 111, "surface-positions/wing-pos-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 112, "surface-positions/wing-fold-pos-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, - { 200, "gear/gear[0]/compression-norm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, + { 200, "gear/gear[0]/compression-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 201, "gear/gear[0]/position-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, - { 210, "gear/gear[1]/compression-norm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, + { 210, "gear/gear[1]/compression-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 211, "gear/gear[1]/position-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, - { 220, "gear/gear[2]/compression-norm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, + { 220, "gear/gear[2]/compression-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 221, "gear/gear[2]/position-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, - { 230, "gear/gear[3]/compression-norm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, + { 230, "gear/gear[3]/compression-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 231, "gear/gear[3]/position-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, - { 240, "gear/gear[4]/compression-norm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, + { 240, "gear/gear[4]/compression-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 241, "gear/gear[4]/position-norm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 300, "engines/engine[0]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, @@ -139,50 +144,50 @@ static const IdPropertyList sIdPropertyList[] = { { 310, "engines/engine[1]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 311, "engines/engine[1]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 312, "engines/engine[1]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, - { 320, "engines/engine[2]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 321, "engines/engine[2]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 322, "engines/engine[2]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 330, "engines/engine[3]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 331, "engines/engine[3]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 332, "engines/engine[3]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 340, "engines/engine[4]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 341, "engines/engine[4]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 342, "engines/engine[4]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 350, "engines/engine[5]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 351, "engines/engine[5]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 352, "engines/engine[5]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 360, "engines/engine[6]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 361, "engines/engine[6]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 362, "engines/engine[6]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 370, "engines/engine[7]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 371, "engines/engine[7]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 372, "engines/engine[7]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 380, "engines/engine[8]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 381, "engines/engine[8]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 382, "engines/engine[8]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 390, "engines/engine[9]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 391, "engines/engine[9]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 392, "engines/engine[9]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, + { 320, "engines/engine[2]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 321, "engines/engine[2]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 322, "engines/engine[2]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 330, "engines/engine[3]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 331, "engines/engine[3]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 332, "engines/engine[3]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 340, "engines/engine[4]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 341, "engines/engine[4]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 342, "engines/engine[4]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 350, "engines/engine[5]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 351, "engines/engine[5]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 352, "engines/engine[5]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 360, "engines/engine[6]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 361, "engines/engine[6]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 362, "engines/engine[6]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 370, "engines/engine[7]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 371, "engines/engine[7]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 372, "engines/engine[7]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 380, "engines/engine[8]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 381, "engines/engine[8]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 382, "engines/engine[8]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 390, "engines/engine[9]/n1", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 391, "engines/engine[9]/n2", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 392, "engines/engine[9]/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 800, "rotors/main/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 801, "rotors/tail/rpm", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, - { 810, "rotors/main/blade[0]/position-deg", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 811, "rotors/main/blade[1]/position-deg", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 812, "rotors/main/blade[2]/position-deg", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 813, "rotors/main/blade[3]/position-deg", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 820, "rotors/main/blade[0]/flap-deg", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 821, "rotors/main/blade[1]/flap-deg", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 822, "rotors/main/blade[2]/flap-deg", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 823, "rotors/main/blade[3]/flap-deg", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 830, "rotors/tail/blade[0]/position-deg", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 831, "rotors/tail/blade[1]/position-deg", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, + { 810, "rotors/main/blade[0]/position-deg", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 811, "rotors/main/blade[1]/position-deg", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 812, "rotors/main/blade[2]/position-deg", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 813, "rotors/main/blade[3]/position-deg", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 820, "rotors/main/blade[0]/flap-deg", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 821, "rotors/main/blade[1]/flap-deg", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 822, "rotors/main/blade[2]/flap-deg", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 823, "rotors/main/blade[3]/flap-deg", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 830, "rotors/tail/blade[0]/position-deg", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 831, "rotors/tail/blade[1]/position-deg", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 900, "sim/hitches/aerotow/tow/length", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 901, "sim/hitches/aerotow/tow/elastic-constant", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 902, "sim/hitches/aerotow/tow/weight-per-m-kg-m", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 903, "sim/hitches/aerotow/tow/dist", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 904, "sim/hitches/aerotow/tow/connected-to-property-node", simgear::props::BOOL, TT_ASIS, V1_1_PROP_ID, NULL }, - { 905, "sim/hitches/aerotow/tow/connected-to-ai-or-mp-callsign", simgear::props::STRING, TT_ASIS, V1_1_PROP_ID, NULL }, + { 905, "sim/hitches/aerotow/tow/connected-to-ai-or-mp-callsign", simgear::props::STRING, TT_ASIS, V1_1_2_PROP_ID, NULL }, { 906, "sim/hitches/aerotow/tow/brake-force", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 907, "sim/hitches/aerotow/tow/end-force-x", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 908, "sim/hitches/aerotow/tow/end-force-y", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, @@ -194,18 +199,18 @@ static const IdPropertyList sIdPropertyList[] = { { 934, "sim/hitches/aerotow/local-pos-y", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 935, "sim/hitches/aerotow/local-pos-z", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, - { 1001, "controls/flight/slats", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 1002, "controls/flight/speedbrake", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 1003, "controls/flight/spoilers", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, + { 1001, "controls/flight/slats", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 1002, "controls/flight/speedbrake", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 1003, "controls/flight/spoilers", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 1004, "controls/gear/gear-down", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, { 1005, "controls/lighting/nav-lights", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, - { 1006, "controls/armament/station[0]/jettison-all", simgear::props::BOOL, TT_ASIS, V1_1_2_PROP_ID, NULL }, + { 1006, "controls/armament/station[0]/jettison-all", simgear::props::BOOL, TT_ASIS, V1_1_PROP_ID, NULL }, - { 1100, "sim/model/variant", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, + { 1100, "sim/model/variant", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, { 1101, "sim/model/livery/file", simgear::props::STRING, TT_ASIS, V1_1_2_PROP_ID, NULL }, { 1200, "environment/wildfire/data", simgear::props::STRING, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 1201, "environment/contrail", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, + { 1201, "environment/contrail", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, { 1300, "tanker", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, @@ -217,7 +222,7 @@ static const IdPropertyList sIdPropertyList[] = { { 1503, "instrumentation/transponder/inputs/mode", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, { 10001, "sim/multiplay/transmission-freq-hz", simgear::props::STRING, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10002, "sim/multiplay/chat", simgear::props::STRING, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10002, "sim/multiplay/chat", simgear::props::STRING, TT_ASIS, V1_1_2_PROP_ID, NULL }, { 10100, "sim/multiplay/generic/string[0]", simgear::props::STRING, TT_ASIS, V1_1_2_PROP_ID, NULL }, { 10101, "sim/multiplay/generic/string[1]", simgear::props::STRING, TT_ASIS, V1_1_2_PROP_ID, NULL }, @@ -240,99 +245,99 @@ static const IdPropertyList sIdPropertyList[] = { { 10118, "sim/multiplay/generic/string[18]", simgear::props::STRING, TT_ASIS, V1_1_2_PROP_ID, NULL }, { 10119, "sim/multiplay/generic/string[19]", simgear::props::STRING, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10200, "sim/multiplay/generic/float[0]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10201, "sim/multiplay/generic/float[1]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10202, "sim/multiplay/generic/float[2]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10203, "sim/multiplay/generic/float[3]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10204, "sim/multiplay/generic/float[4]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10205, "sim/multiplay/generic/float[5]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10206, "sim/multiplay/generic/float[6]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10207, "sim/multiplay/generic/float[7]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10208, "sim/multiplay/generic/float[8]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10209, "sim/multiplay/generic/float[9]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10210, "sim/multiplay/generic/float[10]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10211, "sim/multiplay/generic/float[11]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10212, "sim/multiplay/generic/float[12]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10213, "sim/multiplay/generic/float[13]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10214, "sim/multiplay/generic/float[14]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10215, "sim/multiplay/generic/float[15]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10216, "sim/multiplay/generic/float[16]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10217, "sim/multiplay/generic/float[17]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10218, "sim/multiplay/generic/float[18]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10219, "sim/multiplay/generic/float[19]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, + { 10200, "sim/multiplay/generic/float[0]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10201, "sim/multiplay/generic/float[1]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10202, "sim/multiplay/generic/float[2]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10203, "sim/multiplay/generic/float[3]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10204, "sim/multiplay/generic/float[4]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10205, "sim/multiplay/generic/float[5]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10206, "sim/multiplay/generic/float[6]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10207, "sim/multiplay/generic/float[7]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10208, "sim/multiplay/generic/float[8]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10209, "sim/multiplay/generic/float[9]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10210, "sim/multiplay/generic/float[10]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10211, "sim/multiplay/generic/float[11]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10212, "sim/multiplay/generic/float[12]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10213, "sim/multiplay/generic/float[13]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10214, "sim/multiplay/generic/float[14]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10215, "sim/multiplay/generic/float[15]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10216, "sim/multiplay/generic/float[16]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10217, "sim/multiplay/generic/float[17]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10218, "sim/multiplay/generic/float[18]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10219, "sim/multiplay/generic/float[19]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, - { 10220, "sim/multiplay/generic/float[20]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10221, "sim/multiplay/generic/float[21]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10222, "sim/multiplay/generic/float[22]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10223, "sim/multiplay/generic/float[23]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10224, "sim/multiplay/generic/float[24]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10225, "sim/multiplay/generic/float[25]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10226, "sim/multiplay/generic/float[26]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10227, "sim/multiplay/generic/float[27]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10228, "sim/multiplay/generic/float[28]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10229, "sim/multiplay/generic/float[29]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10230, "sim/multiplay/generic/float[30]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10231, "sim/multiplay/generic/float[31]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10232, "sim/multiplay/generic/float[32]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10233, "sim/multiplay/generic/float[33]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10234, "sim/multiplay/generic/float[34]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10235, "sim/multiplay/generic/float[35]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10236, "sim/multiplay/generic/float[36]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10237, "sim/multiplay/generic/float[37]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10238, "sim/multiplay/generic/float[38]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10239, "sim/multiplay/generic/float[39]", simgear::props::FLOAT, TT_ASIS, V1_1_2_PROP_ID, NULL }, + { 10220, "sim/multiplay/generic/float[20]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10221, "sim/multiplay/generic/float[21]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10222, "sim/multiplay/generic/float[22]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10223, "sim/multiplay/generic/float[23]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10224, "sim/multiplay/generic/float[24]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10225, "sim/multiplay/generic/float[25]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10226, "sim/multiplay/generic/float[26]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10227, "sim/multiplay/generic/float[27]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10228, "sim/multiplay/generic/float[28]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10229, "sim/multiplay/generic/float[29]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10230, "sim/multiplay/generic/float[30]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10231, "sim/multiplay/generic/float[31]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10232, "sim/multiplay/generic/float[32]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10233, "sim/multiplay/generic/float[33]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10234, "sim/multiplay/generic/float[34]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10235, "sim/multiplay/generic/float[35]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10236, "sim/multiplay/generic/float[36]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10237, "sim/multiplay/generic/float[37]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10238, "sim/multiplay/generic/float[38]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10239, "sim/multiplay/generic/float[39]", simgear::props::FLOAT, TT_ASIS, V1_1_PROP_ID, NULL }, - { 10300, "sim/multiplay/generic/int[0]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10301, "sim/multiplay/generic/int[1]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10302, "sim/multiplay/generic/int[2]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10303, "sim/multiplay/generic/int[3]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10304, "sim/multiplay/generic/int[4]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10305, "sim/multiplay/generic/int[5]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10306, "sim/multiplay/generic/int[6]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10307, "sim/multiplay/generic/int[7]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10308, "sim/multiplay/generic/int[8]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10309, "sim/multiplay/generic/int[9]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10310, "sim/multiplay/generic/int[10]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10311, "sim/multiplay/generic/int[11]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10312, "sim/multiplay/generic/int[12]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10313, "sim/multiplay/generic/int[13]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10314, "sim/multiplay/generic/int[14]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10315, "sim/multiplay/generic/int[15]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10316, "sim/multiplay/generic/int[16]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10317, "sim/multiplay/generic/int[17]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10318, "sim/multiplay/generic/int[18]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10319, "sim/multiplay/generic/int[19]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, + { 10300, "sim/multiplay/generic/int[0]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10301, "sim/multiplay/generic/int[1]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10302, "sim/multiplay/generic/int[2]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10303, "sim/multiplay/generic/int[3]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10304, "sim/multiplay/generic/int[4]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10305, "sim/multiplay/generic/int[5]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10306, "sim/multiplay/generic/int[6]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10307, "sim/multiplay/generic/int[7]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10308, "sim/multiplay/generic/int[8]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10309, "sim/multiplay/generic/int[9]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10310, "sim/multiplay/generic/int[10]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10311, "sim/multiplay/generic/int[11]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10312, "sim/multiplay/generic/int[12]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10313, "sim/multiplay/generic/int[13]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10314, "sim/multiplay/generic/int[14]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10315, "sim/multiplay/generic/int[15]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10316, "sim/multiplay/generic/int[16]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10317, "sim/multiplay/generic/int[17]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10318, "sim/multiplay/generic/int[18]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + { 10319, "sim/multiplay/generic/int[19]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, - { 10320, "sim/multiplay/generic/int[20]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10321, "sim/multiplay/generic/int[21]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10322, "sim/multiplay/generic/int[22]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10323, "sim/multiplay/generic/int[23]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10324, "sim/multiplay/generic/int[24]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10325, "sim/multiplay/generic/int[25]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10326, "sim/multiplay/generic/int[26]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10327, "sim/multiplay/generic/int[27]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10328, "sim/multiplay/generic/int[28]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10329, "sim/multiplay/generic/int[29]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10320, "sim/multiplay/generic/int[20]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10321, "sim/multiplay/generic/int[21]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10322, "sim/multiplay/generic/int[22]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10323, "sim/multiplay/generic/int[23]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10324, "sim/multiplay/generic/int[24]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10325, "sim/multiplay/generic/int[25]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10326, "sim/multiplay/generic/int[26]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10327, "sim/multiplay/generic/int[27]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10328, "sim/multiplay/generic/int[28]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10329, "sim/multiplay/generic/int[29]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10330, "sim/multiplay/generic/int[30]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10331, "sim/multiplay/generic/int[31]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10332, "sim/multiplay/generic/int[32]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10333, "sim/multiplay/generic/int[33]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10334, "sim/multiplay/generic/int[34]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10335, "sim/multiplay/generic/int[35]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10336, "sim/multiplay/generic/int[36]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10337, "sim/multiplay/generic/int[37]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10338, "sim/multiplay/generic/int[38]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, - { 10339, "sim/multiplay/generic/int[39]", simgear::props::INT, TT_ASIS, V1_1_2_PROP_ID, NULL }, + //{ 10320, "sim/multiplay/generic/int[20]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10321, "sim/multiplay/generic/int[21]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10322, "sim/multiplay/generic/int[22]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10323, "sim/multiplay/generic/int[23]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10324, "sim/multiplay/generic/int[24]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10325, "sim/multiplay/generic/int[25]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10326, "sim/multiplay/generic/int[26]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10327, "sim/multiplay/generic/int[27]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10328, "sim/multiplay/generic/int[28]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10329, "sim/multiplay/generic/int[29]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10320, "sim/multiplay/generic/int[20]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10321, "sim/multiplay/generic/int[21]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10322, "sim/multiplay/generic/int[22]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10323, "sim/multiplay/generic/int[23]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10324, "sim/multiplay/generic/int[24]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10325, "sim/multiplay/generic/int[25]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10326, "sim/multiplay/generic/int[26]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10327, "sim/multiplay/generic/int[27]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10328, "sim/multiplay/generic/int[28]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10329, "sim/multiplay/generic/int[29]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10330, "sim/multiplay/generic/int[30]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10331, "sim/multiplay/generic/int[31]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10332, "sim/multiplay/generic/int[32]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10333, "sim/multiplay/generic/int[33]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10334, "sim/multiplay/generic/int[34]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10335, "sim/multiplay/generic/int[35]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10336, "sim/multiplay/generic/int[36]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10337, "sim/multiplay/generic/int[37]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10338, "sim/multiplay/generic/int[38]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, + //{ 10339, "sim/multiplay/generic/int[39]", simgear::props::INT, TT_ASIS, V1_1_PROP_ID, NULL }, { 10500, "sim/multiplay/generic/short[0]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, { 10501, "sim/multiplay/generic/short[1]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, @@ -354,105 +359,84 @@ static const IdPropertyList sIdPropertyList[] = { { 10517, "sim/multiplay/generic/short[17]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, { 10518, "sim/multiplay/generic/short[18]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, { 10519, "sim/multiplay/generic/short[19]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, - { 10520, "sim/multiplay/generic/short[20]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10521, "sim/multiplay/generic/short[21]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10522, "sim/multiplay/generic/short[22]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10523, "sim/multiplay/generic/short[23]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10524, "sim/multiplay/generic/short[24]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10525, "sim/multiplay/generic/short[25]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10526, "sim/multiplay/generic/short[26]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10527, "sim/multiplay/generic/short[27]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10528, "sim/multiplay/generic/short[28]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10529, "sim/multiplay/generic/short[29]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10520, "sim/multiplay/generic/short[20]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10521, "sim/multiplay/generic/short[21]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10522, "sim/multiplay/generic/short[22]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10523, "sim/multiplay/generic/short[23]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10524, "sim/multiplay/generic/short[24]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10525, "sim/multiplay/generic/short[25]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10526, "sim/multiplay/generic/short[26]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10527, "sim/multiplay/generic/short[27]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10528, "sim/multiplay/generic/short[28]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10529, "sim/multiplay/generic/short[29]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10530, "sim/multiplay/generic/short[30]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10531, "sim/multiplay/generic/short[31]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10532, "sim/multiplay/generic/short[32]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10533, "sim/multiplay/generic/short[33]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10534, "sim/multiplay/generic/short[34]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10535, "sim/multiplay/generic/short[35]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10536, "sim/multiplay/generic/short[36]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10537, "sim/multiplay/generic/short[37]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10538, "sim/multiplay/generic/short[38]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10539, "sim/multiplay/generic/short[39]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, + { 10520, "sim/multiplay/generic/short[20]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10521, "sim/multiplay/generic/short[21]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10522, "sim/multiplay/generic/short[22]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10523, "sim/multiplay/generic/short[23]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10524, "sim/multiplay/generic/short[24]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10525, "sim/multiplay/generic/short[25]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10526, "sim/multiplay/generic/short[26]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10527, "sim/multiplay/generic/short[27]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10528, "sim/multiplay/generic/short[28]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10529, "sim/multiplay/generic/short[29]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10520, "sim/multiplay/generic/short[20]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10521, "sim/multiplay/generic/short[21]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10522, "sim/multiplay/generic/short[22]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10523, "sim/multiplay/generic/short[23]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10524, "sim/multiplay/generic/short[24]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10525, "sim/multiplay/generic/short[25]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10526, "sim/multiplay/generic/short[26]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10527, "sim/multiplay/generic/short[27]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10528, "sim/multiplay/generic/short[28]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10529, "sim/multiplay/generic/short[29]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10530, "sim/multiplay/generic/short[30]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10531, "sim/multiplay/generic/short[31]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10532, "sim/multiplay/generic/short[32]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10533, "sim/multiplay/generic/short[33]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10534, "sim/multiplay/generic/short[34]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10535, "sim/multiplay/generic/short[35]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10536, "sim/multiplay/generic/short[36]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10537, "sim/multiplay/generic/short[37]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10538, "sim/multiplay/generic/short[38]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10539, "sim/multiplay/generic/short[39]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10540, "sim/multiplay/generic/short[40]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10541, "sim/multiplay/generic/short[41]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10542, "sim/multiplay/generic/short[42]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10543, "sim/multiplay/generic/short[43]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10544, "sim/multiplay/generic/short[44]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10545, "sim/multiplay/generic/short[45]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10546, "sim/multiplay/generic/short[46]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10547, "sim/multiplay/generic/short[47]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10548, "sim/multiplay/generic/short[48]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10549, "sim/multiplay/generic/short[49]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10550, "sim/multiplay/generic/short[50]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10551, "sim/multiplay/generic/short[51]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10552, "sim/multiplay/generic/short[52]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10553, "sim/multiplay/generic/short[53]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10554, "sim/multiplay/generic/short[54]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10555, "sim/multiplay/generic/short[55]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10556, "sim/multiplay/generic/short[56]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10557, "sim/multiplay/generic/short[57]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10558, "sim/multiplay/generic/short[58]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10559, "sim/multiplay/generic/short[59]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10560, "sim/multiplay/generic/short[60]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10561, "sim/multiplay/generic/short[61]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10562, "sim/multiplay/generic/short[62]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10563, "sim/multiplay/generic/short[63]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10564, "sim/multiplay/generic/short[64]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10565, "sim/multiplay/generic/short[65]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10566, "sim/multiplay/generic/short[66]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10567, "sim/multiplay/generic/short[67]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10568, "sim/multiplay/generic/short[68]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10569, "sim/multiplay/generic/short[69]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10570, "sim/multiplay/generic/short[70]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10571, "sim/multiplay/generic/short[71]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10572, "sim/multiplay/generic/short[72]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10573, "sim/multiplay/generic/short[73]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10574, "sim/multiplay/generic/short[74]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10575, "sim/multiplay/generic/short[75]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10576, "sim/multiplay/generic/short[76]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10577, "sim/multiplay/generic/short[77]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10578, "sim/multiplay/generic/short[78]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, + { 10579, "sim/multiplay/generic/short[79]", simgear::props::INT, TT_SHORTINT, V1_1_2_PROP_ID, NULL }, - { 10540, "sim/multiplay/generic/short[40]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10541, "sim/multiplay/generic/short[41]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10542, "sim/multiplay/generic/short[42]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10543, "sim/multiplay/generic/short[43]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10544, "sim/multiplay/generic/short[44]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10545, "sim/multiplay/generic/short[45]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10546, "sim/multiplay/generic/short[46]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10547, "sim/multiplay/generic/short[47]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10548, "sim/multiplay/generic/short[48]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10549, "sim/multiplay/generic/short[49]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - - { 10550, "sim/multiplay/generic/short[50]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10551, "sim/multiplay/generic/short[51]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10552, "sim/multiplay/generic/short[52]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10553, "sim/multiplay/generic/short[53]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10554, "sim/multiplay/generic/short[54]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10555, "sim/multiplay/generic/short[55]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10556, "sim/multiplay/generic/short[56]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10557, "sim/multiplay/generic/short[57]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10558, "sim/multiplay/generic/short[58]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10559, "sim/multiplay/generic/short[59]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - - { 10560, "sim/multiplay/generic/short[60]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10561, "sim/multiplay/generic/short[61]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10562, "sim/multiplay/generic/short[62]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10563, "sim/multiplay/generic/short[63]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10564, "sim/multiplay/generic/short[64]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10565, "sim/multiplay/generic/short[65]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10566, "sim/multiplay/generic/short[66]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10567, "sim/multiplay/generic/short[67]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10568, "sim/multiplay/generic/short[68]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10569, "sim/multiplay/generic/short[69]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - - { 10570, "sim/multiplay/generic/short[70]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10571, "sim/multiplay/generic/short[71]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10572, "sim/multiplay/generic/short[72]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10573, "sim/multiplay/generic/short[73]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10574, "sim/multiplay/generic/short[74]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10575, "sim/multiplay/generic/short[75]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10576, "sim/multiplay/generic/short[76]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10577, "sim/multiplay/generic/short[77]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10578, "sim/multiplay/generic/short[78]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - { 10579, "sim/multiplay/generic/short[79]", simgear::props::INT, TT_SHORTINT , V1_1_2_PROP_ID, NULL }, - - - /*{ 12100, "sim/multiplay/generic/string[20]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12101, "sim/multiplay/generic/string[21]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12102, "sim/multiplay/generic/string[22]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12103, "sim/multiplay/generic/string[23]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12104, "sim/multiplay/generic/string[24]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12105, "sim/multiplay/generic/string[25]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12106, "sim/multiplay/generic/string[26]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12107, "sim/multiplay/generic/string[27]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12108, "sim/multiplay/generic/string[28]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12109, "sim/multiplay/generic/string[29]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12110, "sim/multiplay/generic/string[20]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12111, "sim/multiplay/generic/string[31]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12112, "sim/multiplay/generic/string[32]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12113, "sim/multiplay/generic/string[33]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12114, "sim/multiplay/generic/string[34]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12115, "sim/multiplay/generic/string[35]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12116, "sim/multiplay/generic/string[36]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12117, "sim/multiplay/generic/string[37]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12118, "sim/multiplay/generic/string[38]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL }, - { 12119, "sim/multiplay/generic/string[39]", simgear::props::STRING, TT_ASIS , V1_1_2_PROP_ID, NULL },*/ }; +/* + * For the 2017.x version 2 protocol (which layers inside the V1 packet) the properties are sent in two partitions, + * the first of these is a V1 protocol packet (which should be fine with all clients), and a V2 partition + * which will contain the newly supported shortint and fixed string encoding schemes. + */ const int MAX_PARTITIONS = 2; -const int NEW_STRING_ENCODING_START = 12000; // anything below this uses the old string encoding scheme const unsigned int numProperties = (sizeof(sIdPropertyList) / sizeof(sIdPropertyList[0])); @@ -502,8 +486,7 @@ namespace const IdPropertyList* plist = findProperty(id); if (plist) { -// printf("[VRFY] %8x: buf[%d] type %d\n", xdr, ((char*)xdr) - ((char*)data), plist->id); - xdr++; + xdr++; // How we decode the remainder of the property depends on the type switch (plist->type) { case props::INT: @@ -523,33 +506,26 @@ namespace case props::STRING: case props::UNSPECIFIED: { - if (id >= NEW_STRING_ENCODING_START) { - uint32_t length = XDR_decode_uint32(*xdr); - xdr++; - xdr = (xdr_data_t*)(((char*)xdr) + length); - } - else { - // String is complicated. It consists of - // The length of the string - // The string itself - // Padding to the nearest 4-bytes. - // XXX Yes, each byte is padded out to a word! Too late - // to change... - uint32_t length = XDR_decode_uint32(*xdr); - xdr++; - // Old versions truncated the string but left the length - // unadjusted. - if (length > MAX_TEXT_SIZE) - length = MAX_TEXT_SIZE; - xdr += length; - // Now handle the padding - while ((length % 4) != 0) - { - xdr++; - length++; - //cout << "0"; - } - } + // String is complicated. It consists of + // The length of the string + // The string itself + // Padding to the nearest 4-bytes. + // XXX Yes, each byte is padded out to a word! Too late + // to change... + uint32_t length = XDR_decode_uint32(*xdr); + xdr++; + // Old versions truncated the string but left the length + // unadjusted. + if (length > MAX_TEXT_SIZE) + length = MAX_TEXT_SIZE; + xdr += length; + // Now handle the padding + while ((length % 4) != 0) + { + xdr++; + length++; + //cout << "0"; + } } break; default: @@ -579,65 +555,9 @@ public: { _multiplay->setPropertiesChanged(); } - virtual void valueChanged(SGPropertyNode * node) - { - if (node->getNameString() == "protocol-version") { - - _multiplay->setProtocolToUse(node->getIntValue()); - SG_LOG(SG_NETWORK, SG_INFO, "Switched to procotol version: " << _multiplay->getProtocolToUse() << " " << node->getIntValue()); - } - } private: FGMultiplayMgr* _multiplay; }; -#ifndef HEXDUMP_COLS -#define HEXDUMP_COLS 16 -#endif - -void hexdump(void *mem, unsigned int len) -{ - unsigned int i, j; - - for (i = 0; i < len + ((len % HEXDUMP_COLS) ? (HEXDUMP_COLS - len % HEXDUMP_COLS) : 0); i++) - { - /* print offset */ - if (i % HEXDUMP_COLS == 0) - { - printf("0x%06x: ", i); - } - - /* print hex data */ - if (i < len) - { - printf("%02x ", 0xFF & ((char*)mem)[i]); - } - else /* end of block, just aligning for ASCII dump */ - { - printf(" "); - } - - /* print ASCII dump */ - if (i % HEXDUMP_COLS == (HEXDUMP_COLS - 1)) - { - for (j = i - (HEXDUMP_COLS - 1); j <= i; j++) - { - if (j >= len) /* end of block, not really printing */ - { - putchar(' '); - } - else if (isprint(((char*)mem)[j])) /* printable char */ - { - putchar(0xFF & ((char*)mem)[j]); - } - else /* other char */ - { - putchar('.'); - } - } - putchar('\n'); - } - } -} ////////////////////////////////////////////////////////////////////// // @@ -770,6 +690,11 @@ FGMultiplayMgr::FGMultiplayMgr() globals->get_commands()->addCommand("multiplayer-connect", do_multiplayer_connect); globals->get_commands()->addCommand("multiplayer-disconnect", do_multiplayer_disconnect); globals->get_commands()->addCommand("multiplayer-refreshserverlist", do_multiplayer_refreshserverlist); + pXmitLen = fgGetNode("/sim/multiplay/last-xmit-packet-len", true); + pProtocolVersion = fgGetNode("/sim/multiplay/last-xmit-packet-len", true); + pMultiPlayDebugLevel = fgGetNode("/sim/multiplay/debug-level", true); + pMultiPlayRange = fgGetNode("/sim/multiplay/visibility-range-nm", true); + pMultiPlayRange->setIntValue(100); } // FGMultiplayMgr::FGMultiplayMgr() ////////////////////////////////////////////////////////////////////// @@ -874,7 +799,6 @@ FGMultiplayMgr::init (void) mPropertiesChanged = true; mListener = new MPPropertyListener(this); globals->get_props()->addChangeListener(mListener, false); - fgGetNode("/sim/multiplay/protocol-version", true)->addChangeListener(mListener, true); fgSetBool("/sim/multiplay/online", true); mInitialised = true; @@ -994,12 +918,12 @@ union FGMultiplayMgr::MsgBuf */ xdr_data_t* propsRecvdEnd() { - return reinterpret_cast(Msg + Header.MsgLen + Header.MsgLen2); + return reinterpret_cast(Msg + Header.MsgLen); } const xdr_data_t* propsRecvdEnd() const { - return reinterpret_cast(Msg + Header.MsgLen + Header.MsgLen2); + return reinterpret_cast(Msg + Header.MsgLen); } xdr_data2_t double_val; @@ -1051,6 +975,16 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData& motionInfo) static unsigned msgLen = 0; T_PositionMsg* PosMsg = msgBuf.posMsg(); + /* + * This is to provide a level of compatibility with the new V2 packets. + * By setting padding it will force older clients to use verify properties which will + * bail out if there are any unknown props + * V2 (for V1 clients) will always have an unknown property because V2 transmits + * the protocol version as the very first property as a shortint. + */ + if (getProtocolToUse() > 1) + PosMsg->pad = XDR_encode_double(V2_PAD_MAGIC); + strncpy(PosMsg->Model, fgGetString("/sim/model/path"), MAX_MODEL_NAME_LEN); PosMsg->Model[MAX_MODEL_NAME_LEN - 1] = '\0'; if (fgGetBool("/sim/freeze/replay-state", true)&& @@ -1105,214 +1039,222 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData& motionInfo) xdr_data_t* data = ptr; xdr_data_t* msgEnd = msgBuf.propsEnd(); - int previous_partitions_len = 0; - for (int partition = 1; partition <= mProtocolVersion; partition++) + for (int partition = 1; partition <= getProtocolToUse(); partition++) + { + std::vector::const_iterator it = motionInfo.properties.begin(); + while (it != motionInfo.properties.end()) { + const struct IdPropertyList* propDef = mPropertyDefinition[(*it)->id]; + if (propDef->version == partition || propDef->version > getProtocolToUse()) + { + if (ptr + 2 >= msgEnd) + { + SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer packet truncated prop id: " << (*it)->id); + break; + } + + // First element is the ID. Write it out when we know we have room for + // the whole property. + xdr_data_t id = XDR_encode_uint32((*it)->id); + int transmit_type = (*it)->type; + if (partition > 1 && propDef->TransmitAs != TT_ASIS) + { + transmit_type = propDef->TransmitAs; + } + + if (pMultiPlayDebugLevel->getIntValue() & 2) + SG_LOG(SG_NETWORK, SG_INFO, + "[SEND] pt " << partition << + ": buf[" << ((unsigned int)ptr) - ((unsigned int)data) + << "] id=" << (*it)->id << " type " << transmit_type); + + // The actual data representation depends on the type + switch (transmit_type) { + case TT_SHORTINT: + { + *ptr++ = XDR_encode_shortints32((*it)->id, (*it)->int_value); + break; + } + case simgear::props::INT: + case simgear::props::BOOL: + case simgear::props::LONG: + *ptr++ = id; + *ptr++ = XDR_encode_uint32((*it)->int_value); + //cout << "Prop:" << (*it)->id << " " << (*it)->type << " "<< (*it)->int_value << "\n"; + break; + case simgear::props::FLOAT: + case simgear::props::DOUBLE: + *ptr++ = id; + *ptr++ = XDR_encode_float((*it)->float_value); + //cout << "Prop:" << (*it)->id << " " << (*it)->type << " "<< (*it)->float_value << "\n"; + break; + case simgear::props::STRING: + case simgear::props::UNSPECIFIED: + { + if (partition > 1) { + // New string encoding: + // xdr[0] : ID length packed into 32 bit containing two shorts. + // xdr[1..len/4] The string itself (char[length]) + const char* lcharptr = (*it)->string_value; + + if (lcharptr != 0) + { + uint32_t len = strlen(lcharptr); + + if (len >= MAX_TEXT_SIZE) + { + len = MAX_TEXT_SIZE - 1; + SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer property truncated at MAX_TEXT_SIZE in string " << (*it)->id); + } + + char *encodeStart = (char*)ptr; + char *msgEndbyte = (char*)msgEnd; + + if (encodeStart + 2 + len >= msgEndbyte) + { + SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer property not sent (no room) string " << (*it)->id); + goto escape; + } + + *ptr++ = XDR_encode_shortints32((*it)->id, len); + encodeStart = (char*)ptr; + if (len != 0) + { + int lcount = 0; + while (*lcharptr && (lcount < MAX_TEXT_SIZE)) + { + if (encodeStart + 2 >= msgEndbyte) + { + SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer packet truncated in string " << (*it)->id << " lcount " << lcount); + break; + } + *encodeStart++ = *lcharptr++; + lcount++; + } + } + ptr = (xdr_data_t*)encodeStart; + } + else + { + // empty string, just send the id and a zero length + *ptr++ = id; + *ptr++ = XDR_encode_uint32(0); + } + } + else { + + // String is complicated. It consists of + // The length of the string + // The string itself + // Padding to the nearest 4-bytes. + const char* lcharptr = (*it)->string_value; + + if (lcharptr != 0) + { + // Add the length + ////cout << "String length: " << strlen(lcharptr) << "\n"; + uint32_t len = strlen(lcharptr); + if (len >= MAX_TEXT_SIZE) + { + len = MAX_TEXT_SIZE - 1; + SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer property truncated at MAX_TEXT_SIZE in string " << (*it)->id); + } + + // XXX This should not be using 4 bytes per character! + // If there's not enough room for this property, drop it + // on the floor. + if (ptr + 2 + ((len + 3) & ~3) >= msgEnd) + { + SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer property not sent (no room) string " << (*it)->id); + goto escape; + } + //cout << "String length unint32: " << len << "\n"; + *ptr++ = id; + *ptr++ = XDR_encode_uint32(len); + if (len != 0) + { + // Now the text itself + // XXX This should not be using 4 bytes per character! + int lcount = 0; + while ((*lcharptr != '\0') && (lcount < MAX_TEXT_SIZE)) + { + if (ptr + 2 >= msgEnd) + { + SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer packet truncated in string " << (*it)->id << " lcount " << lcount); + break; + } + *ptr++ = XDR_encode_int8(*lcharptr); + lcharptr++; + lcount++; + } + //cout << "Prop:" << (*it)->id << " " << (*it)->type << " " << len << " " << (*it)->string_value; + + // Now pad if required + while ((lcount % 4) != 0) + { + if (ptr + 2 >= msgEnd) + { + SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer packet truncated in string " << (*it)->id << " lcount " << lcount); + break; + } + *ptr++ = XDR_encode_int8(0); + lcount++; + //cout << "0"; + } + + //cout << "\n"; + } + } + else + { + // Nothing to encode + *ptr++ = id; + *ptr++ = XDR_encode_uint32(0); + //cout << "Prop:" << (*it)->id << " " << (*it)->type << " 0\n"; + } + } + } + break; + + default: + //cout << " Unknown Type: " << (*it)->type << "\n"; + *ptr++ = id; + *ptr++ = XDR_encode_float((*it)->float_value);; + //cout << "Prop:" << (*it)->id << " " << (*it)->type << " "<< (*it)->float_value << "\n"; + break; + } + } + ++it; + } + } + escape: + msgLen = reinterpret_cast(ptr) - msgBuf.Msg; + + FillMsgHdr(msgBuf.msgHdr(), POS_DATA_ID, msgLen); + + /* + * Informational: + * Save the last packet length sent, and + * if the property is set then dump the packet length to the console. + * This should be sufficient for rudimentary debugging - at this point I don't want + * to spend ages creating some sort of fancy and configurable MP debugging suite that + * would have limited uses; so what's here is what I would have like to be able to view when + * developing MP model elements. + */ + pXmitLen->setIntValue(msgLen); + if (pMultiPlayDebugLevel->getIntValue() & 4) { - std::vector::const_iterator it = motionInfo.properties.begin(); - while (it != motionInfo.properties.end()) { - const struct IdPropertyList* propDef = mPropertyDefinition[(*it)->id]; - if (propDef->version == partition || propDef->version > mProtocolVersion) - { - if (ptr + 2 >= msgEnd) - { - SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer packet truncated prop id: " << (*it)->id); - break; - } - //printf("[SEND] p%d: %8x: buf[%d] type %d : p%d TA:%d\n", partition, ptr, ((unsigned int)ptr) - ((unsigned int)data), (*it)->id, propDef->version, propDef->TransmitAs); - - // First element is the ID. Write it out when we know we have room for - // the whole property. - xdr_data_t id = XDR_encode_uint32((*it)->id); - int transmit_type = (*it)->type; - if (propDef->TransmitAs != TT_ASIS) - { - transmit_type = propDef->TransmitAs; - } - - // The actual data representation depends on the type - switch (transmit_type) { - case TT_SHORTINT: - { - *ptr++ = XDR_encode_uint32((((*it)->id & 0xffff) << 16) | ((*it)->int_value & 0xffff)); - break; - } - case simgear::props::INT: - case simgear::props::BOOL: - case simgear::props::LONG: - *ptr++ = id; - *ptr++ = XDR_encode_uint32((*it)->int_value); - //cout << "Prop:" << (*it)->id << " " << (*it)->type << " "<< (*it)->int_value << "\n"; - break; - case simgear::props::FLOAT: - case simgear::props::DOUBLE: - *ptr++ = id; - *ptr++ = XDR_encode_float((*it)->float_value); - //cout << "Prop:" << (*it)->id << " " << (*it)->type << " "<< (*it)->float_value << "\n"; - break; - case simgear::props::STRING: - case simgear::props::UNSPECIFIED: - { - if ((*it)->id >= NEW_STRING_ENCODING_START) { - // New string encoding: - // The length of the string (int32) - // The string itself (char[length]) - const char* lcharptr = (*it)->string_value; - - if (lcharptr != 0) - { - uint32_t len = strlen(lcharptr); - - if (len >= MAX_TEXT_SIZE) - { - len = MAX_TEXT_SIZE - 1; - SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer property truncated at MAX_TEXT_SIZE in string " << (*it)->id); - } - - char *encodeStart = (char*)ptr; - char *msgEndbyte = (char*)msgEnd; - - if (encodeStart + 2 + len >= msgEndbyte) - { - SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer property not sent (no room) string " << (*it)->id); - goto escape; - } - - *ptr++ = id; - *ptr++ = XDR_encode_uint32(len); - encodeStart = (char*)ptr; - if (len != 0) - { - int lcount = 0; - while (*lcharptr && (lcount < MAX_TEXT_SIZE)) - { - if (encodeStart + 2 >= msgEndbyte) - { - SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer packet truncated in string " << (*it)->id << " lcount " << lcount); - break; - } - *encodeStart++ = *lcharptr++; - lcount++; - } - } - ptr = (xdr_data_t*)encodeStart; - } - else - { - // empty string, just send the id and a zero length - *ptr++ = id; - *ptr++ = XDR_encode_uint32(0); - } - } - else { - - // String is complicated. It consists of - // The length of the string - // The string itself - // Padding to the nearest 4-bytes. - const char* lcharptr = (*it)->string_value; - - if (lcharptr != 0) - { - // Add the length - ////cout << "String length: " << strlen(lcharptr) << "\n"; - uint32_t len = strlen(lcharptr); - if (len >= MAX_TEXT_SIZE) - { - len = MAX_TEXT_SIZE - 1; - SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer property truncated at MAX_TEXT_SIZE in string " << (*it)->id); - } - - // XXX This should not be using 4 bytes per character! - // If there's not enough room for this property, drop it - // on the floor. - if (ptr + 2 + ((len + 3) & ~3) >= msgEnd) - { - SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer property not sent (no room) string " << (*it)->id); - goto escape; - } - //cout << "String length unint32: " << len << "\n"; - *ptr++ = id; - *ptr++ = XDR_encode_uint32(len); - if (len != 0) - { - // Now the text itself - // XXX This should not be using 4 bytes per character! - int lcount = 0; - while ((*lcharptr != '\0') && (lcount < MAX_TEXT_SIZE)) - { - if (ptr + 2 >= msgEnd) - { - SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer packet truncated in string " << (*it)->id << " lcount " << lcount); - break; - } - *ptr++ = XDR_encode_int8(*lcharptr); - lcharptr++; - lcount++; - } - //cout << "Prop:" << (*it)->id << " " << (*it)->type << " " << len << " " << (*it)->string_value; - - // Now pad if required - while ((lcount % 4) != 0) - { - if (ptr + 2 >= msgEnd) - { - SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer packet truncated in string " << (*it)->id << " lcount " << lcount); - break; - } - *ptr++ = XDR_encode_int8(0); - lcount++; - //cout << "0"; - } - - //cout << "\n"; - } - } - else - { - // Nothing to encode - *ptr++ = id; - *ptr++ = XDR_encode_uint32(0); - //cout << "Prop:" << (*it)->id << " " << (*it)->type << " 0\n"; - } - } - } - break; - - default: - //cout << " Unknown Type: " << (*it)->type << "\n"; - *ptr++ = id; - *ptr++ = XDR_encode_float((*it)->float_value);; - //cout << "Prop:" << (*it)->id << " " << (*it)->type << " "<< (*it)->float_value << "\n"; - break; - } - } - ++it; - } - escape: - msgLen = reinterpret_cast(ptr) - msgBuf.Msg; - /* - * 2017.x MP changes: - * The buffer is partitioned into two logical sections; the first contains the backwards compatible section, which - * is only to be read by older clients. - * The second partition (in the buf) contains all of the rest of the data for all other versions - */ - if (partition == 1) - { - FillMsgHdr(msgBuf.msgHdr(), POS_DATA_ID, msgLen); - previous_partitions_len += msgLen; - } - else - { - int ml2 = msgLen - previous_partitions_len; - //previous_partitions_len += ml2; - msgBuf.msgHdr()->MsgLen2 = XDR_encode_int32(ml2); - } - //printf("[SEND] %d: %8x: buf[%d] p1l %4d p2 %4d\n", partition, ptr, ((unsigned int)ptr) - ((unsigned int)data), - //XDR_decode_int32(msgBuf.msgHdr()->MsgLen), - // XDR_decode_int32(msgBuf.msgHdr()->MsgLen2)); - //hexdump(data, (ptr - data) * sizeof(*ptr)); - //long stamp = SGTimeStamp::now().getSeconds(); - //ProcessPosMsg(msgBuf, mServer, stamp); + SG_LOG(SG_NETWORK, SG_INFO, + "[SEND] Packet len " << msgLen); + if (pMultiPlayDebugLevel->getIntValue() & 2) + SG_LOG_HEXDUMP(SG_NETWORK, SG_INFO, data, (ptr - data) * sizeof(*ptr)); + } + /* + * simple loopback of ourselves - to enable easy MP debug for model developers. + */ + if (pMultiPlayDebugLevel->getIntValue() & 1) + { + long stamp = SGTimeStamp::now().getSeconds(); + ProcessPosMsg(msgBuf, mServer, stamp); } } if (msgLen>0) @@ -1697,131 +1639,129 @@ FGMultiplayMgr::ProcessPosMsg(const FGMultiplayMgr::MsgBuf& Msg, // strict about the validity of the property values. const xdr_data_t* xdr = Msg.properties(); const xdr_data_t* data = xdr; - if (PosMsg->pad != 0) { + int MsgLenBytes = Msg.Header.MsgLen; + + /* + * with V2 we use the pad to forcefully invoke older clients to verify (and discard) + * our new protocol. + * This will preserve the position info but not transmit the properties; which is about + * the most reasonable compromise we can have + */ + if (PosMsg->pad != 0 && PosMsg->pad != V2_PAD_MAGIC) { if (verifyProperties(&PosMsg->pad, Msg.propsRecvdEnd())) xdr = &PosMsg->pad; else if (!verifyProperties(xdr, Msg.propsRecvdEnd())) goto noprops; } while (xdr < Msg.propsRecvdEnd()) { - // simgear::props::Type type = simgear::props::UNSPECIFIED; - // First element is always the ID unsigned id = XDR_decode_uint32(*xdr); - //cout << pData->id << " "; - // printf("[RECV] %8x: buf[%d] type %d\n", xdr, ((char*)xdr) - ((char*)data), id); - xdr++; + + /* + * As we can detect a short int encoded value (by the upper word being non-zero) we can + * do the decode here; set the id correctly, extract the integer and set the flag. + * This can then be picked up by the normal processing based on the flag + */ int int_value = 0; bool short_int_encoded = false; if (id & 0xffff0000) { - int_value = id & 0xffff; - id = (id & 0xffff0000) >> 16; + int v1, v2; + XDR_decode_shortints32(*xdr, v1, v2); + int_value = v2; + id = v1; short_int_encoded = true; } + if (pMultiPlayDebugLevel->getIntValue() & 8) + SG_LOG(SG_NETWORK, SG_INFO, + "[RECV] add " << std::hex << xdr + << std::dec << + ": buf[" << ((char*)xdr) - ((char*)data) + << "] id=" << id + << " SIenc " << short_int_encoded); + // Check the ID actually exists and get the type const IdPropertyList* plist = findProperty(id); + xdr++; + + if (plist) + { + FGPropertyData* pData = new FGPropertyData; + pData->id = id; + pData->type = plist->type; + // How we decode the remainder of the property depends on the type + switch (pData->type) { + case simgear::props::INT: + case simgear::props::BOOL: + case simgear::props::LONG: + pData->int_value = XDR_decode_uint32(*xdr); + xdr++; + //cout << pData->int_value << "\n"; + break; + case simgear::props::FLOAT: + case simgear::props::DOUBLE: + pData->float_value = XDR_decode_float(*xdr); + xdr++; + //cout << pData->float_value << "\n"; + break; + case simgear::props::STRING: + case simgear::props::UNSPECIFIED: + { + // String is complicated. It consists of + // The length of the string + // The string itself + // Padding to the nearest 4-bytes. + uint32_t length = XDR_decode_uint32(*xdr); + xdr++; + //cout << length << " "; + // Old versions truncated the string but left the length unadjusted. + if (length > MAX_TEXT_SIZE) + length = MAX_TEXT_SIZE; + pData->string_value = new char[length + 1]; + //cout << " String: "; + for (unsigned i = 0; i < length; i++) + { + pData->string_value[i] = (char) XDR_decode_int8(*xdr); + xdr++; + //cout << pData->string_value[i]; + } - if (plist) - { - FGPropertyData* pData = new FGPropertyData; - pData->id = id; + pData->string_value[length] = '\0'; - if (short_int_encoded) - { - pData->int_value = int_value; - pData->type = simgear::props::INT; - } - else { - pData->type = plist->type; - // How we decode the remainder of the property depends on the type - switch (pData->type) { - case TT_SHORTINT: - pData->int_value = int_value; - break; - case simgear::props::INT: - case simgear::props::BOOL: - case simgear::props::LONG: - pData->int_value = XDR_decode_uint32(*xdr); - xdr++; - //cout << pData->int_value << "\n"; - break; - case simgear::props::FLOAT: - case simgear::props::DOUBLE: - pData->float_value = XDR_decode_float(*xdr); - xdr++; - //cout << pData->float_value << "\n"; - break; - case simgear::props::STRING: - case simgear::props::UNSPECIFIED: - { - if (pData->id >= NEW_STRING_ENCODING_START) { - uint32_t length = XDR_decode_uint32(*xdr); - xdr++; - pData->string_value = new char[length + 1]; + // Now handle the padding + while ((length % 4) != 0) + { + xdr++; + length++; + //cout << "0"; + } + //cout << "\n"; + } + break; - char *cptr = (char*)xdr; - for (unsigned i = 0; i < length; i++) - { - pData->string_value[i] = *cptr++; - } - pData->string_value[length] = '\0'; - // printf(">> string recv %s\n", pData->string_value); - xdr = (xdr_data_t*)cptr; - } - else { - // String is complicated. It consists of - // The length of the string - // The string itself - // Padding to the nearest 4-bytes. - uint32_t length = XDR_decode_uint32(*xdr); - xdr++; - //cout << length << " "; - // Old versions truncated the string but left the length unadjusted. - if (length > MAX_TEXT_SIZE) - length = MAX_TEXT_SIZE; - pData->string_value = new char[length + 1]; - //cout << " String: "; - for (unsigned i = 0; i < length; i++) - { - pData->string_value[i] = (char)XDR_decode_int8(*xdr); - xdr++; - //cout << pData->string_value[i]; - } + default: + pData->float_value = XDR_decode_float(*xdr); + SG_LOG(SG_NETWORK, SG_DEBUG, "Unknown Prop type " << pData->id << " " << pData->type); + xdr++; + break; + } - pData->string_value[length] = '\0'; + motionInfo.properties.push_back(pData); + } + else + { + // We failed to find the property. We'll try the next packet immediately. + SG_LOG(SG_NETWORK, SG_DEBUG, "FGMultiplayMgr::ProcessPosMsg - " + "message from " << MsgHdr->Callsign << " has unknown property id " + << id); + SG_LOG_HEXDUMP(SG_NETWORK, SG_DEBUG, data, (Msg.propsRecvdEnd() - data) * sizeof(*data)); - // Now handle the padding - while ((length % 4) != 0) - { - xdr++; - length++; - //cout << "0"; - } - //cout << "\n"; - } - } - break; - - default: - pData->float_value = XDR_decode_float(*xdr); - SG_LOG(SG_NETWORK, SG_DEBUG, "Unknown Prop type " << pData->id << " " << pData->type); - xdr++; - break; - } - } - motionInfo.properties.push_back(pData); - } - else - { - // We failed to find the property. We'll try the next packet immediately. - SG_LOG(SG_NETWORK, SG_DEBUG, "FGMultiplayMgr::ProcessPosMsg - " - "message from " << MsgHdr->Callsign << " has unknown property id " - << id); - break; // C TESTING ONLY AS PROBABLY INDICATES BAD PACKET. - } - } + // At this point the packet must be considered to be unreadable + // as we have no way of knowing the length of this property (it could be a string) + break; + } + } noprops: FGAIMultiplayer* mp = getMultiplayer(MsgHdr->Callsign); if (!mp) @@ -1876,12 +1816,12 @@ FGMultiplayMgr::FillMsgHdr(T_MsgHdr *MsgHdr, int MsgId, unsigned _len) len = sizeof(T_MsgHdr); break; } - MsgHdr->Magic = XDR_encode_uint32(MSG_MAGIC); - MsgHdr->Version = XDR_encode_uint32(PROTO_VER); - MsgHdr->MsgId = XDR_encode_uint32(MsgId); - MsgHdr->MsgLen = XDR_encode_uint32(len); - MsgHdr->MsgLen2 = 0; // Used to be ReplyAddress; repurposed with MP2017.x changes - MsgHdr->ReplyPort = 0; // now + MsgHdr->Magic = XDR_encode_uint32(MSG_MAGIC); + MsgHdr->Version = XDR_encode_uint32(PROTO_VER); + MsgHdr->MsgId = XDR_encode_uint32(MsgId); + MsgHdr->MsgLen = XDR_encode_uint32(len); + MsgHdr->RequestedRangeNm = XDR_encode_shortints32(0,pMultiPlayRange->getIntValue()); + MsgHdr->ReplyPort = 0; strncpy(MsgHdr->Callsign, mCallsign.c_str(), MAX_CALLSIGN_LEN); MsgHdr->Callsign[MAX_CALLSIGN_LEN - 1] = '\0'; } diff --git a/src/MultiPlayer/multiplaymgr.hxx b/src/MultiPlayer/multiplaymgr.hxx index acad23ac5..e778f5a53 100644 --- a/src/MultiPlayer/multiplaymgr.hxx +++ b/src/MultiPlayer/multiplaymgr.hxx @@ -74,14 +74,11 @@ private: } int getProtocolToUse() { - return mProtocolVersion; - } - void setProtocolToUse(int protocolVersion) - { - if (protocolVersion >= MIN_MP_PROTOCOL_VERSION && protocolVersion <= MAX_MP_PROTOCOL_VERSION) - mProtocolVersion = protocolVersion; - else - mProtocolVersion = MIN_MP_PROTOCOL_VERSION; + int protocolVersion = pProtocolVersion->getIntValue(); + if (protocolVersion >= MIN_MP_PROTOCOL_VERSION && protocolVersion <= MAX_MP_PROTOCOL_VERSION) + return protocolVersion; + else + return MIN_MP_PROTOCOL_VERSION; } void findProperties(); @@ -113,12 +110,15 @@ private: // and the property nodes typedef std::map > PropertyMap; PropertyMap mPropertyMap; + SGPropertyNode *pProtocolVersion; + SGPropertyNode *pXmitLen; + SGPropertyNode *pMultiPlayDebugLevel; + SGPropertyNode *pMultiPlayRange; typedef std::map PropertyDefinitionMap; PropertyDefinitionMap mPropertyDefinition; bool mPropertiesChanged; - int mProtocolVersion; MPPropertyListener* mListener; diff --git a/src/MultiPlayer/tiny_xdr.cxx b/src/MultiPlayer/tiny_xdr.cxx index e8f292141..5718ca882 100644 --- a/src/MultiPlayer/tiny_xdr.cxx +++ b/src/MultiPlayer/tiny_xdr.cxx @@ -73,6 +73,34 @@ XDR_encode_int32 ( const int32_t & n_Val ) return (SWAP32(static_cast (n_Val))); } +static short convert_int_to_short(int v1) +{ + if (v1 < -32767) + v1 = -32767; + + if (v1 > 32767) + v1 = 32767; + + return (short)v1; +} + +/* + * Pack two 16bit shorts into a 32 bit int. By convention v1 is packed in the highword + */ +xdr_data_t XDR_encode_shortints32(const int v1, const int v2) +{ + return XDR_encode_uint32( (convert_int_to_short(v1) << 16) | (convert_int_to_short(v2))); +} +/* Decode packed shorts into two ints. V1 in the highword ($V1..V2..)*/ +void XDR_decode_shortints32(const xdr_data_t & n_Val, int &v1, int &v2) +{ + int _v1 = XDR_decode_int32(n_Val); + short s2 = (short)(_v1 & 0xffff); + short s1 = (short)(_v1 >> 16); + v1 = s1; + v2 = s2; +} + xdr_data_t XDR_encode_uint32 ( const uint32_t & n_Val ) { diff --git a/src/MultiPlayer/tiny_xdr.hxx b/src/MultiPlayer/tiny_xdr.hxx index 7c66a8479..3161989ea 100644 --- a/src/MultiPlayer/tiny_xdr.hxx +++ b/src/MultiPlayer/tiny_xdr.hxx @@ -54,6 +54,9 @@ xdr_data2_t XDR_encode_uint64 ( const uint64_t & n_Val ); int64_t XDR_decode_int64 ( const xdr_data2_t & n_Val ); uint64_t XDR_decode_uint64 ( const xdr_data2_t & n_Val ); +xdr_data_t XDR_encode_shortints32(const int v1, const int v2); +void XDR_decode_shortints32(const xdr_data_t & n_Val, int &v1, int &v2); + ////////////////////////////////////////////////// // // FIXME: #1 these funtions must be fixed for