Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages | Examples

Driver Class Reference

The driver class represents an abstract means of accessing the internals of a Bayonne driver plug-in module.Bayonne driver interface class. More...

#include <bayonne.h>

Inheritance diagram for Driver:

Mutex List of all members.

Public Types

enum  {
  capDaemon = 0x0001, capPSTN = 0x0002, capJoin = 0x00004, capSpans = 0x0008,
  capSpeed = 0x0010, capPitch = 0x0020, capGain = 0x0040, capListen = 0x0080,
  capIP = 0x00160, capDynamic = 0x1000, capSwitch = 0x2000, capConference = 0x4000,
  capOffline = 0x8000
}
enum  {
  TRUNK_URI = 0x0001, TRUNK_EXTENSION = 0x0002, TRUNK_GROUP = 0x0004, TRUNK_TIE = 0x0008,
  TRUNK_LOCAL = 0x0032, TRUNK_START = 0x0160
}

Public Member Functions

void ticTimer (void)
 inc ref timer for sec tics.
virtual void secTick (void)
 Second tick interval counter.
virtual unsigned getCaps (void)
 Return driver capabilities.
 Driver ()
 Create an instance of the driver.
virtual char * getName (void)
 Get the name of the driver.
bool isIdle (void)
 Report if driver is idle.
bool isDown (void)
 Report if driver is down.
virtual int start (void)=0
 Start a driver; start service threads, build device nodes, etc.
virtual void stop (void)=0
 Shutdown the driver, service threads, etc.
virtual aaImagegetImage (void)
 Load a script image.
virtual unsigned getTrunkCount (void)=0
 Get total number of port identifiers (timeslots) used by the current driver.
virtual unsigned getTrunkUsed (void)
 Get active number of ports actually deployed by the current driver.
int getTrunkMember (TrunkGroup *grp, unsigned member)
 Get the trunk group member trunk.
virtual TrunkgetTrunkPort (int id)=0
 Get an individual port from the driver by timeslot/id.
virtual bool isTrunkClass (int id, const char *name)
 Return driver classification either by supporting group name or because the id used is valid for this driver or the specified port.
virtual TrunkgetOutboundTrunk (int id)
 Get an individual port from the driver by timeslot/id for the outbound (gives drivers which dynamically allocate trunks the opportunity to create one).
TrunkgetTrunkId (const char *id)
 Get a trunk by a id or global id string.
virtual bool spanEvent (unsigned span, TrunkEvent *event)
 Span event operations.
virtual bool cardEvent (unsigned card, TrunkEvent *event)
 card event operations.
int getDriverIndex (void)

Static Public Member Functions

static void setNodes ()
static void getStatus (char *buffer)
 Get a local copy of the status string.
static unsigned getCount (void)
 Get total driver port capacity as a count.
static TrunkgetTrunk (const char *name, bool create=false, Driver *driver=NULL)
static DrivergetIndexedDriver (int idx)

Public Attributes

DriverdrvNext

Static Public Attributes

static DriverdrvFirst
static unsigned drvIndex

Protected Member Functions

DrivergetFirst (void)
virtual ConferencegetConference (const char *id, unsigned size=0)

Protected Attributes

Conferencefirst
Conferencelast
bool active
unsigned portCount
unsigned downCount
volatile unsigned idleCount
AtomicCounter refTimer
time_t nextTimer
unsigned tsid
int index

Friends

class TrunkGroup
class Trunk
class MappedDrivers
class Conference
__EXPORT DrivergetDriver (const char *name)

Detailed Description

The driver class represents an abstract means of accessing the internals of a Bayonne driver plug-in module.Bayonne driver interface class.

Author:
David Sugar <dyfet@ostel.com>


Member Enumeration Documentation

anonymous enum
 

Enumerator:
capDaemon 
capPSTN 
capJoin 
capSpans 
capSpeed 
capPitch 
capGain 
capListen 
capIP 
capDynamic 
capSwitch 
capConference 
capOffline 

anonymous enum
 

Enumerator:
TRUNK_URI 
TRUNK_EXTENSION 
TRUNK_GROUP 
TRUNK_TIE 
TRUNK_LOCAL 
TRUNK_START 


Constructor & Destructor Documentation

Driver::Driver  ) 
 

Create an instance of the driver.


Member Function Documentation

