class DataSource

A data source More...

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

Public Methods

Protected Members


Detailed Description

A data source

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

DataSource

Source constructor

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

void  destroyed ()

destroyed

[virtual]

Source's destruct notification - detaches all consumers

Reimplemented from RefObject.

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

bool  valid ()

valid

[const virtual]

Check if this data source is still valid

Returns: True if still valid, false if node should be removed

Reimplemented from DataNode.

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

Forward

Forwards the data to its consumers

Parameters:
dataThe raw data block to forward
tStampTimestamp of data - typically samples
flagsIndicator flags associated with the data block

Returns: Number of samples actually forwarded to all consumers

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

ObjList m_consumers

m_consumers

[protected]


Generated by: paulc on bussard on Fri Dec 21 16:28:34 2012, using kdoc 2.0a54.