Yate
Public Member Functions | Protected Member Functions | Friends
DataConsumer Class Reference

#include <yatephone.h>

Inheritance diagram for DataConsumer:
DataNode RefObject GenObject DataTranslator

List of all members.

Public Member Functions

 DataConsumer (const char *format="slin")
virtual void destroyed ()
virtual void * getObject (const String &name) const
virtual unsigned long Consume (const DataBlock &data, unsigned long tStamp, unsigned long flags)=0
DataSourcegetConnSource () const
DataSourcegetOverSource () const
virtual DataSourcegetTransSource () const

Protected Member Functions

virtual bool synchronize (DataSource *source)

Friends

class DataSource

Detailed Description

A data consumer


Constructor & Destructor Documentation

DataConsumer ( const char *  format = "slin") [inline, explicit]

Consumer constructor

Parameters:
formatName of the data format, default "slin" (Signed Linear)

Member Function Documentation

virtual unsigned long Consume ( const DataBlock data,
unsigned long  tStamp,
unsigned long  flags 
) [pure virtual]

Consumes the data sent to it from a source

Parameters:
dataThe raw data block to process
tStampTimestamp of data - typically samples
flagsIndicator flags associated with the data block
Returns:
Number of samples actually consumed, use invalidStamp() to indicate that all data was consumed, return zero for consumers that become invalid
virtual void destroyed ( ) [virtual]

Destruct notification - complains loudly if still attached to a source

Reimplemented from RefObject.

DataSource* getConnSource ( ) const [inline]

Get the data source of this object if it's connected

Returns:
A pointer to the DataSource object or NULL
virtual void* getObject ( const String name) const [virtual]

Get a pointer to a derived class given that class name

Parameters:
nameName of the class we are asking for
Returns:
Pointer to the requested class or NULL if this object doesn't implement it

Reimplemented from RefObject.

Reimplemented in DataTranslator.

DataSource* getOverSource ( ) const [inline]

Get the override data source of this object if it's connected

Returns:
A pointer to the DataSource object or NULL
virtual DataSource* getTransSource ( ) const [inline, virtual]

Get the data source of a translator object

Returns:
A pointer to the DataSource object or NULL

Reimplemented in DataTranslator.

virtual bool synchronize ( DataSource source) [protected, virtual]

Synchronize the consumer with a source

Parameters:
sourceData source to copy the timestamp from
Returns:
True if we could synchronize with the source

Reimplemented in DataTranslator.


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