Tezzeret  1
Tezzeret
GmSensor.hpp
1 #ifndef GMSENSOR_HPP_
2 #define GMSENSOR_HPP_
3 
4 typedef unsigned long DWORD;
5 
6 #ifdef acs
7 #include <xdc/runtime/Types.h>
8 #endif
9 #include <GmStorage.hpp>
10 
11 namespace Geometrics
12 {
13 class GmEventSource;
14 
19 {
20 public:
21  GmEventSource *m_pSensor;
22  GmStorage *m_pStorage;
23  UInt32 m_ui32Topic;
24  UInt32 m_uiFormatId;
25  UInt32 m_uiOtherInfo;
26  UInt32 m_uiDownsampleRate;
27  UInt32 m_uiDownsampleCount;
28 };
29 
32 {
33 public:
34  GmEventSource();
35 
50  virtual int WriteToStorage(UInt32 ui32Topic,
51  char *pData,
52  UInt32 iSize,
53  GmStorage *psStorage,
54  UInt32 ui32FormatId) = 0;
55  void SetSensorId(int iSensorId)
56  {
57  m_iSensorId = iSensorId;
58  }
59  ;
60  int GetSensorId()
61  {
62  return m_iSensorId;
63  }
64  ;
65 
66 protected:
67  int m_iSensorId;
68 
69 };
70 }
71 
72 #endif
The root class for sensors and event sources.
Definition: GmSensor.hpp:32
virtual int WriteToStorage(UInt32 ui32Topic, char *pData, UInt32 iSize, GmStorage *psStorage, UInt32 ui32FormatId)=0
Definition: GmStorage.hpp:81
This class stores metadata about how a sensor should record itself to a storage, when in a particular...
Definition: GmSensor.hpp:19
GmApp/GmLoggingApp.hpp>
Definition: Analogs.hpp:47