ost::BayonneSpan Class Reference

A span is a collection of ports under a single control interface or communication channel, such as a T1/E1/PRI/BRI span. More...

#include <bayonne.h>

Inheritance diagram for ost::BayonneSpan:

ost::Bayonne

List of all members.

Public Member Functions

 BayonneSpan (BayonneDriver *driver, timeslot_t timeslots)
 Create a span for a specified number of timeslots.
BayonneSessiongetTimeslot (timeslot_t id)
 Get the session associated with the nth timeslot of the span.
timeslot_t getFirst (void)
 Get the first server timeslot of this span.
timeslot_t getCount (void)
 Return total number of server timeslots in this span.
unsigned getId (void)
 Get the id associated with this span.
BayonneDrivergetDriver (void)
 Get driver associated with this span.
unsigned getAvail (void)
 Get number of call slots still available.
virtual bool suspend (void)
 Suspend a span.
virtual bool resume (void)
 Resume a suspended span.
virtual bool reset (void)
 Reset a span.

Static Public Member Functions

static BayonneSpanget (unsigned id)
 Get a span by a global span id.
static void allocate (unsigned total=0)
 Allocate the total number of spans this server will support.
static unsigned getSpans (void)
 Return total spans in use.

Public Attributes

Traffic call_attempts
Traffic call_complete
volatile unsigned short active_calls

Protected Attributes

unsigned id
BayonneDriverdriver
BayonneSpannext
timeslot_t timeslot
timeslot_t count
timeslot_t used

Static Protected Attributes

static BayonneSpanfirst
static BayonneSpanlast
static unsigned spans
static BayonneSpan ** index

Friends

class __EXPORT BayonneSession
class __EXPORT BayonneDriver


Detailed Description

A span is a collection of ports under a single control interface or communication channel, such as a T1/E1/PRI/BRI span.

Author:
David Sugar <dyfet@gnutelephony.org> Span management object.

Constructor & Destructor Documentation

ost::BayonneSpan::BayonneSpan ( BayonneDriver driver,
timeslot_t  timeslots 
)

Create a span for a specified number of timeslots.

Parameters:
driver associated with span.
timeslots this span covers.


Member Function Documentation

static BayonneSpan* ost::BayonneSpan::get ( unsigned  id  )  [static]

Get a span by a global span id.

Parameters:
id of span.
Returns:
span object associated with id.

BayonneSession* ost::BayonneSpan::getTimeslot ( timeslot_t  id  ) 

Get the session associated with the nth timeslot of the span.

Parameters:
id of nth timeslot of span.
Returns:
associated session object.

static void ost::BayonneSpan::allocate ( unsigned  total = 0  )  [static]

Allocate the total number of spans this server will support.

Parameters:
total span count.

static unsigned ost::BayonneSpan::getSpans ( void   )  [inline, static]

Return total spans in use.

Returns:
total spans in use.

timeslot_t ost::BayonneSpan::getFirst ( void   )  [inline]

Get the first server timeslot of this span.

Returns:
first server timeslot.

timeslot_t ost::BayonneSpan::getCount ( void   )  [inline]

Return total number of server timeslots in this span.

Returns:
server timeslot count.

unsigned ost::BayonneSpan::getId ( void   )  [inline]

Get the id associated with this span.

Returns:
global id of this span object.

BayonneDriver* ost::BayonneSpan::getDriver ( void   )  [inline]

Get driver associated with this span.

Returns:
driver object for span.

unsigned ost::BayonneSpan::getAvail ( void   )  [inline]

Get number of call slots still available.

Returns:
count of call slots available.

virtual bool ost::BayonneSpan::suspend ( void   )  [virtual]

Suspend a span.

Returns:
true if successful.

virtual bool ost::BayonneSpan::resume ( void   )  [virtual]

Resume a suspended span.

Returns:
true if successful.

virtual bool ost::BayonneSpan::reset ( void   )  [virtual]

Reset a span.

Returns:
true if successful.


Friends And Related Function Documentation

friend class __EXPORT BayonneSession [friend]

friend class __EXPORT BayonneDriver [friend]


Member Data Documentation

BayonneSpan* ost::BayonneSpan::first [static, protected]

BayonneSpan* ost::BayonneSpan::last [static, protected]

unsigned ost::BayonneSpan::spans [static, protected]

BayonneSpan** ost::BayonneSpan::index [static, protected]

unsigned ost::BayonneSpan::id [protected]

BayonneDriver* ost::BayonneSpan::driver [protected]

BayonneSpan* ost::BayonneSpan::next [protected]

timeslot_t ost::BayonneSpan::timeslot [protected]

timeslot_t ost::BayonneSpan::count [protected]

timeslot_t ost::BayonneSpan::used [protected]

Traffic ost::BayonneSpan::call_attempts

Traffic ost::BayonneSpan::call_complete

volatile unsigned short ost::BayonneSpan::active_calls


The documentation for this class was generated from the following file:
Generated on Wed Jan 16 04:45:27 2008 for Bayonne by  doxygen 1.5.4