SensorStateInfo.hpp
Go to the documentation of this file.
00001 //
00002 // SensorStateInfo.hpp
00003 //
00004 //  Created on: 02.09.2011
00005 //      Author: wahnfla
00006 //
00007 
00008 #ifndef SENSORSTATEINFO_HPP
00009 #define SENSORSTATEINFO_HPP
00010 
00011 #include "Measurement.hpp"
00012 #include "FieldDescription.hpp"
00013 #include "Fields.hpp"
00014 //#include "Serializable.hpp"
00015 #include "../BasicDatatypes.hpp"
00016 #include "EvalCases.hpp"
00017 #include "EvalCaseResults.hpp"
00018 #include <vector>
00019 #include <map>
00020 
00021 namespace datatypes
00022 {
00023 
00024 class SensorStateInfo : public BasicData
00025 {
00026 public:
00027         enum IOState
00028         {
00029                 OFF = 0,
00030                 ON = 1,
00031                 PASSIVE = 2
00032         };
00033 
00034         static std::string ioStateToString(IOState state)
00035         {
00036                 switch (state)
00037                 {
00038                 case OFF:
00039                         return "OFF";
00040                 case ON:
00041                         return "ON";
00042                 case PASSIVE:
00043                         return "PASSIVE";
00044                 }
00045                 return "";
00046         }
00047 
00048         typedef std::vector<IOState> StateVector;
00049         typedef std::map<std::string, bool> StateMap;
00050 
00051         SensorStateInfo();
00052 
00053         virtual ~SensorStateInfo();
00054 
00055         const EvalCases& getEvalCases() const;
00056         const Fields& getFields() const;
00057         const StateVector& getInputStates() const;
00058         const MeasurementList& getMeasurementList() const;
00059         const StateVector& getOutputStates() const;
00060         const StateMap& getStateMap() const;
00061         UINT32 getDeviceID() const;
00062         void setEvalCases(const EvalCases& evalCases);
00063         void setFields(const Fields& fields);
00064         void setInputStates(const StateVector& m_inputStates);
00065         void setMeasurementList(const MeasurementList& m_measurementList);
00066         void setOutputStates(const StateVector& m_outputStates);
00067         void setStateMap(const StateMap& stateMap);
00068         void setDeviceID(UINT32 deviceID);
00069         void setLastKnownEvalCaseResults(const EvalCaseResults& evalCaseResults);
00070 
00071         std::string toString() const;
00072 
00073         const UINT32 getUsedMemory() const;     // Return total memory usage
00074 
00075 
00076 private:
00078         MeasurementList m_measurementList;
00079         Fields m_fields;
00080         EvalCases m_evalCases;
00081         StateVector m_inputStates;
00082         StateVector m_outputStates;
00083         StateMap m_stateMap;
00084 };
00085 
00086 } // namespace datatypes
00087 
00088 #endif // SENSORSTATEINFO_HPP


libsick_ldmrs
Author(s): SICK AG , Martin Günther , Jochen Sprickerhof
autogenerated on Wed Jun 14 2017 04:04:50