Yate: DataNode Class Reference

Yate

Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
DataNode Class Reference

`#include <yatephone.h>`

Inheritance diagram for DataNode:

## Public Types
enum | DataFlags { DataStart = 0x0001 , DataEnd = 0x0002 , DataMark = 0x0004 , DataSilent = 0x0008 , DataMissed = 0x0010 , DataError = 0x0020 , DataPrivate = 0x0100 }

## Public Member Functions
| 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 void * | getObject (const String &name) const
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)

## Static Public Member Functions
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
DataFormat | m_format
unsigned long | m_timestamp

## Friends
class | DataEndpoint

## Additional Inherited Members
Protected Member Functions inherited from RefObject
virtual void | zeroRefs ()
bool | resurrect ()
virtual void | destroyed ()

## Detailed Description

A generic data handling object

## Member Enumeration Documentation

## ◆ DataFlags

enum DataFlags

Flags associated with the DataBlocks forwarded between nodes

## Constructor & Destructor Documentation

## ◆ DataNode()

DataNode | ( | const char * | format = 0 | ) |
| inlineexplicit

Construct a DataNode

Parameters

  format | Description of the data format, default none

## Member Function Documentation

## ◆ attached()

virtual void attached | ( | bool | added | ) |
| inlinevirtual

Owner attach and detach notification. This method is called with DataEndpoint::commonMutex() held

Parameters

  added | True if a new owner was added, false if it was removed

## ◆ control()

virtual bool control | ( | NamedList & | params | ) |
| inlinevirtual

Modify node parameters

Parameters

  params | The list of parameters to change

Returns
  True if processed

Reimplemented in DataSource.

## ◆ costFormat()

virtual int costFormat | ( | const DataFormat & | format | ) |
| inlinevirtual

Get the computing cost of converting the data to the format asked

Parameters

  format | Name of the format to check for

Returns
  -1 if unsupported, 0 for native format else cost in KIPS

## ◆ getFormat()

const DataFormat & getFormat | ( |  | ) | const
| inline

Get the description of the format currently in use

Returns
  Pointer to the data format

## ◆ invalidStamp()

static unsigned long invalidStamp | ( |  | ) |
| inlinestatic

Get the internal representation of an invalid or unknown timestamp

Returns
  Invalid timestamp - unsigned long conversion of -1

## ◆ setFormat()

virtual bool setFormat | ( | const DataFormat & | format | ) |
| inlinevirtual

Change the format used to transfer data

Parameters

  format | Name of the format to set for data

Returns
  True if the format changed successfully, false if not changed

## ◆ timeStamp()

unsigned long timeStamp | ( |  | ) | const
| inline

Get the current position in the data stream

Returns
  Timestamp of current data position

## ◆ valid()

virtual bool valid | ( |  | ) | const
| inlinevirtual

Check if this data node is still valid

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

Reimplemented in DataSource, and DataTranslator.

The documentation for this class was generated from the following file:

- yatephone.h