SensorStateInfo.hpp
Go to the documentation of this file.
1 //
2 // SensorStateInfo.hpp
3 //
4 // Created on: 02.09.2011
5 // Author: wahnfla
6 //
7 
8 #ifndef SENSORSTATEINFO_HPP
9 #define SENSORSTATEINFO_HPP
10 
11 #include "Measurement.hpp"
12 #include "FieldDescription.hpp"
13 #include "Fields.hpp"
14 //#include "Serializable.hpp"
15 #include "../BasicDatatypes.hpp"
16 #include "EvalCases.hpp"
17 #include "EvalCaseResults.hpp"
18 #include <vector>
19 #include <map>
20 
21 namespace datatypes
22 {
23 
24 class SensorStateInfo : public BasicData
25 {
26 public:
27  enum IOState
28  {
29  OFF = 0,
30  ON = 1,
31  PASSIVE = 2
32  };
33 
34  static std::string ioStateToString(IOState state)
35  {
36  switch (state)
37  {
38  case OFF:
39  return "OFF";
40  case ON:
41  return "ON";
42  case PASSIVE:
43  return "PASSIVE";
44  }
45  return "";
46  }
47 
48  typedef std::vector<IOState> StateVector;
49  typedef std::map<std::string, bool> StateMap;
50 
52 
53  virtual ~SensorStateInfo();
54 
55  const EvalCases& getEvalCases() const;
56  const Fields& getFields() const;
57  const StateVector& getInputStates() const;
58  const MeasurementList& getMeasurementList() const;
59  const StateVector& getOutputStates() const;
60  const StateMap& getStateMap() const;
61  UINT32 getDeviceID() const;
62  void setEvalCases(const EvalCases& evalCases);
63  void setFields(const Fields& fields);
64  void setInputStates(const StateVector& m_inputStates);
66  void setOutputStates(const StateVector& m_outputStates);
67  void setStateMap(const StateMap& stateMap);
68  void setDeviceID(UINT32 deviceID);
69  void setLastKnownEvalCaseResults(const EvalCaseResults& evalCaseResults);
70 
71  std::string toString() const;
72 
73  const UINT32 getUsedMemory() const; // Return total memory usage
74 
75 
76 private:
81  StateVector m_inputStates;
82  StateVector m_outputStates;
83  StateMap m_stateMap;
84 };
85 
86 } // namespace datatypes
87 
88 #endif // SENSORSTATEINFO_HPP
void setFields(const Fields &fields)
void setMeasurementList(const MeasurementList &m_measurementList)
uint32_t UINT32
void setStateMap(const StateMap &stateMap)
UINT32 getDeviceID() const
const EvalCases & getEvalCases() const
std::map< std::string, bool > StateMap
void setInputStates(const StateVector &m_inputStates)
const StateVector & getInputStates() const
void setLastKnownEvalCaseResults(const EvalCaseResults &evalCaseResults)
const Fields & getFields() const
const StateVector & getOutputStates() const
void setDeviceID(UINT32 deviceID)
MeasurementList m_measurementList
e.g. temperature
const StateMap & getStateMap() const
std::vector< IOState > StateVector
const MeasurementList & getMeasurementList() const
void setEvalCases(const EvalCases &evalCases)
std::string toString() const
const UINT32 getUsedMemory() const
static std::string ioStateToString(IOState state)
void setOutputStates(const StateVector &m_outputStates)


libsick_ldmrs
Author(s): SICK AG , Martin Günther , Jochen Sprickerhof
autogenerated on Mon Oct 26 2020 03:27:30