63 std::string file_name;
69 std::string postamble;
70 std::string var_separator;
71 std::string line_separator;
72 std::string var_sep_string;
73 std::string line_sep_string;
74 std::vector<_serial_prot> _out_message;
75 std::vector<_serial_prot> _in_message;
80 FOOTER_MAGIC } binary_footer_type;
81 int binary_footer_value;
82 int binary_record_length;
83 enum { BYTE_ORDER_NEEDS_CONVERSION,
84 BYTE_ORDER_MATCHES_NETWORK_ORDER } binary_byte_order;
86 bool gen_message_ascii();
87 bool gen_message_binary();
88 bool parse_message_ascii(
int length);
89 bool parse_message_binary(
int length);
90 bool read_config(SGPropertyNode* root, std::vector<_serial_prot>& msg);
94 class FGProtocolWrapper* wrapper;
97 static void updateValue(
_serial_prot& prot,
const T& val)
99 T new_val = (prot.rel ? getValue<T>(prot.prop) : 0) + prot.offset + prot.factor * val;
101 if (prot.max > prot.min) {
103 new_val = SGMisc<double>::normalizePeriodic(prot.min, prot.max, new_val);
105 new_val = SGMisc<T>::clip(new_val, prot.min, prot.max);
108 setValue(prot.prop, new_val);