Yate
Public Member Functions | List of all members
IAXMetaTrunkFrame Class Reference

Meta trunk frame. More...

#include <yateiax.h>

Inheritance diagram for IAXMetaTrunkFrame:
RefObject Mutex GenObject Lockable

Public Member Functions

 IAXMetaTrunkFrame (IAXEngine *engine, const SocketAddr &addr, bool timestamps, unsigned int maxLen, unsigned int sendInterval)
 
virtual ~IAXMetaTrunkFrame ()
 
const SocketAddraddr () const
 
unsigned int calls () const
 
void changeCalls (bool add)
 
bool trunkTimestamps () const
 
unsigned int sendInterval () const
 
unsigned int maxLen () const
 
unsigned int add (u_int16_t sCallNo, const DataBlock &data, u_int32_t tStamp)
 
bool timerTick (const Time &now=Time())
 
bool send ()
 
- 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 bool alive () const
 
virtual void destruct ()
 
virtual const StringtoString () const
 
virtual const StringtraceId () const
 
virtual void * getObject (const String &name) const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 
- Public Member Functions inherited from Mutex
 Mutex (bool recursive=false, const char *name=0)
 
 Mutex (const Mutex &original)
 
 ~Mutex ()
 
Mutexoperator= (const Mutex &original)
 
virtual bool lock (long maxwait=-1)
 
virtual bool unlock ()
 
virtual bool locked () const
 
const char * owner () const
 
bool recursive () const
 
- Public Member Functions inherited from Lockable
virtual ~Lockable ()
 
virtual bool lock (long maxwait=-1)=0
 
virtual bool unlock ()=0
 
virtual bool locked () const =0
 
virtual bool check (long maxwait=-1)
 
virtual bool unlockAll ()
 

Additional Inherited Members

- 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 NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 
- Static Public Member Functions inherited from Mutex
static int count ()
 
static int locks ()
 
static bool efficientTimedLock ()
 
- Static Public Member Functions inherited from Lockable
static void wait (unsigned long maxwait)
 
static unsigned long wait ()
 
static void startUsingNow ()
 
static void enableSafety (bool safe=true)
 
static bool safety ()
 
- Protected Member Functions inherited from RefObject
virtual void zeroRefs ()
 
bool resurrect ()
 
virtual void destroyed ()
 

Detailed Description

Meta trunk frame.

Handle meta trunk frame with timestamps

Constructor & Destructor Documentation

◆ IAXMetaTrunkFrame()

IAXMetaTrunkFrame ( IAXEngine engine,
const SocketAddr addr,
bool  timestamps,
unsigned int  maxLen,
unsigned int  sendInterval 
)

Constructor. Constructs an outgoing meta trunk frame

Parameters
engineThe engine that owns this frame
addrRemote peer address
timestampsTrue if miniframes have timestamps, false if not
maxLenMaximum frame length
sendIntervalTrunk send interval in milliseconds

◆ ~IAXMetaTrunkFrame()

virtual ~IAXMetaTrunkFrame ( )
virtual

Destructor

Member Function Documentation

◆ add()

unsigned int add ( u_int16_t  sCallNo,
const DataBlock data,
u_int32_t  tStamp 
)

Add a mini frame. If no room, send before adding

Parameters
sCallNoSorce call number
dataMini frame data
tStampMini frame timestamp
Returns
The number of data bytes added to trunk, 0 on failure

◆ addr()

const SocketAddr & addr ( ) const
inline

Get the remote peer address

Returns
The remote peer address

◆ calls()

unsigned int calls ( ) const
inline

Retrieve the number of calls using this trunk

Returns
The number of calls using this trunk

◆ changeCalls()

void changeCalls ( bool  add)
inline

Change the number of calls using this trunk

Parameters
addTrue to add a call, false to remove it

◆ maxLen()

unsigned int maxLen ( ) const
inline

Retrieve the frame maximum length

Returns
Frame maximum length

◆ send()

bool send ( )
inline

Send this frame to remote peer if there is any data in buffer

Returns
The result of the write operation

◆ sendInterval()

unsigned int sendInterval ( ) const
inline

Retrieve the send interval

Returns
Send interval in milliseconds

◆ timerTick()

bool timerTick ( const Time now = Time())
inline

Send this frame to remote peer if the time arrived

Parameters
nowCurrent time
Returns
The result of the write operation

◆ trunkTimestamps()

bool trunkTimestamps ( ) const
inline

Check if the frame is adding mini frames timestamps

Returns
True if the frame is adding mini frames timestamps

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