1
0
Fork 0

CycloneDDS aparrently stopped supporting booleans

This commit is contained in:
Erik Hofman 2023-01-15 14:32:42 +01:00
parent 2be54f9eae
commit c872b8b4b2
12 changed files with 61 additions and 61 deletions

View file

@ -27,11 +27,11 @@ static const uint32_t FG_DDS_Ctrls_ops [] =
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, flaps),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, spoilers),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, speedbrake),
DDS_OP_ADR | DDS_OP_TYPE_BOO, offsetof (FG_DDS_Ctrls, flaps_power),
DDS_OP_ADR | DDS_OP_TYPE_BOO, offsetof (FG_DDS_Ctrls, flap_motor_ok),
DDS_OP_ADR | DDS_OP_TYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_Ctrls, flaps_power),
DDS_OP_ADR | DDS_OP_TYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_Ctrls, flap_motor_ok),
DDS_OP_ADR | DDS_OP_TYPE_2BY, offsetof (FG_DDS_Ctrls, num_engines),
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_BOO, offsetof (FG_DDS_Ctrls, master_bat), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_BOO, offsetof (FG_DDS_Ctrls, master_alt), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_Ctrls, master_bat), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_Ctrls, master_alt), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_4BY, offsetof (FG_DDS_Ctrls, magnetos), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_4BY, offsetof (FG_DDS_Ctrls, starter_power), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, throttle), 4,
@ -40,23 +40,23 @@ static const uint32_t FG_DDS_Ctrls_ops [] =
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_4BY, offsetof (FG_DDS_Ctrls, fuel_pump_power), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, prop_advance), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_2BY, offsetof (FG_DDS_Ctrls, feed_tank_to), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_BOO, offsetof (FG_DDS_Ctrls, reverse), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_BOO, offsetof (FG_DDS_Ctrls, engine_ok), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_BOO, offsetof (FG_DDS_Ctrls, mag_left_ok), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_BOO, offsetof (FG_DDS_Ctrls, mag_right_ok), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_BOO, offsetof (FG_DDS_Ctrls, spark_plugs_ok), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_Ctrls, reverse), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_Ctrls, engine_ok), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_Ctrls, mag_left_ok), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_Ctrls, mag_right_ok), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_Ctrls, spark_plugs_ok), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_2BY, offsetof (FG_DDS_Ctrls, oil_press_status), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_BOO, offsetof (FG_DDS_Ctrls, fuel_pump_ok), 4,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_Ctrls, fuel_pump_ok), 4,
DDS_OP_ADR | DDS_OP_TYPE_2BY, offsetof (FG_DDS_Ctrls, num_tanks),
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_2BY, offsetof (FG_DDS_Ctrls, fuel_selector), 8,
DDS_OP_ADR | DDS_OP_TYPE_BOO, offsetof (FG_DDS_Ctrls, cross_feed),
DDS_OP_ADR | DDS_OP_TYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_Ctrls, cross_feed),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, brake_left),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, brake_right),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, copilot_brake_left),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, copilot_brake_right),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, brake_parking),
DDS_OP_ADR | DDS_OP_TYPE_BOO, offsetof (FG_DDS_Ctrls, gear_handle),
DDS_OP_ADR | DDS_OP_TYPE_BOO, offsetof (FG_DDS_Ctrls, master_avionics),
DDS_OP_ADR | DDS_OP_TYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_Ctrls, gear_handle),
DDS_OP_ADR | DDS_OP_TYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_Ctrls, master_avionics),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, comm_1),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, comm_2),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, nav_1),
@ -68,7 +68,7 @@ static const uint32_t FG_DDS_Ctrls_ops [] =
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, press_inhg),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, hground),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_Ctrls, magvar),
DDS_OP_ADR | DDS_OP_TYPE_BOO, offsetof (FG_DDS_Ctrls, icing),
DDS_OP_ADR | DDS_OP_TYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_Ctrls, icing),
DDS_OP_ADR | DDS_OP_TYPE_4BY, offsetof (FG_DDS_Ctrls, speedup),
DDS_OP_ADR | DDS_OP_TYPE_2BY, offsetof (FG_DDS_Ctrls, freeze),
DDS_OP_RTS
@ -84,5 +84,5 @@ const dds_topic_descriptor_t FG_DDS_Ctrls_desc =
FG_DDS_Ctrls_keys,
56,
FG_DDS_Ctrls_ops,
"<MetaData version=\"1.0.0\"><Module name=\"FG\"><Struct name=\"DDS_Ctrls\"><Member name=\"id\"><Short/></Member><Member name=\"version\"><Short/></Member><Member name=\"aileron\"><Float/></Member><Member name=\"elevator\"><Float/></Member><Member name=\"rudder\"><Float/></Member><Member name=\"aileron_trim\"><Float/></Member><Member name=\"elevator_trim\"><Float/></Member><Member name=\"rudder_trim\"><Float/></Member><Member name=\"flaps\"><Float/></Member><Member name=\"spoilers\"><Float/></Member><Member name=\"speedbrake\"><Float/></Member><Member name=\"flaps_power\"><Boolean/></Member><Member name=\"flap_motor_ok\"><Boolean/></Member><Member name=\"num_engines\"><UShort/></Member><Member name=\"master_bat\"><Array size=\"4\"><Boolean/></Array></Member><Member name=\"master_alt\"><Array size=\"4\"><Boolean/></Array></Member><Member name=\"magnetos\"><Array size=\"4\"><ULong/></Array></Member><Member name=\"starter_power\"><Array size=\"4\"><ULong/></Array></Member><Member name=\"throttle\"><Array size=\"4\"><Float/></Array></Member><Member name=\"mixture\"><Array size=\"4\"><Float/></Array></Member><Member name=\"condition\"><Array size=\"4\"><Float/></Array></Member><Member name=\"fuel_pump_power\"><Array size=\"4\"><ULong/></Array></Member><Member name=\"prop_advance\"><Array size=\"4\"><Float/></Array></Member><Member name=\"feed_tank_to\"><Array size=\"4\"><UShort/></Array></Member><Member name=\"reverse\"><Array size=\"4\"><Boolean/></Array></Member><Member name=\"engine_ok\"><Array size=\"4\"><Boolean/></Array></Member><Member name=\"mag_left_ok\"><Array size=\"4\"><Boolean/></Array></Member><Member name=\"mag_right_ok\"><Array size=\"4\"><Boolean/></Array></Member><Member name=\"spark_plugs_ok\"><Array size=\"4\"><Boolean/></Array></Member><Member name=\"oil_press_status\"><Array size=\"4\"><UShort/></Array></Member><Member name=\"fuel_pump_ok\"><Array size=\"4\"><Boolean/></Array></Member><Member name=\"num_tanks\"><UShort/></Member><Member name=\"fuel_selector\"><Array size=\"8\"><UShort/></Array></Member><Member name=\"cross_feed\"><Boolean/></Member><Member name=\"brake_left\"><Float/></Member><Member name=\"brake_right\"><Float/></Member><Member name=\"copilot_brake_left\"><Float/></Member><Member name=\"copilot_brake_right\"><Float/></Member><Member name=\"brake_parking\"><Float/></Member><Member name=\"gear_handle\"><Boolean/></Member><Member name=\"master_avionics\"><Boolean/></Member><Member name=\"comm_1\"><Float/></Member><Member name=\"comm_2\"><Float/></Member><Member name=\"nav_1\"><Float/></Member><Member name=\"nav_2\"><Float/></Member><Member name=\"wind_speed_kt\"><Float/></Member><Member name=\"wind_dir_deg\"><Float/></Member><Member name=\"turbulence_norm\"><Float/></Member><Member name=\"temp_c\"><Float/></Member><Member name=\"press_inhg\"><Float/></Member><Member name=\"hground\"><Float/></Member><Member name=\"magvar\"><Float/></Member><Member name=\"icing\"><Boolean/></Member><Member name=\"speedup\"><ULong/></Member><Member name=\"freeze\"><UShort/></Member></Struct></Module></MetaData>"
"<MetaData version=\"1.0.0\"><Module name=\"FG\"><Struct name=\"DDS_Ctrls\"><Member name=\"id\"><Short/></Member><Member name=\"version\"><Short/></Member><Member name=\"aileron\"><Float/></Member><Member name=\"elevator\"><Float/></Member><Member name=\"rudder\"><Float/></Member><Member name=\"aileron_trim\"><Float/></Member><Member name=\"elevator_trim\"><Float/></Member><Member name=\"rudder_trim\"><Float/></Member><Member name=\"flaps\"><Float/></Member><Member name=\"spoilers\"><Float/></Member><Member name=\"speedbrake\"><Float/></Member><Member name=\"flaps_power\"><Char/></Member><Member name=\"flap_motor_ok\"><Char/></Member><Member name=\"num_engines\"><UShort/></Member><Member name=\"master_bat\"><Array size=\"4\"><Char/></Array></Member><Member name=\"master_alt\"><Array size=\"4\"><Char/></Array></Member><Member name=\"magnetos\"><Array size=\"4\"><ULong/></Array></Member><Member name=\"starter_power\"><Array size=\"4\"><ULong/></Array></Member><Member name=\"throttle\"><Array size=\"4\"><Float/></Array></Member><Member name=\"mixture\"><Array size=\"4\"><Float/></Array></Member><Member name=\"condition\"><Array size=\"4\"><Float/></Array></Member><Member name=\"fuel_pump_power\"><Array size=\"4\"><ULong/></Array></Member><Member name=\"prop_advance\"><Array size=\"4\"><Float/></Array></Member><Member name=\"feed_tank_to\"><Array size=\"4\"><UShort/></Array></Member><Member name=\"reverse\"><Array size=\"4\"><Char/></Array></Member><Member name=\"engine_ok\"><Array size=\"4\"><Char/></Array></Member><Member name=\"mag_left_ok\"><Array size=\"4\"><Char/></Array></Member><Member name=\"mag_right_ok\"><Array size=\"4\"><Char/></Array></Member><Member name=\"spark_plugs_ok\"><Array size=\"4\"><Char/></Array></Member><Member name=\"oil_press_status\"><Array size=\"4\"><UShort/></Array></Member><Member name=\"fuel_pump_ok\"><Array size=\"4\"><Char/></Array></Member><Member name=\"num_tanks\"><UShort/></Member><Member name=\"fuel_selector\"><Array size=\"8\"><UShort/></Array></Member><Member name=\"cross_feed\"><Char/></Member><Member name=\"brake_left\"><Float/></Member><Member name=\"brake_right\"><Float/></Member><Member name=\"copilot_brake_left\"><Float/></Member><Member name=\"copilot_brake_right\"><Float/></Member><Member name=\"brake_parking\"><Float/></Member><Member name=\"gear_handle\"><Char/></Member><Member name=\"master_avionics\"><Char/></Member><Member name=\"comm_1\"><Float/></Member><Member name=\"comm_2\"><Float/></Member><Member name=\"nav_1\"><Float/></Member><Member name=\"nav_2\"><Float/></Member><Member name=\"wind_speed_kt\"><Float/></Member><Member name=\"wind_dir_deg\"><Float/></Member><Member name=\"turbulence_norm\"><Float/></Member><Member name=\"temp_c\"><Float/></Member><Member name=\"press_inhg\"><Float/></Member><Member name=\"hground\"><Float/></Member><Member name=\"magvar\"><Float/></Member><Member name=\"icing\"><Char/></Member><Member name=\"speedup\"><ULong/></Member><Member name=\"freeze\"><UShort/></Member></Struct></Module></MetaData>"
};

