Loading include/Field.h +11 −4 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #define _FIELD_H_H #include "PacketLibDefinition.h" #include <string> namespace PacketLib { Loading @@ -42,7 +43,7 @@ public: int predefinedValue; /// Name of the field. char* name; std::string name; /// Logical type - NOT USED FOR NOW enum LogicalFieldDataType type; Loading @@ -56,7 +57,7 @@ class Field public: /// Constructor of class. Field(char* name, char* dimension, char* predefinedValue, int progressiv); Field(std::string name, std::string dimension, std::string predefinedValue, int progressiv); /// Destructor of class. ~Field(); Loading @@ -83,11 +84,17 @@ public: }; /// Name of the field. inline char* getName() std::string getName() { return type->name; return type->name.c_str(); }; /// Return the logical field data type. LogicalFieldDataType getType() { return type->type; } inline int getProgressiv() { return progressiv; Loading include/Packet.h +8 −6 Original line number Diff line number Diff line Loading @@ -55,6 +55,8 @@ public: /// Distruttore virtual ~Packet(); void createPacketType(pugi::xml_document& doc, pugi::xml_node hNode, int plPhysicalIndex, int plSize, pugi::xml_node pNode, bool isprefix, word dimprefix, std::map<pugi::xml_node, int>& physicalIndex); virtual bool createPacketType(char* fileName, bool prefix, word dimprefix) throw (PacketException*); /// Decode the packet Loading Loading @@ -174,16 +176,16 @@ public: ByteStreamPtr getOutputStream(); /// Gets the name of packet. virtual char* getName() virtual const char* getName() { return name; return (char*) name.c_str(); } /// The name of the file .packet that contains the structure of the packet virtual char* getFileName() virtual const char* getFileName() { return filename; return filename.c_str(); } Loading Loading @@ -289,7 +291,7 @@ protected: byte packetID; /// The name of the packet char* name; std::string name; /// List of identifiers. This identifiers permits to identify if the stream contains /// a particular type of packet Loading Loading @@ -319,7 +321,7 @@ protected: bool thereisprefix; /// The name of the file .packet that contains the structure of the packet char* filename; std::string filename; private: Loading include/PacketBufferQ.h +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ namespace PacketLib { class PacketBufferQ { public: PacketBufferQ(const string& configFile, const string& inputFile); PacketBufferQ(string configFile, string inputFile); ~PacketBufferQ(); Loading include/PacketBufferV.h +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ class PacketBufferV { public: PacketBufferV(const string& configFile, const string& inputFile); PacketBufferV(string configFile, string inputFile); ~PacketBufferV(); Loading include/PacketHeader.h +2 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ public: name = n; }; void loadHeader(pugi::xml_node hNode, int plPhysicalIndex, int plSize); /// Loads data header from configuration file. bool loadHeader(char* fileName) throw(PacketException*); Loading Loading
include/Field.h +11 −4 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #define _FIELD_H_H #include "PacketLibDefinition.h" #include <string> namespace PacketLib { Loading @@ -42,7 +43,7 @@ public: int predefinedValue; /// Name of the field. char* name; std::string name; /// Logical type - NOT USED FOR NOW enum LogicalFieldDataType type; Loading @@ -56,7 +57,7 @@ class Field public: /// Constructor of class. Field(char* name, char* dimension, char* predefinedValue, int progressiv); Field(std::string name, std::string dimension, std::string predefinedValue, int progressiv); /// Destructor of class. ~Field(); Loading @@ -83,11 +84,17 @@ public: }; /// Name of the field. inline char* getName() std::string getName() { return type->name; return type->name.c_str(); }; /// Return the logical field data type. LogicalFieldDataType getType() { return type->type; } inline int getProgressiv() { return progressiv; Loading
include/Packet.h +8 −6 Original line number Diff line number Diff line Loading @@ -55,6 +55,8 @@ public: /// Distruttore virtual ~Packet(); void createPacketType(pugi::xml_document& doc, pugi::xml_node hNode, int plPhysicalIndex, int plSize, pugi::xml_node pNode, bool isprefix, word dimprefix, std::map<pugi::xml_node, int>& physicalIndex); virtual bool createPacketType(char* fileName, bool prefix, word dimprefix) throw (PacketException*); /// Decode the packet Loading Loading @@ -174,16 +176,16 @@ public: ByteStreamPtr getOutputStream(); /// Gets the name of packet. virtual char* getName() virtual const char* getName() { return name; return (char*) name.c_str(); } /// The name of the file .packet that contains the structure of the packet virtual char* getFileName() virtual const char* getFileName() { return filename; return filename.c_str(); } Loading Loading @@ -289,7 +291,7 @@ protected: byte packetID; /// The name of the packet char* name; std::string name; /// List of identifiers. This identifiers permits to identify if the stream contains /// a particular type of packet Loading Loading @@ -319,7 +321,7 @@ protected: bool thereisprefix; /// The name of the file .packet that contains the structure of the packet char* filename; std::string filename; private: Loading
include/PacketBufferQ.h +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ namespace PacketLib { class PacketBufferQ { public: PacketBufferQ(const string& configFile, const string& inputFile); PacketBufferQ(string configFile, string inputFile); ~PacketBufferQ(); Loading
include/PacketBufferV.h +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ class PacketBufferV { public: PacketBufferV(const string& configFile, const string& inputFile); PacketBufferV(string configFile, string inputFile); ~PacketBufferV(); Loading
include/PacketHeader.h +2 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ public: name = n; }; void loadHeader(pugi::xml_node hNode, int plPhysicalIndex, int plSize); /// Loads data header from configuration file. bool loadHeader(char* fileName) throw(PacketException*); Loading