X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNetwork%2Fgeneric.hxx;h=fbc146d5c2adfbec68b1cbb0bce1d6fe544c93ea;hb=b0dcb657e77579ecc79798ff365737095f96f9e2;hp=b3020a390273322af90da472026536ec476f0dd9;hpb=39307d335c3976fc459eff5cda401ef71332b8fc;p=flightgear.git diff --git a/src/Network/generic.hxx b/src/Network/generic.hxx index b3020a390..fbc146d5c 100644 --- a/src/Network/generic.hxx +++ b/src/Network/generic.hxx @@ -33,7 +33,6 @@ using std::string; - class FGGeneric : public FGProtocol { public: @@ -60,7 +59,7 @@ public: bool getInitOk(void) { return initOk; } protected: - enum e_type { FG_BOOL=0, FG_INT, FG_FLOAT, FG_DOUBLE, FG_STRING, FG_FIXED }; + enum e_type { FG_BOOL=0, FG_INT, FG_FLOAT, FG_DOUBLE, FG_STRING, FG_FIXED, FG_BYTE, FG_WORD }; typedef struct { // string name; @@ -101,9 +100,11 @@ private: bool gen_message_binary(); bool parse_message_ascii(int length); bool parse_message_binary(int length); - void read_config(SGPropertyNode *root, vector<_serial_prot> &msg); + bool read_config(SGPropertyNode *root, vector<_serial_prot> &msg); bool exitOnError; bool initOk; + + class FGProtocolWrapper * wrapper; template static void updateValue(_serial_prot& prot, const T& val)