class DataSource

A data source More...

Full nameTelEngine::DataSource
Definition#include <yatephone.h>
InheritsTelEngine::DataNode [public ]
Inherited byThreadedSource
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Members


Detailed Description

A data source

inline  DataSource (const char* format = "slin")

DataSource

Source constructor

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

 ~DataSource ()

~DataSource

[virtual]

Source's destructor - detaches all consumers

void*  getObject (const String& name)

getObject

[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 GenObject.

void  Forward (const DataBlock& data, unsigned long tStamp = invalidStamp())

Forward

Forwards the data to its consumers

Parameters:
dataThe raw data block to forward; an empty block ends data
tStampTimestamp of data - typically samples

bool  attach (DataConsumer* consumer, bool override = false)

attach

Attach a data consumer

Parameters:
consumerData consumer to attach
overrideAttach as temporary source override

Returns: True on success, false on failure

bool  detach (DataConsumer* consumer)

detach

Detach a data consumer

Parameters:
consumerData consumer to detach

Returns: True on success, false on failure

void  clear ()

clear

Detach all data consumers

inline Mutex*  mutex ()

mutex

Get the mutex that serializes access to this data source

Returns: Pointer to DataSource's mutex object

inline DataTranslator*  getTranslator ()

getTranslator

[const]

Get the master translator object if this source is part of a translator

Returns: A pointer to the DataTranslator object or NULL

void  synchronize (unsigned long tStamp)

synchronize

Synchronize the source and attached consumers with another timestamp

Parameters:
tStampNew timestamp of data - typically samples

inline unsigned long  nextStamp ()

nextStamp

[const]

Get the next expected position in the data stream

Returns: Timestamp of next expected data position, may be invalid/unknown

unsigned long m_nextStamp

m_nextStamp

[protected]

DataTranslator* m_translator

m_translator

[protected]

ObjList m_consumers

m_consumers

[protected]

Mutex m_mutex

m_mutex

[protected]


Generated by: root on dragoshel on Sat Apr 14 01:50:50 2007, using kdoc 2.0a54.