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.Span management object. More...

#include <bayonne.h>

Inheritance diagram for ost::BayonneSpan:

ost::Bayonne List of all members.

Public Member Functions

 BayonneSpan (BayonneDriver *d, timeslot_t count)
 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.

Static Public Member Functions

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

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.Span management object.

Author:
David Sugar <dyfet@gnutelephony.org>


Constructor & Destructor Documentation

ost::BayonneSpan::BayonneSpan BayonneDriver d,
timeslot_t  count
 

Create a span for a specified number of timeslots.

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


Member Function Documentation

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

Allocate the total number of spans this server will support.

Parameters:
total span count.

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

Get a span by a global span id.

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

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

Get number of call slots still available.

Returns:
count of call slots available.

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

Return total number of server timeslots in this span.

Returns:
server timeslot count.

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

Get driver associated with this span.

Returns:
driver object for span.

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

Get the first server timeslot of this span.

Returns:
first server timeslot.

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

Get the id associated with this span.

Returns:
global id of this span object.

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

Return total spans in use.

Returns:
total spans in use.

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

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

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


Friends And Related Function Documentation

friend class __EXPORT BayonneDriver [friend]
 

friend class __EXPORT BayonneSession [friend]
 


Member Data Documentation

timeslot_t ost::BayonneSpan::count [protected]
 

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

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

unsigned ost::BayonneSpan::id [protected]
 

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

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

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

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

timeslot_t ost::BayonneSpan::timeslot [protected]
 

timeslot_t ost::BayonneSpan::used [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue May 2 13:21:09 2006 for Bayonne by  doxygen 1.4.6