00001 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*- 00002 00003 // -- BEGIN LICENSE BLOCK ---------------------------------------------- 00004 00024 // -- END LICENSE BLOCK ------------------------------------------------ 00025 00026 //---------------------------------------------------------------------- 00033 //---------------------------------------------------------------------- 00034 00035 #ifndef SICK_SAFETYSCANNERS_DATA_PROCESSING_PARSEFIELDGEOMETRYDATA_H 00036 #define SICK_SAFETYSCANNERS_DATA_PROCESSING_PARSEFIELDGEOMETRYDATA_H 00037 00038 #include <sick_safetyscanners/datastructure/Data.h> 00039 #include <sick_safetyscanners/datastructure/FieldData.h> 00040 #include <sick_safetyscanners/datastructure/PacketBuffer.h> 00041 00042 #include <sick_safetyscanners/data_processing/ReadWriteHelper.h> 00043 00044 #include <vector> 00045 00046 namespace sick { 00047 00048 namespace data_processing { 00049 00050 00054 class ParseFieldGeometryData 00055 { 00056 public: 00060 ParseFieldGeometryData(); 00061 00071 bool parseTCPSequence(const datastructure::PacketBuffer& buffer, 00072 datastructure::FieldData& field_data) const; 00073 00074 private: 00075 std::shared_ptr<sick::data_processing::ReadWriteHelper> m_reader_ptr; 00076 uint32_t readArrayLength(const uint8_t*& data_ptr) const; 00077 uint16_t readArrayElement(const uint8_t*& data_ptr, uint32_t elem_number) const; 00078 }; 00079 00080 } // namespace data_processing 00081 } // namespace sick 00082 00083 #endif // SICK_SAFETYSCANNERS_DATA_PROCESSING_PARSEFIELDGEOMETRYDATA_H