38 namespace data_processing {
42 m_reader_ptr = std::make_shared<sick::data_processing::ReadWriteHelper>();
54 return application_data;
56 const uint8_t* data_ptr(buffer.
getBuffer().data() +
60 return application_data;
150 uint32_t word32 =
m_reader_ptr->readuint32_tLittleEndian(data_ptr, 0);
151 std::vector<bool> input_sources;
152 for (uint8_t i = 0; i < 32; i++)
154 input_sources.push_back(static_cast<bool>(word32 & (0x01 << i)));
162 uint32_t word32 =
m_reader_ptr->readuint32_tLittleEndian(data_ptr, 4);
163 std::vector<bool> input_flags;
164 for (uint8_t i = 0; i < 32; i++)
166 input_flags.push_back(static_cast<bool>(word32 & (0x01 << i)));
181 std::vector<uint16_t> monitoring_cases;
182 for (uint8_t i = 0; i < 20; i++)
184 monitoring_cases.push_back(
m_reader_ptr->readuint16_tLittleEndian(data_ptr, 12 + i * 2));
193 uint32_t word32 =
m_reader_ptr->readuint32_tLittleEndian(data_ptr, 52);
194 std::vector<bool> monitoring_flags;
196 for (uint8_t i = 0; i < 20; i++)
198 monitoring_flags.push_back(static_cast<bool>(word32 & (0x01 << i)));
226 uint8_t word8 =
m_reader_ptr->readuint8_tLittleEndian(data_ptr, 60);
253 uint32_t word32 =
m_reader_ptr->readuint32_tLittleEndian(data_ptr, 140);
255 std::vector<bool> eval_out;
256 for (uint8_t i = 0; i < 20; i++)
258 eval_out.push_back(word32 & (0x01 << i));
266 uint32_t word32 =
m_reader_ptr->readuint32_tLittleEndian(data_ptr, 144);
268 std::vector<bool> eval_out_is_safe;
269 for (uint8_t i = 0; i < 20; i++)
271 eval_out_is_safe.push_back(word32 & (0x01 << i));
280 uint32_t word32 =
m_reader_ptr->readuint32_tLittleEndian(data_ptr, 148);
282 std::vector<bool> eval_out_is_valid;
283 for (uint8_t i = 0; i < 20; i++)
285 eval_out_is_valid.push_back(word32 & (0x01 << i));
300 std::vector<uint16_t> output_monitoring_cases;
302 for (uint8_t i = 0; i < 20; i++)
304 output_monitoring_cases.push_back(
305 m_reader_ptr->readuint16_tLittleEndian(data_ptr, 152 + i * 2));
314 uint32_t word32 =
m_reader_ptr->readuint32_tLittleEndian(data_ptr, 192);
316 std::vector<bool> output_monitoring_flags;
318 for (uint8_t i = 0; i < 20; i++)
320 output_monitoring_flags.push_back(static_cast<bool>(word32 & (0x01 << i)));
334 uint8_t word8 =
m_reader_ptr->readuint8_tLittleEndian(data_ptr, 194);
367 uint8_t word8 =
m_reader_ptr->readuint8_tLittleEndian(data_ptr, 204);
387 std::vector<int16_t> resulting_velocities;
388 for (uint8_t i = 0; i < 20; i++)
390 resulting_velocities.push_back(
m_reader_ptr->readint16_tLittleEndian(data_ptr, 208 + i * 2));
398 uint32_t word32 =
m_reader_ptr->readuint32_tLittleEndian(data_ptr, 248);
400 std::vector<bool> resulting_velocities_flags;
402 for (uint8_t i = 0; i < 20; i++)
404 resulting_velocities_flags.push_back(static_cast<bool>(word32 & (0x01 << i)));
412 uint8_t word8 =
m_reader_ptr->readuint8_tLittleEndian(data_ptr, 259);
void setVelocity1TransmittedSafely(bool velocity_1_transmitted_safely)
Sets if the second linear velocity output is transmitted safely.
void setIsEmpty(bool is_empty)
Sets if application data is empty.
void setEvaluationPathsOutputsValidFlagsInApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
void setHostErrorFlagGlare(bool host_error_flag_glare)
Sets if glare is present.
void setEvaluationPathsOutputsEvalOutInApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
void setSleepModeInputInApplicationInputs(const uint8_t *&data_ptr, datastructure::ApplicationInputs &inputs) const
void setLinearVelocityFlagsInApplicationInputs(const uint8_t *&data_ptr, datastructure::ApplicationInputs &inputs) const
void setMonitoringCaseInputsInApplicationInputs(const uint8_t *&data_ptr, datastructure::ApplicationInputs &inputs) const
void setResultingVelocityFlagsInApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
void setResultingVelocityIsValidVector(const std::vector< bool > &resulting_velocity_is_valid_vector)
Sets if the resulting velocities are valid.
bool checkIfDataContainsNeededParsedBlocks(const datastructure::Data &data) const
void setLinearVelocityFlagsInApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
A packetbuffer for the raw data from the sensor.
void setResultingVelocityVector(const std::vector< int16_t > &resulting_velocity_vector)
Sets the resulting velocity for each monitoring case table.
void setMonitoringCaseNumbersInApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
void setVelocity0Valid(bool velocity_0_valid)
Sets if the first linear velocity output is valid.
void setOutputFlagsinApplicationOutput(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
void setUnsafeInputsInApplicationInputs(const uint8_t *&data_ptr, datastructure::ApplicationInputs &inputs) const
void setMonitoringCaseVector(const std::vector< uint16_t > &monitoring_case_vector)
Sets the currently active monitoring case numbers.
void setLinearVelocity1InApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
ParseApplicationData()
Constructor of the parser.
void setEvalutaionPathsOutputsInApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
void setVelocity1Valid(bool velocity_1_valid)
Sets if the second linear velocity output is valid.
The data class containing all data blocks of a measurement.
The application io class, bundles application input and output.
void setDataInApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
void setSleepModeOutput(const int8_t &sleep_mode_output)
Sets the state of the sleep mode.
void setApplicationInputsInApplicationData(const uint8_t *&data_ptr, datastructure::ApplicationData &application_data) const
void setVelocity0(const int16_t &velocity_0)
Sets the first linear velocity output.
void setResultingVelocityOutputsInApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
std::shared_ptr< sick::data_processing::ReadWriteHelper > m_reader_ptr
void setHostErrorFlagReferenceContourIntruded(bool host_error_flag_reference_contour_intruded)
Sets if a reference contour is intruded.
void setVelocity0TransmittedSafely(bool velocity_0_transmitted_safely)
Sets if the first linear velocity output is transmitted safely.
void setResultingVelocityInApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
void setEvalOutIsValidVector(const std::vector< bool > &eval_out_is_valid_vector)
Sets if an output path is valid.
const VectorBuffer & getBuffer() const
Getter to return the VectorBuffer saved in the PacketBuffer.
void setInputs(const ApplicationInputs &inputs)
Sets the application input.
void setHostErrorFlagContaminationWarning(bool host_error_flag_contamination_warning)
Sets if a contamination warning is present.
void setHostErrorFlagCriticalError(bool host_error_flag_critical_error)
Sets if a critical error is present.
void setMonitoringCaseNumbersInApplicationInputs(const uint8_t *&data_ptr, datastructure::ApplicationInputs &inputs) const
void setEvalOutIsSafeVector(const std::vector< bool > &eval_out_is_safe_vector)
Sets if an cut-off path is safe.
void setFlagsSleepModeOutputIsValid(bool flags_sleep_mode_output_is_valid)
Sets if the sleep mode is valid.
void setMonitoringCaseFlagsVector(const std::vector< bool > &monitoring_case_flags_vector)
Set is the corresponding monitoring case number is valid.
void setEvaluationPathsOutputsIsSafeInApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
void setHostErrorFlagContaminationError(bool host_error_flag_contamination_error)
Sets if a contamination error is present.
void setHostErrorFlagManipulationError(bool host_error_flag_manipulation_error)
Sets if a manipulation error is present.
datastructure::ApplicationData parseUDPSequence(const sick::datastructure::PacketBuffer &buffer, datastructure::Data &data) const
Parses the application data from the packet buffer.
bool checkIfApplicationDataIsPublished(const datastructure::Data &data) const
void setErrorFlagsInApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
bool checkIfPreconditionsAreMet(const datastructure::Data &data) const
void setEvalOutVector(const std::vector< bool > &eval_out_vector)
Set the state of the non safe cut-off paths.
void setSleepModeOutputInApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
The application outputs from a udp data packet.
void setDataInApplicationData(const uint8_t *&data_ptr, datastructure::ApplicationData &application_data) const
void setOutputs(const ApplicationOutputs &outputs)
Sets the application output.
void setUnsafeInputsFlagsInApplicationInputs(const uint8_t *&data_ptr, datastructure::ApplicationInputs &inputs) const
void setUnsafeInputsSourcesInApplicationInputs(const uint8_t *&data_ptr, datastructure::ApplicationInputs &inputs) const
void setLinearVelocity0InApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
void setMonitoringCaseFlagsInApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
void setFlagsHostErrorFlagsAreValid(bool flags_host_error_flags_are_valid)
Sets if the error flags are valid.
void setMonitoringCaseOutputsInApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
std::shared_ptr< DataHeader > getDataHeaderPtr() const
Gets the data header.
void setLinearVelocityInputsInApplicationInputs(const uint8_t *&data_ptr, datastructure::ApplicationInputs &inputs) const
void setMonitoringCaseFlagsInApplicationInputs(const uint8_t *&data_ptr, datastructure::ApplicationInputs &inputs) const
void setLinearVelocity1InApplicationInputs(const uint8_t *&data_ptr, datastructure::ApplicationInputs &inputs) const
void setVelocity1(const int16_t &velocity_1)
Sets the second linear velocity output.
void setLinearVelocity0InApplicationInputs(const uint8_t *&data_ptr, datastructure::ApplicationInputs &inputs) const
void setLinearVelocityOutoutsInApplicationOutputs(const uint8_t *&data_ptr, datastructure::ApplicationOutputs &outputs) const
void setDataInApplicationInputs(const uint8_t *&data_ptr, datastructure::ApplicationInputs &inputs) const
void setApplicationOutputsInApplicationData(const uint8_t *&data_ptr, datastructure::ApplicationData &application_data) const