View file

@ -36,11 +36,11 @@ typedef struct FG_DDS_Ctrls
float flaps;
float spoilers;
float speedbrake;
bool flaps_power;
bool flap_motor_ok;
char flaps_power;
char flap_motor_ok;
uint16_t num_engines;
bool master_bat[4];
bool master_alt[4];
char master_bat[4];
char master_alt[4];
uint32_t magnetos[4];
uint32_t starter_power[4];
float throttle[4];
@ -49,23 +49,23 @@ typedef struct FG_DDS_Ctrls
uint32_t fuel_pump_power[4];
float prop_advance[4];
uint16_t feed_tank_to[4];
bool reverse[4];
bool engine_ok[4];
bool mag_left_ok[4];
bool mag_right_ok[4];
bool spark_plugs_ok[4];
char reverse[4];
char engine_ok[4];
char mag_left_ok[4];
char mag_right_ok[4];
char spark_plugs_ok[4];
uint16_t oil_press_status[4];
bool fuel_pump_ok[4];
char fuel_pump_ok[4];
uint16_t num_tanks;
uint16_t fuel_selector[8];
bool cross_feed;
char cross_feed;
float brake_left;
float brake_right;
float copilot_brake_left;
float copilot_brake_right;
float brake_parking;
bool gear_handle;
bool master_avionics;
char gear_handle;
char master_avionics;
float comm_1;
float comm_2;
float nav_1;
@ -77,7 +77,7 @@ typedef struct FG_DDS_Ctrls
float press_inhg;
float hground;
float magvar;
bool icing;
char icing;
uint32_t speedup;
uint16_t freeze;
} FG_DDS_Ctrls;

