38 namespace data_processing {
51 return application_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 application_data;
88 std::vector<uint8_t>::const_iterator data_ptr,
96 std::vector<uint8_t>::const_iterator data_ptr,
105 std::vector<uint8_t>::const_iterator data_ptr,
145 std::vector<bool> input_sources;
146 for (uint8_t i = 0; i < 32; i++)
148 input_sources.push_back(static_cast<bool>(word32 & (0x01 << i)));
157 std::vector<bool> input_flags;
158 for (uint8_t i = 0; i < 32; i++)
160 input_flags.push_back(static_cast<bool>(word32 & (0x01 << i)));
175 std::vector<uint16_t> monitoring_cases;
176 for (uint8_t i = 0; i < 20; i++)
188 std::vector<bool> monitoring_flags;
190 for (uint8_t i = 0; i < 20; i++)
192 monitoring_flags.push_back(static_cast<bool>(word32 & (0x01 << i)));
249 std::vector<bool> eval_out;
250 for (uint8_t i = 0; i < 20; i++)
252 eval_out.push_back(static_cast<bool>(word32 & (0x01 << i)));
262 std::vector<bool> eval_out_is_safe;
263 for (uint8_t i = 0; i < 20; i++)
265 eval_out_is_safe.push_back(static_cast<bool>(word32 & (0x01 << i)));
276 std::vector<bool> eval_out_is_valid;
277 for (uint8_t i = 0; i < 20; i++)
279 eval_out_is_valid.push_back(static_cast<bool>(word32 & (0x01 << i)));
294 std::vector<uint16_t> output_monitoring_cases;
296 for (uint8_t i = 0; i < 20; i++)
298 output_monitoring_cases.push_back(
310 std::vector<bool> output_monitoring_flags;
312 for (uint8_t i = 0; i < 20; i++)
314 output_monitoring_flags.push_back(static_cast<bool>(word32 & (0x01 << i)));
381 std::vector<int16_t> resulting_velocities;
382 for (uint8_t i = 0; i < 20; i++)
384 resulting_velocities.push_back(
395 std::vector<bool> resulting_velocities_flags;
397 for (uint8_t i = 0; i < 20; i++)
399 resulting_velocities_flags.push_back(static_cast<bool>(word32 & (0x01 << i)));
void setLinearVelocity0InApplicationInputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationInputs &inputs) const
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 setHostErrorFlagGlare(bool host_error_flag_glare)
Sets if glare is present.
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 setLinearVelocityOutoutsInApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) 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 setUnsafeInputsInApplicationInputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationInputs &inputs) const
void setLinearVelocityFlagsInApplicationInputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationInputs &inputs) const
void setResultingVelocityVector(const std::vector< int16_t > &resulting_velocity_vector)
Sets the resulting velocity for each monitoring case table.
void setVelocity0Valid(bool velocity_0_valid)
Sets if the first linear velocity output is valid.
void setErrorFlagsInApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
void setEvaluationPathsOutputsIsSafeInApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
void setLinearVelocity1InApplicationInputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationInputs &inputs) const
void setMonitoringCaseVector(const std::vector< uint16_t > &monitoring_case_vector)
Sets the currently active monitoring case numbers.
ParseApplicationData()
Constructor of the parser.
void setSleepModeOutputInApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
void setVelocity1Valid(bool velocity_1_valid)
Sets if the second linear velocity output is valid.
void setApplicationInputsInApplicationData(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationData &application_data) const
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.
The application io class, bundles application input and output.
void setSleepModeOutput(const int8_t &sleep_mode_output)
Sets the state of the sleep mode.
void setDataInApplicationData(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationData &application_data) const
void setVelocity0(const int16_t &velocity_0)
Sets the first linear velocity output.
void setDataInApplicationInputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationInputs &inputs) const
uint32_t readUint32LittleEndian(std::vector< uint8_t >::const_iterator it)
Read an unsigned 32-bit integer at offset in little endian encoding.
void setMonitoringCaseFlagsInApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
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 setEvalOutIsValidVector(const std::vector< bool > &eval_out_is_valid_vector)
Sets if an output path is valid.
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 setUnsafeInputsFlagsInApplicationInputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationInputs &inputs) const
void setMonitoringCaseNumbersInApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
void setMonitoringCaseInputsInApplicationInputs(std::vector< uint8_t >::const_iterator 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 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.
void setEvaluationPathsOutputsValidFlagsInApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
void setDataInApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
void setResultingVelocityFlagsInApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
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
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 setMonitoringCaseNumbersInApplicationInputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationInputs &inputs) const
void setLinearVelocity0InApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
void setApplicationOutputsInApplicationData(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationData &application_data) const
void setEvalutaionPathsOutputsInApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
The application outputs from a udp data packet.
void setOutputFlagsinApplicationOutput(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
void setOutputs(const ApplicationOutputs &outputs)
Sets the application output.
void setMonitoringCaseOutputsInApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
void setLinearVelocity1InApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
void setResultingVelocityOutputsInApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
void setFlagsHostErrorFlagsAreValid(bool flags_host_error_flags_are_valid)
Sets if the error flags are valid.
void setLinearVelocityInputsInApplicationInputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationInputs &inputs) const
void setEvaluationPathsOutputsEvalOutInApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
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 setResultingVelocityInApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
void setVelocity1(const int16_t &velocity_1)
Sets the second linear velocity output.
void setLinearVelocityFlagsInApplicationOutputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationOutputs &outputs) const
void setSleepModeInputInApplicationInputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationInputs &inputs) const
void setMonitoringCaseFlagsInApplicationInputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationInputs &inputs) const
int16_t readInt16LittleEndian(std::vector< uint8_t >::const_iterator it)
Read a signed 16-bit integer at offset in little endian encoding.
void setUnsafeInputsSourcesInApplicationInputs(std::vector< uint8_t >::const_iterator data_ptr, datastructure::ApplicationInputs &inputs) const