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:
format Name of the data format, default "slin" (Signed Linear)


Member Function Documentation

virtual void destroyed (  )  [virtual]

Destruct notification - complains loudly if still attached to a source

Reimplemented from RefObject.

virtual void* getObject ( const String name  )  const [virtual]

Get a pointer to a derived class given that class name

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

Reimplemented from GenObject.

Reimplemented in DataTranslator.

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:
data The raw data block to process
tStamp Timestamp of data - typically samples
flags Indicator 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

DataSource* getConnSource (  )  const [inline]

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

Returns:
A pointer to the DataSource object or NULL

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:
source Data 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:

Generated on Sat May 28 18:28:23 2011 for Yate by  doxygen 1.5.6