|
|
A data source
inline DataSource (const char* format = "slin")
| DataSource |
Source constructor
Parameters:
format | Name 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:
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.
void Forward (const DataBlock& data, unsigned long tStamp = invalidStamp())
| Forward |
Forwards the data to its consumers
Parameters:
data | The raw data block to forward; an empty block ends data |
tStamp | Timestamp of data - typically samples |
bool attach (DataConsumer* consumer, bool override = false)
| attach |
Attach a data consumer
Parameters:
consumer | Data consumer to attach |
override | Attach as temporary source override |
Returns: True on success, false on failure
bool detach (DataConsumer* consumer)
| detach |
Detach a data consumer
Parameters:
consumer | Data 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:
tStamp | New 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. |