nidas  v1.2-1520
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
SampleDispatcher Class Reference
Inheritance diagram for SampleDispatcher:
Inheritance graph
[legend]

Public Member Functions

 SampleDispatcher (InfluxDB *db, const list< DSMSensor * > &sensors, NidasApp &app)
 
virtual ~SampleDispatcher ()
 
void flush () throw ()
 Ask that this SampleClient send out any buffered Samples that it may be holding. More...
 
bool receive (const Sample *samp) throw ()
 Method called to pass a sample to this client. More...
 

Private Types

typedef map< dsm_sample_id_t,
SampleToDatabase
sample_map_t
 

Private Member Functions

sample_map_t::iterator findStats (dsm_sample_id_t sampid)
 Find the SampleToDatabase for the given sample ID. More...
 

Private Attributes

sample_map_t _samples
 
NidasApp_app
 

Member Typedef Documentation

Constructor & Destructor Documentation

SampleDispatcher::SampleDispatcher ( InfluxDB db,
const list< DSMSensor * > &  sensors,
NidasApp app 
)
virtual SampleDispatcher::~SampleDispatcher ( )
inlinevirtual

Member Function Documentation

sample_map_t::iterator SampleDispatcher::findStats ( dsm_sample_id_t  sampid)
inlineprivate

Find the SampleToDatabase for the given sample ID.

Wisard samples get mapped to one sensor type, so we look for all of them.

References VLOG.

Referenced by SampleDispatcher().

void SampleDispatcher::flush ( )
throw (
)
inlinevirtual

Ask that this SampleClient send out any buffered Samples that it may be holding.

Implements nidas::core::SampleClient.

bool SampleDispatcher::receive ( const Sample s)
throw (
)
virtual

Method called to pass a sample to this client.

This method is typically called by a SampleSource for each of its SampleClients when it has a sample ready. Returns true: success false: sample rejected. This is meant to signal a warning-type situation - like a socket not being available temporarily. True errors will be thrown as an IOException.

Implements nidas::core::SampleClient.

References DLOG, VLOG, and WLOG.

Member Data Documentation

NidasApp& SampleDispatcher::_app
private

Referenced by SampleDispatcher().

sample_map_t SampleDispatcher::_samples
private

Referenced by SampleDispatcher().


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