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

PortNotify Class Reference

The PortNotify class is used to buffer and pass port notify events, which, in the past, when used in some drivers, were typically done with a "pipe" and a select or poll call.Bayonne driver port notification events. More...

#include <bayonne.h>

Inheritance diagram for PortNotify:

Buffer List of all members.

Public Member Functions

void update (unsigned char port=0xff)
 Post a port id to the buffer.

Protected Member Functions

unsigned char fetch (timeout_t timeout)
 Waits for a specified timeout for a port id to be available.
 PortNotify ()
 This class is often constructed as part of a Driver or service thread class.

Detailed Description

The PortNotify class is used to buffer and pass port notify events, which, in the past, when used in some drivers, were typically done with a "pipe" and a select or poll call.Bayonne driver port notification events.

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

PortNotify::PortNotify  )  [protected]
 

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

It is never used stand-alone.


Member Function Documentation

unsigned char PortNotify::fetch timeout_t  timeout  )  [protected]
 

Waits for a specified timeout for a port id to be available.

If the id is available, it is returned.

Returns:
port id or 0xff if timeout/reschedule event.
Parameters:
time to wait in milliseconds.

void PortNotify::update unsigned char  port = 0xff  ) 
 

Post a port id to the buffer.

The special id 0xff is used to resequence timer queues, and 0x00 is often used to stop a driver.

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