View file

@ -30,13 +30,13 @@ struct DDS_Ctrls
float speedbrake;
// Aero control faults
boolean flaps_power; // true = power available
boolean flap_motor_ok;
char flaps_power; // true = power available
char flap_motor_ok;
// Engine controls
unsigned short num_engines; // number of valid engines
boolean master_bat[DDS_ENGINES];
boolean master_alt[DDS_ENGINES];
char master_bat[DDS_ENGINES];
char master_alt[DDS_ENGINES];
unsigned long magnetos[DDS_ENGINES];
unsigned long starter_power[DDS_ENGINES]; // true = starter power
float throttle[DDS_ENGINES]; // 0 ... 1
@ -45,16 +45,16 @@ struct DDS_Ctrls
unsigned long fuel_pump_power[DDS_ENGINES]; // true = on
float prop_advance[DDS_ENGINES]; // 0 ... 1
unsigned short feed_tank_to[4];
boolean reverse[4];
char reverse[4];
// Engine faults
boolean engine_ok[DDS_ENGINES];
boolean mag_left_ok[DDS_ENGINES];
boolean mag_right_ok[DDS_ENGINES];
boolean spark_plugs_ok[DDS_ENGINES]; // false = fouled plugs
char engine_ok[DDS_ENGINES];
char mag_left_ok[DDS_ENGINES];
char mag_right_ok[DDS_ENGINES];
char spark_plugs_ok[DDS_ENGINES]; // false = fouled plugs
unsigned short oil_press_status[DDS_ENGINES];// 0 = normal, 1 = low, 2 = full fail
boolean fuel_pump_ok[DDS_ENGINES];
char fuel_pump_ok[DDS_ENGINES];
// Fuel management
unsigned short num_tanks; // number of valid tanks
@ -62,7 +62,7 @@ struct DDS_Ctrls
// unsigned short xfer_pump[5]; // specifies transfer from array
// value tank to tank specified
// by int value
boolean cross_feed; // false = off, true = on
char cross_feed; // false = off, true = on
// Brake controls
float brake_left;
@ -72,10 +72,10 @@ struct DDS_Ctrls
float brake_parking;
// Landing Gear
boolean gear_handle; // true=gear handle down; false= gear handle up
char gear_handle; // true=gear handle down; false= gear handle up
// Switches
boolean master_avionics;
char master_avionics;
// nav and Comm
float comm_1;
@ -97,7 +97,7 @@ struct DDS_Ctrls
float magvar; // local magnetic variation in degs.
// hazards
boolean icing; // icing status could me much
char icing; // icing status could me much
// more complex but I'm
// starting simple here.

View file

@ -56,7 +56,7 @@ static const uint32_t FG_DDS_FDM_ops [] =
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_FDM, oil_px), 4,
DDS_OP_ADR | DDS_OP_TYPE_2BY, offsetof (FG_DDS_FDM, num_tanks),
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_FDM, fuel_quantity), 8,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_BOO, offsetof (FG_DDS_FDM, tank_selected), 8,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_FDM, tank_selected), 8,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_FDM, capacity_m3), 8,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_FDM, unusable_m3), 8,
DDS_OP_ADR | DDS_OP_TYPE_ARR | DDS_OP_SUBTYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_FDM, density_kgpm3), 8,
@ -92,5 +92,5 @@ const dds_topic_descriptor_t FG_DDS_FDM_desc =
FG_DDS_FDM_keys,
64,
FG_DDS_FDM_ops,
"<MetaData version=\"1.0.0\"><Module name=\"FG\"><Struct name=\"DDS_FDM\"><Member name=\"id\"><Short/></Member><Member name=\"version\"><Short/></Member><Member name=\"longitude\"><Double/></Member><Member name=\"latitude\"><Double/></Member><Member name=\"altitude\"><Double/></Member><Member name=\"agl\"><Float/></Member><Member name=\"phi\"><Float/></Member><Member name=\"theta\"><Float/></Member><Member name=\"psi\"><Float/></Member><Member name=\"alpha\"><Float/></Member><Member name=\"beta\"><Float/></Member><Member name=\"phidot\"><Float/></Member><Member name=\"thetadot\"><Float/></Member><Member name=\"psidot\"><Float/></Member><Member name=\"vcas\"><Float/></Member><Member name=\"climb_rate\"><Float/></Member><Member name=\"v_north\"><Float/></Member><Member name=\"v_east\"><Float/></Member><Member name=\"v_down\"><Float/></Member><Member name=\"v_body_u\"><Float/></Member><Member name=\"v_body_v\"><Float/></Member><Member name=\"v_body_w\"><Float/></Member><Member name=\"A_X_pilot\"><Float/></Member><Member name=\"A_Y_pilot\"><Float/></Member><Member name=\"A_Z_pilot\"><Float/></Member><Member name=\"stall_warning\"><Float/></Member><Member name=\"slip_deg\"><Float/></Member><Member name=\"num_engines\"><UShort/></Member><Member name=\"eng_state\"><Array size=\"4\"><UShort/></Array></Member><Member name=\"rpm\"><Array size=\"4\"><Float/></Array></Member><Member name=\"fuel_flow\"><Array size=\"4\"><Float/></Array></Member><Member name=\"fuel_px\"><Array size=\"4\"><Float/></Array></Member><Member name=\"egt\"><Array size=\"4\"><Float/></Array></Member><Member name=\"cht\"><Array size=\"4\"><Float/></Array></Member><Member name=\"mp_osi\"><Array size=\"4\"><Float/></Array></Member><Member name=\"tit\"><Array size=\"4\"><Float/></Array></Member><Member name=\"oil_temp\"><Array size=\"4\"><Float/></Array></Member><Member name=\"oil_px\"><Array size=\"4\"><Float/></Array></Member><Member name=\"num_tanks\"><UShort/></Member><Member name=\"fuel_quantity\"><Array size=\"8\"><Float/></Array></Member><Member name=\"tank_selected\"><Array size=\"8\"><Boolean/></Array></Member><Member name=\"capacity_m3\"><Array size=\"8\"><Float/></Array></Member><Member name=\"unusable_m3\"><Array size=\"8\"><Float/></Array></Member><Member name=\"density_kgpm3\"><Array size=\"8\"><Float/></Array></Member><Member name=\"level_m3\"><Array size=\"8\"><Float/></Array></Member><Member name=\"num_wheels\"><UShort/></Member><Member name=\"wow\"><Array size=\"16\"><UShort/></Array></Member><Member name=\"gear_pos\"><Array size=\"16\"><Float/></Array></Member><Member name=\"gear_steer\"><Array size=\"16\"><Float/></Array></Member><Member name=\"gear_compression\"><Array size=\"16\"><Float/></Array></Member><Member name=\"cur_time\"><ULongLong/></Member><Member name=\"warp\"><ULongLong/></Member><Member name=\"visibility\"><Float/></Member><Member name=\"elevator\"><Float/></Member><Member name=\"elevator_trim_tab\"><Float/></Member><Member name=\"left_flap\"><Float/></Member><Member name=\"right_flap\"><Float/></Member><Member name=\"left_aileron\"><Float/></Member><Member name=\"right_aileron\"><Float/></Member><Member name=\"rudder\"><Float/></Member><Member name=\"nose_wheel\"><Float/></Member><Member name=\"speedbrake\"><Float/></Member><Member name=\"spoilers\"><Float/></Member></Struct></Module></MetaData>"
"<MetaData version=\"1.0.0\"><Module name=\"FG\"><Struct name=\"DDS_FDM\"><Member name=\"id\"><Short/></Member><Member name=\"version\"><Short/></Member><Member name=\"longitude\"><Double/></Member><Member name=\"latitude\"><Double/></Member><Member name=\"altitude\"><Double/></Member><Member name=\"agl\"><Float/></Member><Member name=\"phi\"><Float/></Member><Member name=\"theta\"><Float/></Member><Member name=\"psi\"><Float/></Member><Member name=\"alpha\"><Float/></Member><Member name=\"beta\"><Float/></Member><Member name=\"phidot\"><Float/></Member><Member name=\"thetadot\"><Float/></Member><Member name=\"psidot\"><Float/></Member><Member name=\"vcas\"><Float/></Member><Member name=\"climb_rate\"><Float/></Member><Member name=\"v_north\"><Float/></Member><Member name=\"v_east\"><Float/></Member><Member name=\"v_down\"><Float/></Member><Member name=\"v_body_u\"><Float/></Member><Member name=\"v_body_v\"><Float/></Member><Member name=\"v_body_w\"><Float/></Member><Member name=\"A_X_pilot\"><Float/></Member><Member name=\"A_Y_pilot\"><Float/></Member><Member name=\"A_Z_pilot\"><Float/></Member><Member name=\"stall_warning\"><Float/></Member><Member name=\"slip_deg\"><Float/></Member><Member name=\"num_engines\"><UShort/></Member><Member name=\"eng_state\"><Array size=\"4\"><UShort/></Array></Member><Member name=\"rpm\"><Array size=\"4\"><Float/></Array></Member><Member name=\"fuel_flow\"><Array size=\"4\"><Float/></Array></Member><Member name=\"fuel_px\"><Array size=\"4\"><Float/></Array></Member><Member name=\"egt\"><Array size=\"4\"><Float/></Array></Member><Member name=\"cht\"><Array size=\"4\"><Float/></Array></Member><Member name=\"mp_osi\"><Array size=\"4\"><Float/></Array></Member><Member name=\"tit\"><Array size=\"4\"><Float/></Array></Member><Member name=\"oil_temp\"><Array size=\"4\"><Float/></Array></Member><Member name=\"oil_px\"><Array size=\"4\"><Float/></Array></Member><Member name=\"num_tanks\"><UShort/></Member><Member name=\"fuel_quantity\"><Array size=\"8\"><Float/></Array></Member><Member name=\"tank_selected\"><Array size=\"8\"><Char/></Array></Member><Member name=\"capacity_m3\"><Array size=\"8\"><Float/></Array></Member><Member name=\"unusable_m3\"><Array size=\"8\"><Float/></Array></Member><Member name=\"density_kgpm3\"><Array size=\"8\"><Float/></Array></Member><Member name=\"level_m3\"><Array size=\"8\"><Float/></Array></Member><Member name=\"num_wheels\"><UShort/></Member><Member name=\"wow\"><Array size=\"16\"><UShort/></Array></Member><Member name=\"gear_pos\"><Array size=\"16\"><Float/></Array></Member><Member name=\"gear_steer\"><Array size=\"16\"><Float/></Array></Member><Member name=\"gear_compression\"><Array size=\"16\"><Float/></Array></Member><Member name=\"cur_time\"><ULongLong/></Member><Member name=\"warp\"><ULongLong/></Member><Member name=\"visibility\"><Float/></Member><Member name=\"elevator\"><Float/></Member><Member name=\"elevator_trim_tab\"><Float/></Member><Member name=\"left_flap\"><Float/></Member><Member name=\"right_flap\"><Float/></Member><Member name=\"left_aileron\"><Float/></Member><Member name=\"right_aileron\"><Float/></Member><Member name=\"rudder\"><Float/></Member><Member name=\"nose_wheel\"><Float/></Member><Member name=\"speedbrake\"><Float/></Member><Member name=\"spoilers\"><Float/></Member></Struct></Module></MetaData>"
};

