38 namespace data_processing {
42 m_reader_ptr = std::make_shared<sick::data_processing::ReadWriteHelper>();
53 return measurement_data;
55 const uint8_t* data_ptr(buffer.
getBuffer().data() +
60 return measurement_data;
131 const uint16_t offset,
132 const uint8_t*& data_ptr,
135 int16_t distance =
m_reader_ptr->readuint16_tLittleEndian(data_ptr, (4 + offset * 4));
136 uint8_t reflectivity =
m_reader_ptr->readuint8_tLittleEndian(data_ptr, (6 + offset * 4));
137 uint8_t status =
m_reader_ptr->readuint8_tLittleEndian(data_ptr, (7 + offset * 4));
138 bool valid = status & (0x01 << 0);
139 bool infinite = status & (0x01 << 1);
140 bool glare = status & (0x01 << 2);
141 bool reflector = status & (0x01 << 3);
142 bool contamination = status & (0x01 << 4);
143 bool contamination_warning = status & (0x01 << 5);
152 contamination_warning));
bool checkIfPreconditionsAreMet(const datastructure::Data &data) const
bool checkIfDataContainsNeededParsedBlocks(const datastructure::Data &data) const
ParseMeasurementData()
Constructor of the parser.
A packetbuffer for the raw data from the sensor.
bool checkIfMeasurementDataIsPublished(const datastructure::Data &data) const
void setNumberOfBeamsInMeasurementData(const uint8_t *&data_ptr, datastructure::MeasurementData &measurement_data) const
Class containing the data of a single scan point.
uint32_t getNumberOfBeams() const
Getter for the number of beams.
void setScanPointsInMeasurementData(const uint8_t *&data_ptr, datastructure::MeasurementData &measurement_data)
The data class containing all data blocks of a measurement.
void setIsEmpty(bool is_empty)
Set if measurement data is enabled.
const VectorBuffer & getBuffer() const
Getter to return the VectorBuffer saved in the PacketBuffer.
void addScanPointToMeasurementData(uint16_t offset, const uint8_t *&data_ptr, datastructure::MeasurementData &measurement_data) const
void setStartAngleAndDelta(const datastructure::Data &data)
void setNumberOfBeams(const uint32_t &number_of_beams)
Setter for the number of beams.
Class containing all scanpoints of a single measurement.
void setDataInMeasurementData(const uint8_t *&data_ptr, datastructure::MeasurementData &measurement_data)
datastructure::MeasurementData parseUDPSequence(const datastructure::PacketBuffer &buffer, datastructure::Data &data)
Parses the measurement data if it is enabled.
std::shared_ptr< DataHeader > getDataHeaderPtr() const
Gets the data header.
void addScanPoint(ScanPoint scan_point)
Add a single scanpoint to the vector of scanpoints.
std::shared_ptr< sick::data_processing::ReadWriteHelper > m_reader_ptr
std::shared_ptr< DerivedValues > getDerivedValuesPtr() const
Gets the derived values.