Loading src/ConfigurationFile.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,6 @@ char* ConfigurationFile::getLine() throw(PacketExceptionIO*) char* ConfigurationFile::getLine(const char* s) throw(PacketExceptionIO*) { char* line; try { line = this->getLine(); Loading src/Field.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ #include "Field.h" #include "Utility.h" //#define DEBUG 1 using namespace PacketLib; static FieldType** filedTypeList = 0; Loading Loading @@ -92,7 +94,7 @@ Field::Field(std::string name, std::string typeStr, std::string dim, std::string type->dimension = atoi(dim.c_str()); type->type = Field::typeStringToEnum[typeStr]; #ifdef DEBUG std::cout << "Adding field '" << name << "' at index " << i << ", " << type->dimension << " bits type " << typeStr << " (" << type->type << ")" << std::endl; std::cout << "Adding field '" << name << "', " << type->dimension << " bits type " << typeStr << " (" << type->type << ")" << std::endl; #endif if(prVal.compare("none") != 0) Loading src/InputPacketStream.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ using namespace PacketLib; #undef DEBUG InputPacketStream::InputPacketStream() : PacketStream() { Loading src/Packet.cpp +0 −46 Original line number Diff line number Diff line Loading @@ -64,52 +64,6 @@ Packet::~Packet() delete[] identifiers; } const std::string fixed32[] = { "uint32", "int32", "float" }; const std::string fixed64[] = { "uint64", "int64", "double" }; void cachePhysicalIndexes(pugi::xml_node node, std::map<pugi::xml_node, int>& physicalIndex) { int index = 0; for(pugi::xml_node_iterator it=node.begin(); it != node.end(); ++it) { if(string(it->name()).compare("field") != 0) continue; physicalIndex[*it] = index; // if 32bits fields string typeStr = it->attribute("type").value(); bool found = false; for(unsigned int i=0; i<3; i++) { if(typeStr.compare(fixed32[i]) == 0) { index+=2; found = true; break; } } if(found) continue; // if 64bits fields for(unsigned int i=0; i<3; i++) { if(typeStr.compare(fixed64[i]) == 0) { index+=4; found = true; break; } } if(found) continue; // else (<= 16bits fields) index++; } } void Packet::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) { name = pNode.attribute("name").value(); Loading src/PacketStream.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -25,10 +25,6 @@ using namespace PacketLib; PacketStream::PacketStream(string fileNameConfig) { filenameConfig = realpath(fileNameConfig.c_str(), NULL); Loading Loading @@ -158,7 +154,9 @@ void PacketStream::cachePhysicalIndexes(pugi::xml_node node, std::map<pugi::xml_ { if(string(it->name()).compare("field") != 0) continue; #ifdef DEBUG std::cout << "Physical index of " << it->attribute("name").value() << " is " << index << std::endl; #endif physicalIndex[*it] = index; // if 32bits fields Loading Loading
src/ConfigurationFile.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,6 @@ char* ConfigurationFile::getLine() throw(PacketExceptionIO*) char* ConfigurationFile::getLine(const char* s) throw(PacketExceptionIO*) { char* line; try { line = this->getLine(); Loading
src/Field.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ #include "Field.h" #include "Utility.h" //#define DEBUG 1 using namespace PacketLib; static FieldType** filedTypeList = 0; Loading Loading @@ -92,7 +94,7 @@ Field::Field(std::string name, std::string typeStr, std::string dim, std::string type->dimension = atoi(dim.c_str()); type->type = Field::typeStringToEnum[typeStr]; #ifdef DEBUG std::cout << "Adding field '" << name << "' at index " << i << ", " << type->dimension << " bits type " << typeStr << " (" << type->type << ")" << std::endl; std::cout << "Adding field '" << name << "', " << type->dimension << " bits type " << typeStr << " (" << type->type << ")" << std::endl; #endif if(prVal.compare("none") != 0) Loading
src/InputPacketStream.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ using namespace PacketLib; #undef DEBUG InputPacketStream::InputPacketStream() : PacketStream() { Loading
src/Packet.cpp +0 −46 Original line number Diff line number Diff line Loading @@ -64,52 +64,6 @@ Packet::~Packet() delete[] identifiers; } const std::string fixed32[] = { "uint32", "int32", "float" }; const std::string fixed64[] = { "uint64", "int64", "double" }; void cachePhysicalIndexes(pugi::xml_node node, std::map<pugi::xml_node, int>& physicalIndex) { int index = 0; for(pugi::xml_node_iterator it=node.begin(); it != node.end(); ++it) { if(string(it->name()).compare("field") != 0) continue; physicalIndex[*it] = index; // if 32bits fields string typeStr = it->attribute("type").value(); bool found = false; for(unsigned int i=0; i<3; i++) { if(typeStr.compare(fixed32[i]) == 0) { index+=2; found = true; break; } } if(found) continue; // if 64bits fields for(unsigned int i=0; i<3; i++) { if(typeStr.compare(fixed64[i]) == 0) { index+=4; found = true; break; } } if(found) continue; // else (<= 16bits fields) index++; } } void Packet::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) { name = pNode.attribute("name").value(); Loading
src/PacketStream.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -25,10 +25,6 @@ using namespace PacketLib; PacketStream::PacketStream(string fileNameConfig) { filenameConfig = realpath(fileNameConfig.c_str(), NULL); Loading Loading @@ -158,7 +154,9 @@ void PacketStream::cachePhysicalIndexes(pugi::xml_node node, std::map<pugi::xml_ { if(string(it->name()).compare("field") != 0) continue; #ifdef DEBUG std::cout << "Physical index of " << it->attribute("name").value() << " is " << index << std::endl; #endif physicalIndex[*it] = index; // if 32bits fields Loading