38 namespace data_processing {
50 return intrusion_data;
54 const std::shared_ptr<std::vector<uint8_t>
const> vec_ptr = buffer.
getBuffer();
55 std::vector<uint8_t>::const_iterator data_ptr =
59 return intrusion_data;
108 std::vector<sick::datastructure::IntrusionDatum> intrusion_datums;
114 std::vector<uint8_t>::const_iterator data_ptr,
115 std::vector<sick::datastructure::IntrusionDatum>& intrusion_datums)
const 119 for (uint8_t i_set = 0; i_set < 24; ++i_set)
126 intrusion_datums.push_back(datum);
133 std::vector<uint8_t>::const_iterator data_ptr,
137 datum.
setSize(num_bytes_to_read);
143 std::vector<uint8_t>::const_iterator data_ptr,
146 uint32_t num_read_flags = 0;
147 std::vector<bool> flags;
148 for (uint16_t num_read_bytes = 0;
154 i_bit++, num_read_flags++)
156 flags.push_back(static_cast<bool>(bitset & (0x01 << i_bit)));
void setDataInIntrusionDatums(std::vector< uint8_t >::const_iterator data_ptr, std::vector< sick::datastructure::IntrusionDatum > &intrusion_datums) const
bool checkIfIntrusionDataIsPublished(const datastructure::Data &data) const
uint16_t m_num_scan_points
datastructure::IntrusionData parseUDPSequence(const datastructure::PacketBuffer &buffer, datastructure::Data &data)
Parse a udp sequence to read the intrusion data if enabled.
uint16_t getNumScanPoints() const
int32_t getSize() const
Returns size of flag vector.
A packetbuffer for the raw data from the sensor.
std::shared_ptr< std::vector< uint8_t > const > getBuffer() const
Getter to return a copy of the data saved in the PacketBuffer.
void setDataInIntrusionData(std::vector< uint8_t >::const_iterator data_ptr, datastructure::IntrusionData &intrusion_data) const
Class containing a single IntrusionDatum.
uint16_t setSizeInIntrusionDatum(const uint16_t &offset, std::vector< uint8_t >::const_iterator data_ptr, sick::datastructure::IntrusionDatum &datum) const
void setFlagsVector(const std::vector< bool > &flags_vector)
Setter for the flag vector.
uint8_t readUint8LittleEndian(std::vector< uint8_t >::const_iterator it)
Read an unsigned 8-bit integer at offset in big little encoding.
The data class containing all data blocks of a measurement.
uint32_t readUint32LittleEndian(std::vector< uint8_t >::const_iterator it)
Read an unsigned 32-bit integer at offset in little endian encoding.
Class containing all IntrusionDatums.
void setIntrusionDataVector(const std::vector< IntrusionDatum > &intrusion_data_vector)
Setter for the vector of IntrusionDatums.
bool checkIfPreconditionsAreMet(const datastructure::Data &data) const
bool checkIfDataContainsNeededParsedBlocks(const datastructure::Data &data) const
uint16_t setFlagsInIntrusionDatum(const uint16_t &offset, std::vector< uint8_t >::const_iterator data_ptr, sick::datastructure::IntrusionDatum &datum) const
std::shared_ptr< DataHeader > getDataHeaderPtr() const
Gets the data header.
void setIsEmpty(bool is_empty)
Set if intrusion data has been enabled.
void setSize(const int32_t &size)
Setter of the size for the flag vector.
ParseIntrusionData()
Constructor of the parser.
std::shared_ptr< DerivedValues > getDerivedValuesPtr() const
Gets the derived values.
void setNumScanPoints(const uint16_t &num_scan_points)