ost::BayonneMsgport Class Reference

Bayonne Msgports are used to queue and post session events which normally have to be passed through another thread context. More...

#include <bayonne.h>

Inheritance diagram for ost::BayonneMsgport:

ost::Bayonne

List of all members.

Public Member Functions

virtual ~BayonneMsgport ()
 Destroy a msgport.
 BayonneMsgport (BayonneDriver *driver)
 Create a message port and optionally bind it to a given driver.
void update (void)
 Request retiming.
void initial (void)
 Initialize msgport, determine which sessions it will perform timing for based on the driver it is bound to.

Protected Member Functions

void shutdown (void)
 Send shutdown event to the msgport.
virtual timeout_t getTimeout (Event *event)
 Determine sleep time to schedule for waiting, unless an update occurs to force rescheduling.
void run (void)
size_t onWait (void *buf)
size_t onPost (void *buf)
size_t onPeek (void *buf)

Protected Attributes

BayonneDrivermsgdriver
Event * msglist
unsigned msgsize
unsigned msghead
unsigned msgtail
timeslot_t tsfirst
timeslot_t tscount
char msgname [16]


Detailed Description

Bayonne Msgports are used to queue and post session events which normally have to be passed through another thread context.

This can happen for a thread termination event, for example, since the thread terminating must be joined from another thread. Some drivers use session specific msgports to process all channel events.

Author:
David Sugar <dyfet@gnutelephony.org> Msgport event queing and dispatch.

Constructor & Destructor Documentation

virtual ost::BayonneMsgport::~BayonneMsgport (  )  [virtual]

Destroy a msgport.

ost::BayonneMsgport::BayonneMsgport ( BayonneDriver driver  ) 

Create a message port and optionally bind it to a given driver.

Parameters:
driver to bind msgport to.


Member Function Documentation

void ost::BayonneMsgport::update ( void   ) 

Request retiming.

This is used for msgports that are per session to get the session to be retimed after an event has been directly posted outside the msgport.

void ost::BayonneMsgport::initial ( void   ) 

Initialize msgport, determine which sessions it will perform timing for based on the driver it is bound to.

void ost::BayonneMsgport::shutdown ( void   )  [protected]

Send shutdown event to the msgport.

virtual timeout_t ost::BayonneMsgport::getTimeout ( Event *  event  )  [protected, virtual]

Determine sleep time to schedule for waiting, unless an update occurs to force rescheduling.

Returns:
shortest timeout based on session timers.
Parameters:
event to pass when timeout occurs.

void ost::BayonneMsgport::run ( void   )  [protected]

size_t ost::BayonneMsgport::onWait ( void *  buf  )  [protected]

size_t ost::BayonneMsgport::onPost ( void *  buf  )  [protected]

size_t ost::BayonneMsgport::onPeek ( void *  buf  )  [protected]


Member Data Documentation

Event* ost::BayonneMsgport::msglist [protected]

unsigned ost::BayonneMsgport::msgsize [protected]

unsigned ost::BayonneMsgport::msghead [protected]

unsigned ost::BayonneMsgport::msgtail [protected]

char ost::BayonneMsgport::msgname[16] [protected]


The documentation for this class was generated from the following file:

Generated on Fri Sep 5 22:32:13 2008 for Bayonne by  doxygen 1.5.6