View file

@ -65,7 +65,7 @@ typedef struct FG_DDS_FDM
float oil_px[4];
uint16_t num_tanks;
float fuel_quantity[8];
bool tank_selected[8];
char tank_selected[8];
float capacity_m3[8];
float unusable_m3[8];
float density_kgpm3[8];

View file

@ -70,7 +70,7 @@ struct DDS_FDM
// Consumables
unsigned short num_tanks; // Max number of fuel tanks
float fuel_quantity[DDS_TANKS]; // used by GPSsmooth and possibly others
boolean tank_selected[DDS_TANKS]; // selected, capacity, usable, density and level required for multiple-pc setups to work
char tank_selected[DDS_TANKS]; // selected, capacity, usable, density and level required for multiple-pc setups to work
float capacity_m3[DDS_TANKS];
float unusable_m3[DDS_TANKS];
float density_kgpm3[DDS_TANKS];

View file

@ -34,7 +34,7 @@ static const uint32_t FG_DDS_GUI_ops [] =
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_GUI, ground_elev),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_GUI, tuned_freq),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_GUI, nav_radial),
DDS_OP_ADR | DDS_OP_TYPE_BOO, offsetof (FG_DDS_GUI, in_range),
DDS_OP_ADR | DDS_OP_TYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_GUI, in_range),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_GUI, dist_nm),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_GUI, course_deviation_deg),
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_FP, offsetof (FG_DDS_GUI, gs_deviation_deg),
@ -51,5 +51,5 @@ const dds_topic_descriptor_t FG_DDS_GUI_desc =
FG_DDS_GUI_keys,
23,
FG_DDS_GUI_ops,
"<MetaData version=\"1.0.0\"><Module name=\"FG\"><Struct name=\"DDS_GUI\"><Member name=\"id\"><Short/></Member><Member name=\"version\"><Short/></Member><Member name=\"longitude\"><Double/></Member><Member name=\"latitude\"><Double/></Member><Member name=\"altitude\"><Float/></Member><Member name=\"agl\"><Float/></Member><Member name=\"phi\"><Float/></Member><Member name=\"theta\"><Float/></Member><Member name=\"psi\"><Float/></Member><Member name=\"vcas\"><Float/></Member><Member name=\"climb_rate\"><Float/></Member><Member name=\"num_tanks\"><UShort/></Member><Member name=\"fuel_quantity\"><Array size=\"8\"><Float/></Array></Member><Member name=\"cur_time\"><ULongLong/></Member><Member name=\"warp\"><ULongLong/></Member><Member name=\"ground_elev\"><Float/></Member><Member name=\"tuned_freq\"><Float/></Member><Member name=\"nav_radial\"><Float/></Member><Member name=\"in_range\"><Boolean/></Member><Member name=\"dist_nm\"><Float/></Member><Member name=\"course_deviation_deg\"><Float/></Member><Member name=\"gs_deviation_deg\"><Float/></Member></Struct></Module></MetaData>"
"<MetaData version=\"1.0.0\"><Module name=\"FG\"><Struct name=\"DDS_GUI\"><Member name=\"id\"><Short/></Member><Member name=\"version\"><Short/></Member><Member name=\"longitude\"><Double/></Member><Member name=\"latitude\"><Double/></Member><Member name=\"altitude\"><Float/></Member><Member name=\"agl\"><Float/></Member><Member name=\"phi\"><Float/></Member><Member name=\"theta\"><Float/></Member><Member name=\"psi\"><Float/></Member><Member name=\"vcas\"><Float/></Member><Member name=\"climb_rate\"><Float/></Member><Member name=\"num_tanks\"><UShort/></Member><Member name=\"fuel_quantity\"><Array size=\"8\"><Float/></Array></Member><Member name=\"cur_time\"><ULongLong/></Member><Member name=\"warp\"><ULongLong/></Member><Member name=\"ground_elev\"><Float/></Member><Member name=\"tuned_freq\"><Float/></Member><Member name=\"nav_radial\"><Float/></Member><Member name=\"in_range\"><Char/></Member><Member name=\"dist_nm\"><Float/></Member><Member name=\"course_deviation_deg\"><Float/></Member><Member name=\"gs_deviation_deg\"><Float/></Member></Struct></Module></MetaData>"
};

