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_PARSEDEVICENAME_H 00036 #define SICK_SAFETYSCANNERS_DATA_PROCESSING_PARSEDEVICENAME_H 00037 00038 #include <sick_safetyscanners/datastructure/Data.h> 00039 #include <sick_safetyscanners/datastructure/PacketBuffer.h> 00040 00041 #include <sick_safetyscanners/data_processing/ReadWriteHelper.h> 00042 00043 #include <string> 00044 00045 namespace sick { 00046 00047 namespace data_processing { 00048 00049 00053 class ParseDeviceName 00054 { 00055 public: 00059 ParseDeviceName(); 00060 00069 bool parseTCPSequence(const datastructure::PacketBuffer& buffer, std::string& device_name) const; 00070 00071 private: 00072 std::shared_ptr<sick::data_processing::ReadWriteHelper> m_reader_ptr; 00073 std::string readDeviceName(const uint8_t*& data_ptr) const; 00074 }; 00075 00076 } // namespace data_processing 00077 } // namespace sick 00078 00079 #endif // SICK_SAFETYSCANNERS_DATA_PROCESSING_PARSEDEVICENAME_H