40 namespace data_processing {
44 m_reader_ptr = std::make_shared<sick::data_processing::ReadWriteHelper>();
52 const uint8_t* data_ptr(buffer.
getBuffer().data());
59 std::vector<uint16_t> indices;
60 std::vector<bool> fields_valid;
61 for (uint8_t i = 0; i < 8; i++)
76 if (byte ==
'R' || byte ==
'Y')
85 return m_reader_ptr->readuint16_tLittleEndian(data_ptr, 6);
89 const uint8_t index)
const 91 return m_reader_ptr->readuint16_tLittleEndian(data_ptr, 158 + (index * 4));
96 uint8_t byte =
m_reader_ptr->readuint8_t(data_ptr, 157 + (index * 4));
98 return byte & (0x01 << 0);
bool parseTCPSequence(const datastructure::PacketBuffer &buffer, datastructure::MonitoringCaseData &monitoring_case_data) const
Parses a tcp sequence and return the monitoring case data.
uint16_t readMonitoringCaseNumber(const uint8_t *&data_ptr) const
A packetbuffer for the raw data from the sensor.
void setFieldsValid(const std::vector< bool > &fields_valid)
Sets if the fields are valid.
bool isValid(const uint8_t *&data_ptr) const
void setMonitoringCaseNumber(const uint16_t monitoring_case_number)
Sets the monitoring case number.
const VectorBuffer & getBuffer() const
Getter to return the VectorBuffer saved in the PacketBuffer.
uint16_t readFieldIndex(const uint8_t *&data_ptr, const uint8_t index) const
Stores the data for the different monitoring cases.
std::shared_ptr< sick::data_processing::ReadWriteHelper > m_reader_ptr
ParseMonitoringCaseData()
Constructor of the parser.
bool readFieldValid(const uint8_t *&data_ptr, const uint8_t index) const
void setIsValid(const bool is_valid)
Sets if the monitoring case data is valid.
void setFieldIndices(const std::vector< uint16_t > &field_indices)
Sets the field indices.