Yate
Router Class Reference

Call routing thread. More...

#include <yatephone.h>

Inheritance diagram for Router:
Thread Runnable

Public Member Functions

 Router (Driver *driver, const char *id, Message *msg)
 
virtual void run ()
 
virtual bool route ()
 
virtual void cleanup ()
 
- Public Member Functions inherited from Thread
bool startup ()
 
bool error () const
 
bool running () const
 
int getAffinity (DataBlock &outCpuMask)
 
int setAffinity (const String &cpus)
 
int setAffinity (const DataBlock &mask)
 
int locks () const
 
bool locked () const
 
const char * name () const
 
void cancel (bool hard=false)
 
bool isCurrent () const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 
- Public Member Functions inherited from Runnable
virtual ~Runnable ()
 

Protected Member Functions

const Stringid () const
 
- Protected Member Functions inherited from Thread
 Thread (const char *name=0, Priority prio=Normal)
 
 Thread (const char *name, const char *prio)
 
virtual ~Thread ()
 

Additional Inherited Members

- Public Types inherited from Thread
enum  Priority {
  Lowest , Low , Normal , High ,
  Highest
}
 
- Static Public Member Functions inherited from Thread
static const char * currentName ()
 
static int getCurrentAffinity (DataBlock &outCpuMask)
 
static int getCurrentAffinity (String &outCpus, bool hex=false)
 
static int setCurrentAffinity (const String &cpus)
 
static int setCurrentAffinity (const DataBlock &mask)
 
static bool parseCPUMask (const String &cpus, DataBlock &mask)
 
static void printCPUMask (const DataBlock &mask, String &str, bool hexa=true)
 
static void yield (bool exitCheck=false)
 
static void idle (bool exitCheck=false)
 
static void sleep (unsigned int sec, bool exitCheck=false)
 
static void msleep (unsigned long msec, bool exitCheck=false)
 
static void usleep (unsigned long usec, bool exitCheck=false)
 
static unsigned long idleUsec ()
 
static unsigned long idleMsec ()
 
static void idleMsec (unsigned long msec)
 
static Threadcurrent ()
 
static int count ()
 
static bool check (bool exitNow=true)
 
static void exit ()
 
static NamedCountergetCurrentObjCounter (bool always=false)
 
static NamedCountersetCurrentObjCounter (NamedCounter *counter)
 
static Priority priority (const char *name, Priority defvalue=Normal)
 
static const char * priority (Priority prio)
 
static void killall ()
 
static void preExec ()
 
static int lastError ()
 
static bool errorString (String &buffer)
 
static bool errorString (String &buffer, int code)
 

Detailed Description

Call routing thread.

Asynchronous call routing thread

Constructor & Destructor Documentation

◆ Router()

Router ( Driver * driver,
const char * id,
Message * msg )

Constructor - creates a new routing thread

Parameters
driverPointer to the driver that asked for routing
idUnique identifier of the channel being routed
msgPointer to an already filled message

Member Function Documentation

◆ cleanup()

virtual void cleanup ( )
virtual

Thread cleanup handler

Reimplemented from Thread.

◆ id()

const String & id ( ) const
inlineprotected

Get the routed channel identifier

Returns
Unique id of the channel being routed

◆ route()

virtual bool route ( )
virtual

Actual routing method

Returns
True if call was successfully routed

◆ run()

virtual void run ( )
virtual

Main thread running method

Implements Runnable.


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