# class DataNode | A generic data handling object More...
Full name | `TelEngine::DataNode`
Definition | `#include <yatephone.h>`
Inherits | TelEngine::RefObject [public ]
Inherited by | DataConsumer, DataSource, DataTranslator, ThreadedSource
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

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

#### Public Methods

- inline explicit DataNode (const char* format = 0)
- virtual int costFormat (const DataFormat& format)
- virtual bool setFormat (const DataFormat& format)
- inline const DataFormat& getFormat () const
- inline unsigned long timeStamp () const
- virtual bool valid () const
- virtual bool control (NamedList& params)

#### Public Static Methods

- static inline unsigned long invalidStamp ()

#### Protected Methods

- virtual void attached (bool added)

#### Protected Members

- DataFormat m_format
- unsigned long m_timestamp

## Detailed Description

A generic data handling object

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

Flags associated with the DataBlocks forwarded between nodes

inline explicit DataNode (const char* format = 0) | ### DataNode

Construct a DataNode

Parameters:

format | Description of the data format, default none

int costFormat (const DataFormat& format) | ### costFormat

[virtual]

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

bool setFormat (const DataFormat& format) | ### setFormat

[virtual]

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

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

[const]

Get the description of the format currently in use

Returns: Pointer to the data format

inline unsigned long timeStamp () | ### timeStamp

[const]

Get the current position in the data stream

Returns: Timestamp of current data position

bool valid () | ### valid

[const virtual]

Check if this data node is still valid

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

bool control (NamedList& params) | ### control

[virtual]

Modify node parameters

Parameters:

params | The list of parameters to change

Returns: True if processed

inline unsigned long invalidStamp () | ### invalidStamp

[static]

Get the internal representation of an invalid or unknown timestamp

Returns: Invalid timestamp - unsigned long conversion of -1

void attached (bool added) | ### attached

[protected virtual]

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

DataFormat m_format | ### m_format

[protected]

unsigned long m_timestamp | ### m_timestamp

[protected]

Generated by: paulc on bussard on Fri May 8 12:37:22 2015, using kdoc 2.0a54.