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

CallStat Class Reference

A call statistic class is used to manipulate call stats with a mutex lock to prevent errors during "adjustment" periods.call statistic collection object. More...

#include <bayonne.h>

Inheritance diagram for CallStat:

Mutex TrunkGroup UsageStat List of all members.

Public Member Functions

 CallStat ()
int getCapacity (void)
 Get current call capacity.
long getStat (statitem_t item)
 get a stat item.
void getStat (unsigned long *save)
 Get a stat record at once.
void incIncoming (void)
 inc active incoming call count.
void decIncoming (void)
 dec active incoming call count.
void incOutgoing (void)
 inc active outging call count.
void decOutgoing (void)
 dec active outgoing call count.
long getIdleTime ()
 Get idle time in seconds.
void update (void)
 Update stats, active to last.

Protected Attributes

volatile bool dirty
time_t updated
time_t prior
time_t idled
int capacity
struct {
   int   incoming
   int   outgoing
active
struct {
   int   incoming
   int   outgoing
max
struct {
   int   incoming
   int   outgoing
lastmax
struct {
   long   incoming
   long   outgoing
total
struct {
   long   incoming
   long   outgoing
lasttotal

Static Protected Attributes

static unsigned long upincoming
static unsigned long upoutgoing
static time_t uptime

Detailed Description

A call statistic class is used to manipulate call stats with a mutex lock to prevent errors during "adjustment" periods.call statistic collection object.

Author:
David Sugar <dyfet@ostel.com>


Constructor & Destructor Documentation

CallStat::CallStat  ) 
 


Member Function Documentation

void CallStat::decIncoming void   ) 
 

dec active incoming call count.

void CallStat::decOutgoing void   ) 
 

dec active outgoing call count.

int CallStat::getCapacity void   )  [inline]
 

Get current call capacity.

Returns:
capacity of this stat item.

long CallStat::getIdleTime  ) 
 

Get idle time in seconds.

Reimplemented in TrunkGroup.

void CallStat::getStat unsigned long *  save  ) 
 

Get a stat record at once.

Parameters:
pointer to stats to copy.

long CallStat::getStat statitem_t  item  ) 
 

get a stat item.

Parameters:
statitem to request.
Returns:
item value.

void CallStat::incIncoming void   ) 
 

inc active incoming call count.

void CallStat::incOutgoing void   ) 
 

inc active outging call count.

void CallStat::update void   ) 
 

Update stats, active to last.


Member Data Documentation

struct { ... } CallStat::active [protected]
 

int CallStat::capacity [protected]
 

volatile bool CallStat::dirty [protected]
 

time_t CallStat::idled [protected]
 

long CallStat::incoming [protected]
 

int CallStat::incoming [protected]
 

struct { ... } CallStat::lastmax [protected]
 

struct { ... } CallStat::lasttotal [protected]
 

struct { ... } CallStat::max [protected]
 

long CallStat::outgoing [protected]
 

int CallStat::outgoing [protected]
 

time_t CallStat::prior [protected]
 

struct { ... } CallStat::total [protected]
 

time_t CallStat::updated [protected]
 

unsigned long CallStat::upincoming [static, protected]
 

unsigned long CallStat::upoutgoing [static, protected]
 

time_t CallStat::uptime [static, 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