ParseIntrusionData.h
Go to the documentation of this file.
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_PARSEINTRUSIONDATA_H
00036 #define SICK_SAFETYSCANNERS_DATA_PROCESSING_PARSEINTRUSIONDATA_H
00037 
00038 #include <sick_safetyscanners/datastructure/Data.h>
00039 #include <sick_safetyscanners/datastructure/DerivedValues.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 namespace data_processing {
00048 
00052 class ParseIntrusionData
00053 {
00054 public:
00058   ParseIntrusionData();
00059 
00068   datastructure::IntrusionData parseUDPSequence(const datastructure::PacketBuffer& buffer,
00069                                                 datastructure::Data& data);
00070   uint16_t getNumScanPoints() const;
00071   void setNumScanPoints(const uint16_t num_scan_points);
00072 
00073 private:
00074   uint16_t m_num_scan_points;
00075 
00076   std::shared_ptr<sick::data_processing::ReadWriteHelper> m_reader_ptr;
00077   void setDataInIntrusionData(const uint8_t*& data_ptr,
00078                               datastructure::IntrusionData& intrusion_data) const;
00079   void setDataInIntrusionDatums(
00080     const uint8_t*& data_ptr,
00081     std::vector<sick::datastructure::IntrusionDatum>& intrusion_datums) const;
00082   uint16_t setSizeInIntrusionDatum(const uint16_t offset,
00083                                    const uint8_t*& data_ptr,
00084                                    sick::datastructure::IntrusionDatum& datum) const;
00085   uint16_t setFlagsInIntrusionDatum(const uint16_t offset,
00086                                     const uint8_t*& data_ptr,
00087                                     sick::datastructure::IntrusionDatum& datum) const;
00088   bool checkIfPreconditionsAreMet(const datastructure::Data& data) const;
00089   bool checkIfIntrusionDataIsPublished(const datastructure::Data& data) const;
00090   bool checkIfDataContainsNeededParsedBlocks(const datastructure::Data& data) const;
00091 };
00092 
00093 } // namespace data_processing
00094 } // namespace sick
00095 
00096 #endif // SICK_SAFETYSCANNERS_DATA_PROCESSING_PARSEINTRUSIONDATA_H


sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Tue May 7 2019 03:27:36