Yate

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Friends | List of all members
DataConsumer Class Referenceabstract

`#include <yatephone.h>`

Inheritance diagram for DataConsumer:

## 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
DataSource * | getConnSource () const
DataSource * | getOverSource () const
virtual DataSource * | getTransSource () const
Public Member Functions inherited from DataNode
| DataNode (const char *format=0)
virtual int | costFormat (const DataFormat &format)
virtual bool | setFormat (const DataFormat &format)
const DataFormat & | getFormat () const
unsigned long | timeStamp () const
virtual bool | valid () const
virtual bool | control (NamedList &params)
virtual void | attached (bool added)
Public Member Functions inherited from RefObject
| RefObject ()
virtual | ~RefObject ()
virtual bool | alive () const
bool | ref ()
bool | deref ()
int | refcount () const
virtual void | destruct ()
Public Member Functions inherited from GenObject
| GenObject ()
virtual | ~GenObject ()
virtual const String & | toString () const
virtual const String & | traceId () const
NamedCounter * | getObjCounter () const
NamedCounter * | setObjCounter (NamedCounter *counter)

## Protected Member Functions
virtual bool | synchronize (DataSource *source)
Protected Member Functions inherited from RefObject
virtual void | zeroRefs ()
bool | resurrect ()

## Friends
class | DataSource

## Additional Inherited Members
Public Types inherited from DataNode
enum | DataFlags { DataStart = 0x0001, DataEnd = 0x0002, DataMark = 0x0004, DataSilent = 0x0008, DataMissed = 0x0010, DataError = 0x0020, DataPrivate = 0x0100 }
Static Public Member Functions inherited from DataNode
static unsigned long | invalidStamp ()
Static Public Member Functions inherited from RefObject
static bool | alive (const RefObject *obj)
static bool | efficientIncDec ()
Static Public Member Functions inherited from GenObject
static void * | getObject (const String &name, const GenObject *obj)
static bool | getObjCounting ()
static void | setObjCounting (bool enable)
static NamedCounter * | getObjCounter (const String &name, bool create=true)
static ObjList & | getObjCounters ()
Protected Attributes inherited from DataNode
DataFormat | m_format
unsigned long | m_timestamp

## 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 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

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

  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 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

  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:

- yatephone.h