Yate

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | List of all members
Router Class Reference

Call routing thread. More...

`#include <yatephone.h>`

Inheritance diagram for Router:

## 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
NamedCounter * | getObjCounter () const
NamedCounter * | setObjCounter (NamedCounter *counter)
Public Member Functions inherited from Runnable
virtual | ~Runnable ()

## Protected Member Functions
const String & | id () 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 Thread * | current ()
static int | count ()
static bool | check (bool exitNow=true)
static void | exit ()
static NamedCounter * | getCurrentObjCounter (bool always=false)
static NamedCounter * | setCurrentObjCounter (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 | ( | Driver * | driver,
|  | const char * | id,
|  | Message * | msg
| ) |  |

Constructor - creates a new routing thread

Parameters

  driver | Pointer to the driver that asked for routing
  id | Unique identifier of the channel being routed
  msg | Pointer to an already filled message

## Member Function Documentation

virtual void cleanup | ( |  | ) |
| virtual

Thread cleanup handler

Reimplemented from Thread.

const String& id | ( |  | ) | const
| inline protected

Get the routed channel identifier

Returns
  Unique id of the channel being routed

virtual bool route | ( |  | ) |
| virtual

Actual routing method

Returns
  True if call was successfully routed

virtual void run | ( |  | ) |
| virtual

Main thread running method

Implements Runnable.

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

- yatephone.h