38 namespace data_processing {
52 return derived_values;
55 const std::shared_ptr<std::vector<uint8_t>
const> vec_ptr = buffer.
getBuffer();
56 std::vector<uint8_t>::const_iterator data_ptr =
59 return derived_values;
void setScanTime(const uint16_t &scan_time)
Sets the time of the scan.
void setAngularBeamResolution(const int32_t &angular_beam_resolution)
Set the angular resolution between beams.
void setMultiplicationFactorInDerivedValues(std::vector< uint8_t >::const_iterator data_ptr, datastructure::DerivedValues &derived_values) const
void setDataInDerivedValues(std::vector< uint8_t >::const_iterator data_ptr, datastructure::DerivedValues &derived_values) const
bool checkIfPreconditionsAreMet(const datastructure::Data &data) const
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 setIsEmpty(bool is_empty)
Set if derived values are enabled.
void setNumberOfBeams(const uint16_t &number_of_beams)
Sets the number of beams for the current scan.
bool checkIfDataContainsNeededParsedBlocks(const datastructure::Data &data) const
void setStartAngleInDerivedValues(std::vector< uint8_t >::const_iterator data_ptr, datastructure::DerivedValues &derived_values) const
void setScanTimeInDerivedValues(std::vector< uint8_t >::const_iterator data_ptr, datastructure::DerivedValues &derived_values) const
void setNumberOfBeamsInDerivedValues(std::vector< uint8_t >::const_iterator data_ptr, datastructure::DerivedValues &derived_values) const
ParseDerivedValues()
Constructor of the parser.
void setMultiplicationFactor(const uint16_t &multiplication_factor)
Sets the multiplication factor.
The data class containing all data blocks of a measurement.
void setInterbeamPeriodInDerivedValues(std::vector< uint8_t >::const_iterator data_ptr, datastructure::DerivedValues &derived_values) const
datastructure::DerivedValues parseUDPSequence(const datastructure::PacketBuffer &buffer, datastructure::Data &data) const
Parsed the packet buffer and returns the derived values.
void setAngularBeamResolutionInDerivedValues(std::vector< uint8_t >::const_iterator data_ptr, datastructure::DerivedValues &derived_values) const
uint32_t readUint32LittleEndian(std::vector< uint8_t >::const_iterator it)
Read an unsigned 32-bit integer at offset in little endian encoding.
int32_t readInt32LittleEndian(std::vector< uint8_t >::const_iterator it)
Read an unsigned 32-bit integer at offset in little endian encoding.
bool checkIfDerivedValuesIsPublished(const datastructure::Data &data) const
The DerivedValues class Includes the derived configuration of the measurement data channel...
void setStartAngle(const int32_t &start_angle)
Set the start angle of the scan.
std::shared_ptr< DataHeader > getDataHeaderPtr() const
Gets the data header.
uint16_t readUint16LittleEndian(std::vector< uint8_t >::const_iterator it)
Read an unsigned 16-bit integer at offset in little endian encoding.
void setInterbeamPeriod(const uint32_t &interbeam_period)
Set the time between two consecutive beams.