View file

@ -41,7 +41,7 @@ typedef struct FG_DDS_GUI
float ground_elev;
float tuned_freq;
float nav_radial;
bool in_range;
char in_range;
float dist_nm;
float course_deviation_deg;
float gs_deviation_deg;

View file

@ -44,7 +44,7 @@ struct DDS_GUI
// Approach
float tuned_freq; // currently tuned frequency
float nav_radial; // target nav radial
boolean in_range; // tuned navaid is in range?
char in_range; // tuned navaid is in range?
float dist_nm; // distance to tuned navaid in nautical miles
float course_deviation_deg; // degrees off target course
float gs_deviation_deg; // degrees off target glide slope

View file

@ -18,9 +18,9 @@ static const uint32_t FG_DDS_prop_ops [] =
{
DDS_OP_ADR | DDS_OP_TYPE_4BY | DDS_OP_FLAG_SGN | DDS_OP_FLAG_KEY, offsetof (FG_DDS_prop, id),
DDS_OP_ADR | DDS_OP_TYPE_1BY, offsetof (FG_DDS_prop, version),
DDS_OP_ADR | DDS_OP_TYPE_BOO, offsetof (FG_DDS_prop, mode),
DDS_OP_ADR | DDS_OP_TYPE_1BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_prop, mode),
DDS_OP_ADR | DDS_OP_TYPE_UNI | DDS_OP_SUBTYPE_4BY | DDS_OP_FLAG_SGN, offsetof (FG_DDS_prop, val._d), 9u, (31u << 16) + 4u,
DDS_OP_JEQ | DDS_OP_TYPE_BOO | 0, FG_DDS_BOOL, offsetof (FG_DDS_prop, val._u.Bool),
DDS_OP_JEQ | DDS_OP_TYPE_1BY | DDS_OP_FLAG_SGN | 0, FG_DDS_BOOL, offsetof (FG_DDS_prop, val._u.Bool),
DDS_OP_JEQ | DDS_OP_TYPE_4BY | DDS_OP_FLAG_SGN | 0, FG_DDS_NONE, offsetof (FG_DDS_prop, val._u.Int32),
DDS_OP_JEQ | DDS_OP_TYPE_4BY | DDS_OP_FLAG_SGN | 0, FG_DDS_INT, offsetof (FG_DDS_prop, val._u.Int32),
DDS_OP_JEQ | DDS_OP_TYPE_8BY | DDS_OP_FLAG_SGN | 0, FG_DDS_LONG, offsetof (FG_DDS_prop, val._u.Int64),
@ -43,5 +43,5 @@ const dds_topic_descriptor_t FG_DDS_prop_desc =
FG_DDS_prop_keys,
15,
FG_DDS_prop_ops,
"<MetaData version=\"1.0.0\"><Module name=\"FG\"><Enum name=\"propType\"><Element name=\"DDS_NONE\" value=\"0\"/><Element name=\"DDS_ALIAS\" value=\"1\"/><Element name=\"DDS_BOOL\" value=\"2\"/><Element name=\"DDS_INT\" value=\"3\"/><Element name=\"DDS_LONG\" value=\"4\"/><Element name=\"DDS_FLOAT\" value=\"5\"/><Element name=\"DDS_DOUBLE\" value=\"6\"/><Element name=\"DDS_STRING\" value=\"7\"/><Element name=\"DDS_UNSPECIFIED\" value=\"8\"/></Enum><Union name=\"propValue\"><SwitchType><Type name=\"propType\"/></SwitchType><Case name=\"Bool\"><Boolean/><Label value=\"DDS_BOOL\"/></Case><Case name=\"Int32\"><Long/><Label value=\"DDS_NONE\"/><Label value=\"DDS_INT\"/></Case><Case name=\"Int64\"><LongLong/><Label value=\"DDS_LONG\"/></Case><Case name=\"Float32\"><Float/><Label value=\"DDS_FLOAT\"/></Case><Case name=\"Float64\"><Double/><Label value=\"DDS_DOUBLE\"/></Case><Case name=\"String\"><String/><Label value=\"DDS_ALIAS\"/><Label value=\"DDS_STRING\"/><Label value=\"DDS_UNSPECIFIED\"/></Case></Union><Struct name=\"DDS_prop\"><Member name=\"id\"><Long/></Member><Member name=\"version\"><Octet/></Member><Member name=\"mode\"><Boolean/></Member><Member name=\"val\"><Type name=\"propValue\"/></Member><Member name=\"guid\"><Array size=\"16\"><Octet/></Array></Member></Struct></Module></MetaData>"
"<MetaData version=\"1.0.0\"><Module name=\"FG\"><Enum name=\"propType\"><Element name=\"DDS_NONE\" value=\"0\"/><Element name=\"DDS_ALIAS\" value=\"1\"/><Element name=\"DDS_BOOL\" value=\"2\"/><Element name=\"DDS_INT\" value=\"3\"/><Element name=\"DDS_LONG\" value=\"4\"/><Element name=\"DDS_FLOAT\" value=\"5\"/><Element name=\"DDS_DOUBLE\" value=\"6\"/><Element name=\"DDS_STRING\" value=\"7\"/><Element name=\"DDS_UNSPECIFIED\" value=\"8\"/></Enum><Union name=\"propValue\"><SwitchType><Type name=\"propType\"/></SwitchType><Case name=\"Bool\"><Char/><Label value=\"DDS_BOOL\"/></Case><Case name=\"Int32\"><Long/><Label value=\"DDS_NONE\"/><Label value=\"DDS_INT\"/></Case><Case name=\"Int64\"><LongLong/><Label value=\"DDS_LONG\"/></Case><Case name=\"Float32\"><Float/><Label value=\"DDS_FLOAT\"/></Case><Case name=\"Float64\"><Double/><Label value=\"DDS_DOUBLE\"/></Case><Case name=\"String\"><String/><Label value=\"DDS_ALIAS\"/><Label value=\"DDS_STRING\"/><Label value=\"DDS_UNSPECIFIED\"/></Case></Union><Struct name=\"DDS_prop\"><Member name=\"id\"><Long/></Member><Member name=\"version\"><Octet/></Member><Member name=\"mode\"><Char/></Member><Member name=\"val\"><Type name=\"propValue\"/></Member><Member name=\"guid\"><Array size=\"16\"><Octet/></Array></Member></Struct></Module></MetaData>"
};

