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_PARSEDERIVEDVALUES_H 00036 #define SICK_SAFETYSCANNERS_DATA_PROCESSING_PARSEDERIVEDVALUES_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 namespace sick { 00045 namespace data_processing { 00046 00050 class ParseDerivedValues 00051 { 00052 public: 00056 ParseDerivedValues(); 00057 00066 datastructure::DerivedValues parseUDPSequence(const datastructure::PacketBuffer& buffer, 00067 datastructure::Data& data) const; 00068 00069 private: 00070 std::shared_ptr<sick::data_processing::ReadWriteHelper> m_reader_ptr; 00071 void setDataInDerivedValues(const uint8_t*& data_ptr, 00072 datastructure::DerivedValues& derived_values) const; 00073 void setMultiplicationFactorInDerivedValues(const uint8_t*& data_ptr, 00074 datastructure::DerivedValues& derived_values) const; 00075 void setNumberOfBeamsInDerivedValues(const uint8_t*& data_ptr, 00076 datastructure::DerivedValues& derived_values) const; 00077 void setScanTimeInDerivedValues(const uint8_t*& data_ptr, 00078 datastructure::DerivedValues& derived_values) const; 00079 void setStartAngleInDerivedValues(const uint8_t*& data_ptr, 00080 datastructure::DerivedValues& derived_values) const; 00081 void setAngularBeamResolutionInDerivedValues(const uint8_t*& data_ptr, 00082 datastructure::DerivedValues& derived_values) const; 00083 void setInterbeamPeriodInDerivedValues(const uint8_t*& data_ptr, 00084 datastructure::DerivedValues& derived_values) const; 00085 bool checkIfPreconditionsAreMet(const datastructure::Data& data) const; 00086 bool checkIfDerivedValuesIsPublished(const datastructure::Data& data) const; 00087 bool checkIfDataContainsNeededParsedBlocks(const datastructure::Data& data) const; 00088 }; 00089 00090 } // namespace data_processing 00091 } // namespace sick 00092 00093 #endif // SICK_SAFETYSCANNERS_DATA_PROCESSING_PARSEDERIVEDVALUES_H