Go to the documentation of this file.00001
00002
00003
00004
00024
00025
00026
00033
00034
00035 #ifndef SICK_SAFETYSCANNERS_DATA_PROCESSING_PARSEAPPLICATIONDATA_H
00036 #define SICK_SAFETYSCANNERS_DATA_PROCESSING_PARSEAPPLICATIONDATA_H
00037
00038 #include <sick_safetyscanners/datastructure/Data.h>
00039 #include <sick_safetyscanners/datastructure/DerivedValues.h>
00040 #include <sick_safetyscanners/datastructure/PacketBuffer.h>
00041
00042 #include <sick_safetyscanners/data_processing/ReadWriteHelper.h>
00043
00044 #include <vector>
00045
00046
00047 namespace sick {
00048 namespace data_processing {
00049
00053 class ParseApplicationData
00054 {
00055 public:
00059 ParseApplicationData();
00060
00069 datastructure::ApplicationData parseUDPSequence(const sick::datastructure::PacketBuffer& buffer,
00070 datastructure::Data& data) const;
00071
00072 private:
00073 std::shared_ptr<sick::data_processing::ReadWriteHelper> m_reader_ptr;
00074 void setDataInApplicationData(const uint8_t*& data_ptr,
00075 datastructure::ApplicationData& application_data) const;
00076 void
00077 setApplicationInputsInApplicationData(const uint8_t*& data_ptr,
00078 datastructure::ApplicationData& application_data) const;
00079 void
00080 setApplicationOutputsInApplicationData(const uint8_t*& data_ptr,
00081 datastructure::ApplicationData& application_data) const;
00082 void setDataInApplicationInputs(const uint8_t*& data_ptr,
00083 datastructure::ApplicationInputs& inputs) const;
00084 void setDataInApplicationOutputs(const uint8_t*& data_ptr,
00085 datastructure::ApplicationOutputs& outputs) const;
00086 void setUnsafeInputsInApplicationInputs(const uint8_t*& data_ptr,
00087 datastructure::ApplicationInputs& inputs) const;
00088 void setUnsafeInputsSourcesInApplicationInputs(const uint8_t*& data_ptr,
00089 datastructure::ApplicationInputs& inputs) const;
00090 void setUnsafeInputsFlagsInApplicationInputs(const uint8_t*& data_ptr,
00091 datastructure::ApplicationInputs& inputs) const;
00092 void setMonitoringCaseInputsInApplicationInputs(const uint8_t*& data_ptr,
00093 datastructure::ApplicationInputs& inputs) const;
00094 void setMonitoringCaseNumbersInApplicationInputs(const uint8_t*& data_ptr,
00095 datastructure::ApplicationInputs& inputs) const;
00096 void setMonitoringCaseFlagsInApplicationInputs(const uint8_t*& data_ptr,
00097 datastructure::ApplicationInputs& inputs) const;
00098 void setLinearVelocityInputsInApplicationInputs(const uint8_t*& data_ptr,
00099 datastructure::ApplicationInputs& inputs) const;
00100 void setLinearVelocity0InApplicationInputs(const uint8_t*& data_ptr,
00101 datastructure::ApplicationInputs& inputs) const;
00102 void setLinearVelocity1InApplicationInputs(const uint8_t*& data_ptr,
00103 datastructure::ApplicationInputs& inputs) const;
00104 void setLinearVelocityFlagsInApplicationInputs(const uint8_t*& data_ptr,
00105 datastructure::ApplicationInputs& inputs) const;
00106 void setSleepModeInputInApplicationInputs(const uint8_t*& data_ptr,
00107 datastructure::ApplicationInputs& inputs) const;
00108 void
00109 setEvalutaionPathsOutputsInApplicationOutputs(const uint8_t*& data_ptr,
00110 datastructure::ApplicationOutputs& outputs) const;
00111 void setEvaluationPathsOutputsEvalOutInApplicationOutputs(
00112 const uint8_t*& data_ptr, datastructure::ApplicationOutputs& outputs) const;
00113 void setEvaluationPathsOutputsIsSafeInApplicationOutputs(
00114 const uint8_t*& data_ptr, datastructure::ApplicationOutputs& outputs) const;
00115 void setEvaluationPathsOutputsValidFlagsInApplicationOutputs(
00116 const uint8_t*& data_ptr, datastructure::ApplicationOutputs& outputs) const;
00117 void
00118 setMonitoringCaseOutputsInApplicationOutputs(const uint8_t*& data_ptr,
00119 datastructure::ApplicationOutputs& outputs) const;
00120 void
00121 setMonitoringCaseNumbersInApplicationOutputs(const uint8_t*& data_ptr,
00122 datastructure::ApplicationOutputs& outputs) const;
00123 void setMonitoringCaseFlagsInApplicationOutputs(const uint8_t*& data_ptr,
00124 datastructure::ApplicationOutputs& outputs) const;
00125 void setSleepModeOutputInApplicationOutputs(const uint8_t*& data_ptr,
00126 datastructure::ApplicationOutputs& outputs) const;
00127 void setErrorFlagsInApplicationOutputs(const uint8_t*& data_ptr,
00128 datastructure::ApplicationOutputs& outputs) const;
00129 void
00130 setLinearVelocityOutoutsInApplicationOutputs(const uint8_t*& data_ptr,
00131 datastructure::ApplicationOutputs& outputs) const;
00132 void setLinearVelocity0InApplicationOutputs(const uint8_t*& data_ptr,
00133 datastructure::ApplicationOutputs& outputs) const;
00134 void setLinearVelocity1InApplicationOutputs(const uint8_t*& data_ptr,
00135 datastructure::ApplicationOutputs& outputs) const;
00136 void setLinearVelocityFlagsInApplicationOutputs(const uint8_t*& data_ptr,
00137 datastructure::ApplicationOutputs& outputs) const;
00138 void
00139 setResultingVelocityOutputsInApplicationOutputs(const uint8_t*& data_ptr,
00140 datastructure::ApplicationOutputs& outputs) const;
00141 void setResultingVelocityInApplicationOutputs(const uint8_t*& data_ptr,
00142 datastructure::ApplicationOutputs& outputs) const;
00143 void
00144 setResultingVelocityFlagsInApplicationOutputs(const uint8_t*& data_ptr,
00145 datastructure::ApplicationOutputs& outputs) const;
00146 void setOutputFlagsinApplicationOutput(const uint8_t*& data_ptr,
00147 datastructure::ApplicationOutputs& outputs) const;
00148 bool checkIfPreconditionsAreMet(const datastructure::Data& data) const;
00149 bool checkIfApplicationDataIsPublished(const datastructure::Data& data) const;
00150 bool checkIfDataContainsNeededParsedBlocks(const datastructure::Data& data) const;
00151 };
00152
00153 }
00154 }
00155
00156 #endif // SICK_SAFETYSCANNERS_DATA_PROCESSING_PARSEAPPLICATIONDATA_H