View file

@ -43,7 +43,7 @@ typedef struct FG_propValue
FG_propType _d;
union
{
bool Bool;
char Bool;
int32_t Int32;
int64_t Int64;
float Float32;
@ -60,7 +60,7 @@ typedef struct FG_DDS_prop
{
int32_t id;
uint8_t version;
bool mode;
char mode;
FG_propValue val;
uint8_t guid[16];
} FG_DDS_prop;

View file

@ -7,8 +7,8 @@ module FG
// defining it this way also generates accompanying #defines in the header file.
const octet DDS_PROP_VERSION = 0;
const short DDS_PROP_REQUEST = -1;
const boolean DDS_MODE_READ = 0;
const boolean DDS_MODE_WRITE = 1;
const char DDS_MODE_READ = 0;
const char DDS_MODE_WRITE = 1;
enum propType
{
@ -26,7 +26,7 @@ enum propType
union propValue switch ( propType )
{
case DDS_BOOL:
boolean Bool;
char Bool;
case DDS_NONE:
case DDS_INT:
@ -52,7 +52,7 @@ union propValue switch ( propType )
// 1. Set id to FG_DDS_PROP_REQUEST
// 2. Set version to FG_DDS_PROP_VERSION
// 3. Set mode to FG_DDS_MODE_READ
// 4. set guid to the 16-byte participants GUID
// 4. set guid to the 16-char participants GUID
// 5. Set val type to FG_DDS_STRING
// 6. Set val String to the propery path
// 7. Send the package.
@ -78,7 +78,7 @@ struct DDS_prop
long id; // 32-bit property index and DDS id.
octet version; // 8-bit sample-type version number.
boolean mode; // FG_DDS_MODE_READ or FG_DDS_MODE_WRITE
char mode; // FG_DDS_MODE_READ or FG_DDS_MODE_WRITE
propValue val; // property value or path.
// A sequence could be used here but unfortunatelly it's initializer