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

EventBuffer Class Reference

The EventBuffer class is used to buffer and pass port trunks events, which, in the past, when used in some drivers, were typically done with a "pipe" and a select or poll call.Bayonne event record buffering. More...

#include <bayonne.h>

Inheritance diagram for EventBuffer:

Buffer List of all members.

Public Member Functions

void update (TrunkEvent *event=NULL)
 Post a TrunkEvent to the buffer.

Protected Member Functions

void fetch (timeout_t timeout, TrunkEvent *event)
 Waits for a specified timeout for an event to be available.
 EventBuffer (unsigned count)
 This class is often constructed as part of a Driver or service thread class.

Detailed Description

The EventBuffer class is used to buffer and pass port trunks events, which, in the past, when used in some drivers, were typically done with a "pipe" and a select or poll call.Bayonne event record buffering.

The new Common C++ 1.1 allows us to do this far more efficiently through a Buffer object which can be attached to a driver or service as needed.

Author:
David Sugar <dyfet@ostel.com>


Constructor & Destructor Documentation

EventBuffer::EventBuffer unsigned  count  )  [protected]
 

This class is often constructed as part of a Driver or service thread class.

It is never used stand-alone.

Parameters:
number of events to buffer.


Member Function Documentation

void EventBuffer::fetch timeout_t  timeout,
TrunkEvent event
[protected]
 

Waits for a specified timeout for an event to be available.

If the event is available, it is returned, otherwise at timeout a timer expired event is generated.

Parameters:
time to wait in milliseconds.
TrunkEvent object to fill.

void EventBuffer::update TrunkEvent event = NULL  ) 
 

Post a TrunkEvent to the buffer.

If no event is passed, a "NULL" trunk event is used.

Parameters:
port id to pass.


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