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

NAME

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

SYNOPSIS



#include <bayonne.h>

Inherits aaScript.

Public Types

enum { capDaemon = 0x0001, capPSTN = 0x0002, capJoin = 0x00004, capSpans = 0x0008, capSpeed = 0x0010, capPitch = 0x0020, capGain = 0x0040, capSwitch = 0x2000, capConference = 0x4000, capOffline = 0x8000, capReroute = 0x10000 }

Public Member Functions

virtual void secTick (void)

Second tick interval counter. virtual unsigned getCaps (void)

Return driver capabilities. Driver ()

Create an instance of the driver. virtual bool setExtNumbering (unsigned)

Set extension numbering scheme. unsigned getExtNumbering (void)

Get current extension numbering scheme. virtual Trunk ** getExtIndex (const char *num)

Lookup the extension index entry. 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. void getStatus (char *buffer)

Get a local copy of the status string. virtual aaImage * getImage (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. void setTrunkGroup (int id, int card, int span)

Set the trunk group by span and card as well as port. TrunkGroup * getTrunkGroup (int id)

Get the trunk group of an identified port. TrunkGroup * getSpanGroup (int id)

TrunkGroup * getCardGroup (int id)

TrunkGroup * getStaGroup (int id)

int getTrunkMember (TrunkGroup *grp, unsigned member)

Get the trunk group member trunk. virtual Trunk * getTrunkPort (int id)=0

Get an individual port from the driver by timeslot/id. Trunk * getTrunkId (const char *id)

Get a trunk by a id or global id string. Trunk * getExtNumber (const char *ext)

Get a trunk by extension reference. bool setExtNumber (unsigned id, const char *ext)

Set a physical port to an extension number in the dialing plan. bool setExtVirtual (unsigned id, const char *ext)

Set or assign a virtual extension number in the dialing plan. bool clrExtNumber (const char *ext)

Clear an extension number entry. virtual Trunk * getTrkNumber (const char *trk)

Get a trunk by trunk reference. virtual Trunk * getTieNumber (const char *tie)

Get a trunk by tie trunk reference. unsigned getExtCount (void)

Get the extension count. unsigned getTrkCount (void)

Get the total trunk count. unsigned getTieCount (void)

Get thr total tie line count. virtual Conference * getConference (int id)

Get an individual conference resource. virtual Mixer * getMixer (int id)

Get an individual mixer resource by number. virtual unsigned getMixers (void)

Get the driver's chip count/conference unit capacity. virtual unsigned getGroups (void)

Get the total conference groups available. virtual bool spanEvent (unsigned span, TrunkEvent *event)

Span event operations. virtual bool cardEvent (unsigned card, TrunkEvent *event)

card event operations.

Protected Attributes

TrunkGroup ** groups

TrunkGroup * spans [64]

TrunkGroup * cards [64]

TrunkGroup * stacards [64]

char * status

bool active

unsigned portCount

unsigned downCount

unsigned extCount

unsigned trkCount

unsigned tieCount

unsigned numCount

Trunk ** extIndex

volatile unsigned idleCount

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>

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.

bool Driver::clrExtNumber (const char * ext)

Clear an extension number entry.

Parameters: extension to clear.

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

Return driver capabilities.

virtual Conference* Driver::getConference (int id) [inline, virtual]

Get an individual conference resource.

Returns: conference number.

unsigned Driver::getExtCount (void) [inline]

Get the extension count.

Returns: total extension count.

virtual Trunk** Driver::getExtIndex (const char * num) [virtual]

Lookup the extension index entry.

Parameters: extension number.

Returns: NULL or index entry reference.

Trunk* Driver::getExtNumber (const char * ext)

Get a trunk by extension reference.

Parameters: extension number.

Returns: trunk port object.

unsigned Driver::getExtNumbering (void) [inline]

Get current extension numbering scheme.

Returns: extension number size.

virtual unsigned Driver::getGroups (void) [inline, virtual]

Get the total conference groups available.

Returns: conference groups.

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.

virtual Mixer* Driver::getMixer (int id) [inline, virtual]

Get an individual mixer resource by number.

Returns: conference mixer.

virtual unsigned Driver::getMixers (void) [inline, virtual]

Get the driver's chip count/conference unit capacity.

Returns: conference mixer resources.

void Driver::getStatus (char * buffer)

Get a local copy of the status string.

Parameters: local status buffer.

unsigned Driver::getTieCount (void) [inline]

Get thr total tie line count.

Returns: tie count.

virtual Trunk* Driver::getTieNumber (const char * tie) [inline, virtual]

Get a trunk by tie trunk reference.

Parameters: tie trunk id

Returns: trunk port object.

unsigned Driver::getTrkCount (void) [inline]

Get the total trunk count.

Returns: trunk count.

virtual Trunk* Driver::getTrkNumber (const char * trk) [inline, virtual]

Get a trunk by trunk reference.

Parameters: trunk number

Returns: trunk port object.

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

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

Returns: trunk timeslots/ports allocated.

TrunkGroup* Driver::getTrunkGroup (int id) [inline]

Get the trunk group of an identified port.

Returns: trunk group pointer.

Parameters: id .RE

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 void Driver::secTick (void) [virtual]

Second tick interval counter.

bool Driver::setExtNumber (unsigned id, const char * ext)

Set a physical port to an extension number in the dialing plan.

Parameters: physical extension port.

extension number to associate.

virtual bool Driver::setExtNumbering (unsigned) [virtual]

Set extension numbering scheme.

bool Driver::setExtVirtual (unsigned id, const char * ext)

Set or assign a virtual extension number in the dialing plan.

Parameters: physical extension port tp associate with.

virtual extension number.

void Driver::setTrunkGroup (int id, int card, int span)

Set the trunk group by span and card as well as port.

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.

Author

Generated automatically by Doxygen for Bayonne from the source code.