virtual bool Driver::cardEvent unsigned  card,
TrunkEvent event
[inline, virtual]
 

card event operations.

Card event operations.

Returns:
true if successful.
Parameters:
card to effect.
event to pass.

virtual unsigned Driver::getCaps void   )  [inline, virtual]
 

Return driver capabilities.

virtual Conference* Driver::getConference const char *  id,
unsigned  size = 0
[inline, protected, virtual]
 

static unsigned Driver::getCount void   )  [static]
 

Get total driver port capacity as a count.

Returns:
total port capacity count.

int Driver::getDriverIndex void   )  [inline]
 

Driver* Driver::getFirst void   )  [inline, protected]
 

virtual aaImage* Driver::getImage void   )  [virtual]
 

Load a script image.

Usually this is not driver specific, though it can be made to be so.

Returns:
ScriptImage base abstract.

static Driver* Driver::getIndexedDriver int  idx  )  [static]
 

virtual char* Driver::getName void   )  [inline, virtual]
 

Get the name of the driver.

virtual Trunk* Driver::getOutboundTrunk int  id  )  [inline, virtual]
 

Get an individual port from the driver by timeslot/id for the outbound (gives drivers which dynamically allocate trunks the opportunity to create one).

Returns:
trunk port object.

static void Driver::getStatus char *  buffer  )  [static]
 

Get a local copy of the status string.

Parameters:
local status buffer.

static Trunk* Driver::getTrunk const char *  name,
bool  create = false,
Driver driver = NULL
[static]
 

virtual unsigned Driver::getTrunkCount void   )  [pure virtual]
 

Get total number of port identifiers (timeslots) used by the current driver.

Returns:
trunk timeslots/ports allocated.

Trunk* Driver::getTrunkId const char *  id  ) 
 

Get a trunk by a id or global id string.

Parameters:
trunk or port reference id.
Returns:
trunk port object.

int Driver::getTrunkMember TrunkGroup grp,
unsigned  member
 

Get the trunk group member trunk.

Returns:
trunk group port id.
Parameters:
trunk group to locate.
member id to locate.

virtual Trunk* Driver::getTrunkPort int  id  )  [pure virtual]
 

Get an individual port from the driver by timeslot/id.

Returns:
trunk port object.

virtual unsigned Driver::getTrunkUsed void   )  [inline, virtual]
 

Get active number of ports actually deployed by the current driver.

Returns:
actual trunks used.

bool Driver::isDown void   ) 
 

Report if driver is down.

bool Driver::isIdle void   ) 
 

Report if driver is idle.

virtual bool Driver::isTrunkClass int  id,
const char *  name
[virtual]
 

Return driver classification either by supporting group name or because the id used is valid for this driver or the specified port.

virtual void Driver::secTick void   )  [virtual]
 

Second tick interval counter.

static void Driver::setNodes  )  [static]
 

virtual bool Driver::spanEvent unsigned  span,
TrunkEvent event
[virtual]
 

Span event operations.

Returns:
true if success.
Parameters:
span to effect.
event to pass.

virtual int Driver::start void   )  [pure virtual]
 

Start a driver; start service threads, build device nodes, etc.

Returns:
number of active device ports.

virtual void Driver::stop void   )  [pure virtual]
 

Shutdown the driver, service threads, etc.

void Driver::ticTimer void   )  [inline]
 

inc ref timer for sec tics.


Friends And Related Function Documentation

friend class Conference [friend]
 

__EXPORT Driver* getDriver const char *  name  )  [friend]
 

friend class MappedDrivers [friend]
 

friend class Trunk [friend]
 

friend class TrunkGroup [friend]
 


Member Data Documentation

bool Driver::active [protected]
 

unsigned Driver::downCount [protected]
 

Driver* Driver::drvFirst [static]
 

unsigned Driver::drvIndex [static]
 

Driver* Driver::drvNext
 

Conference* Driver::first [protected]
 

volatile unsigned Driver::idleCount [protected]
 

int Driver::index [protected]
 

Conference * Driver::last [protected]
 

time_t Driver::nextTimer [protected]
 

unsigned Driver::portCount [protected]
 

AtomicCounter Driver::refTimer [protected]
 

unsigned Driver::tsid [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Sep 13 02:19:09 2005 for Bayonne by  doxygen 1.4.4