Tezzeret  1
Tezzeret
Public Member Functions | Protected Attributes | List of all members
Geometrics::GmEventSource Class Referenceabstract

The root class for sensors and event sources. More...

#include <GmSensor.hpp>

Inheritance diagram for Geometrics::GmEventSource:
Inheritance graph
[legend]

Public Member Functions

virtual int WriteToStorage (UInt32 ui32Topic, char *pData, UInt32 iSize, GmStorage *psStorage, UInt32 ui32FormatId)=0
 
void SetSensorId (int iSensorId)
 
int GetSensorId ()
 

Protected Attributes

int m_iSensorId
 

Detailed Description

The root class for sensors and event sources.

Member Function Documentation

◆ WriteToStorage()

virtual int Geometrics::GmEventSource::WriteToStorage ( UInt32  ui32Topic,
char *  pData,
UInt32  iSize,
GmStorage psStorage,
UInt32  ui32FormatId 
)
pure virtual

Virtual function, abstract in this class, called when a sensor should write its data to a storage or other event handler.

Parameters
ui32TopicHint to the storage (MQTT is one) about adding some topic or header information about the data. Not all storages use the hint.
pDataThe data to be written.
iSizeSize of the data to be written.
psStorageStorage or event handler to which the data will be written.
ui32FormatIdFormatting information to be used by the sensor. Within a single application, a sensor might be asked to write different formats to different storages or event handlers. Very likely the per-storage, per-mode information was stored in an instance of Geometrics::SensorStorageModeInfo.

Implemented in Geometrics::CTivaGpsUartSensor, Geometrics::GmPpsEventSensor, Geometrics::GmMfamDataSource, Geometrics::GmCm221, Geometrics::GmAppEventSource, and Geometrics::Gm862Emulator.


The documentation for this class was generated from the following files: