Tezzeret  1
Tezzeret
GmBufferedSensor.hpp
1 #include "GmSensor.hpp"
2 #include <GmRingBuffer.hpp>
3 #include <GmManagedArrayRingBuffer.hpp>
4 #include <GmChildRingBuffer.hpp>
5 
6 #ifndef GM_TIVA_SENSOR_HPP_
7 #define GM_TIVA_SENSOR_HPP_
8 
9 #ifndef DWORD
10 typedef unsigned long DWORD;
11 #endif
12 
13 namespace Geometrics
14 {
18 {
19 public:
31  UInt8 iSubjectId,
32  int iRingCount,
33  int iDataSize,
35 
50  UInt8 iSubjectId,
51  int iRingCount,
52  int iDataSize,
53  UInt8 *puiBuffer,
54  UInt32 uiBufferSize,
56 
57  int Start();
58  int ResetBuffers();
59  Bool HasData();
60 
61  /***********************************************************************/
68  /***********************************************************************/
69  int ReadRecord(char *pcDestination, int iSize);
70 
71  /***********************************************************************/
77  /***********************************************************************/
78  virtual int DeleteNextRecord();
79 
80 public:
89  UInt8 m_iSubjectId;
90 };
91 }
92 
93 #endif /* GMTIVASENSOR_HPP_ */
Definition: GmChildRingBuffer.hpp:11
The class from which event sources and sensors that post events to the application's main event queue...
Definition: GmBufferedSensor.hpp:18
CChildRingBuffer * m_rbBuffer
The local buffer into which the sensor or event source stores each of its events or measurements....
Definition: GmBufferedSensor.hpp:88
GmBufferedSensor(UInt8 iSubjectId, int iRingCount, int iDataSize, GmManagedArrayRingBuffer< uint8_t, GM_SIZE_OF_APP_DATA_QUEUE > *mainEventQueue)
Constructor for derived classes, when it's OK to allocate a local buffer dynamically.
Definition: GmBufferedSensor.cpp:43
int ReadRecord(char *pcDestination, int iSize)
The main interface for consumers of a sensors data to get that data. It simply copies the data in the...
Definition: GmBufferedSensor.cpp:98
virtual int DeleteNextRecord()
DeleteNextRecord allows a caller to discard the next record without retrieving it....
Definition: GmBufferedSensor.cpp:103
The root class for sensors and event sources.
Definition: GmSensor.hpp:32
GmApp/GmLoggingApp.hpp>
Definition: Analogs.hpp:47