channel::Port< Channel, MsgQueueType > Class Template Reference

#include <Port.h>

List of all members.

Public Member Functions

 Port (Channel *chan, MsgQueueType *que=NULL)
 ~Port ()
Status put_msg (Msg *msg, ACE_Time_Value *timeout)
int num_pending_msg (void)
Status recv_msg (Msg *&msg)
 interface to clients threads: clients of port retrv msgs
Status suspend (void)
Status resume (void)
 port is resumed, threads can read/write with it again

Private Types

typedef Channel::Msg Msg

Private Attributes

Channelmy_chan_
MsgQueueType * my_que_
ACE_Thread_Semaphore suspend_sema_
int num_blocked_thr
bool borrow_que_


Detailed Description

template<class Channel, class MsgQueueType = ACE_Message_Queue<ACE_MT_SYNCH>>
class channel::Port< Channel, MsgQueueType >

Definition at line 30 of file Port.h.


Member Typedef Documentation

template<class Channel, class MsgQueueType = ACE_Message_Queue<ACE_MT_SYNCH>>
typedef Channel::Msg channel::Port< Channel, MsgQueueType >::Msg [private]
 

Definition at line 31 of file Port.h.


Constructor & Destructor Documentation

template<class Channel, class MsgQueueType = ACE_Message_Queue<ACE_MT_SYNCH>>
channel::Port< Channel, MsgQueueType >::Port Channel chan,
MsgQueueType *  que = NULL
[inline]
 

Definition at line 42 of file Port.h.

References channel::Port< Channel, MsgQueueType >::borrow_que_, channel::Port< Channel, MsgQueueType >::my_chan_, channel::Port< Channel, MsgQueueType >::my_que_, and channel::Port< Channel, MsgQueueType >::num_blocked_thr.

template<class Channel, class MsgQueueType = ACE_Message_Queue<ACE_MT_SYNCH>>
channel::Port< Channel, MsgQueueType >::~Port  )  [inline]
 

Definition at line 56 of file Port.h.

References channel::Port< Channel, MsgQueueType >::borrow_que_, and channel::Port< Channel, MsgQueueType >::my_que_.


Member Function Documentation

template<class Channel, class MsgQueueType = ACE_Message_Queue<ACE_MT_SYNCH>>
int channel::Port< Channel, MsgQueueType >::num_pending_msg void   )  [inline]
 

Definition at line 74 of file Port.h.

References channel::Port< Channel, MsgQueueType >::my_que_.

template<class Channel, class MsgQueueType = ACE_Message_Queue<ACE_MT_SYNCH>>
Status channel::Port< Channel, MsgQueueType >::put_msg Msg msg,
ACE_Time_Value *  timeout
[inline]
 

implement Destination methods interface to channel: channel puts msgs into queue

Definition at line 63 of file Port.h.

References channel::FAILURE, channel::Port< Channel, MsgQueueType >::my_que_, and channel::SUCCESS.

template<class Channel, class MsgQueueType = ACE_Message_Queue<ACE_MT_SYNCH>>
Status channel::Port< Channel, MsgQueueType >::recv_msg Msg *&  msg  )  [inline]
 

interface to clients threads: clients of port retrv msgs

Definition at line 79 of file Port.h.

References channel::Port< Channel, MsgQueueType >::my_que_, channel::Port< Channel, MsgQueueType >::num_blocked_thr, and channel::Port< Channel, MsgQueueType >::suspend_sema_.

template<class Channel, class MsgQueueType = ACE_Message_Queue<ACE_MT_SYNCH>>
Status channel::Port< Channel, MsgQueueType >::resume void   )  [inline]
 

port is resumed, threads can read/write with it again

Definition at line 116 of file Port.h.

References channel::SUCCESS.

template<class Channel, class MsgQueueType = ACE_Message_Queue<ACE_MT_SYNCH>>
Status channel::Port< Channel, MsgQueueType >::suspend void   )  [inline]
 

coordination with Tasks/threads which are reading from this port/que port is suspended, all threads will be blocked

Definition at line 110 of file Port.h.

References channel::SUCCESS.


Member Data Documentation

template<class Channel, class MsgQueueType = ACE_Message_Queue<ACE_MT_SYNCH>>
bool channel::Port< Channel, MsgQueueType >::borrow_que_ [private]
 

Definition at line 38 of file Port.h.

Referenced by channel::Port< Channel, MsgQueueType >::Port(), and channel::Port< Channel, MsgQueueType >::~Port().

template<class Channel, class MsgQueueType = ACE_Message_Queue<ACE_MT_SYNCH>>
Channel* channel::Port< Channel, MsgQueueType >::my_chan_ [private]
 

Definition at line 34 of file Port.h.

Referenced by channel::Port< Channel, MsgQueueType >::Port().

template<class Channel, class MsgQueueType = ACE_Message_Queue<ACE_MT_SYNCH>>
MsgQueueType* channel::Port< Channel, MsgQueueType >::my_que_ [private]
 

Definition at line 35 of file Port.h.

Referenced by channel::Port< Channel, MsgQueueType >::num_pending_msg(), channel::Port< Channel, MsgQueueType >::Port(), channel::Port< Channel, MsgQueueType >::put_msg(), channel::Port< Channel, MsgQueueType >::recv_msg(), and channel::Port< Channel, MsgQueueType >::~Port().

template<class Channel, class MsgQueueType = ACE_Message_Queue<ACE_MT_SYNCH>>
int channel::Port< Channel, MsgQueueType >::num_blocked_thr [private]
 

Definition at line 37 of file Port.h.

Referenced by channel::Port< Channel, MsgQueueType >::Port(), and channel::Port< Channel, MsgQueueType >::recv_msg().

template<class Channel, class MsgQueueType = ACE_Message_Queue<ACE_MT_SYNCH>>
ACE_Thread_Semaphore channel::Port< Channel, MsgQueueType >::suspend_sema_ [private]
 

Definition at line 36 of file Port.h.

Referenced by channel::Port< Channel, MsgQueueType >::recv_msg().


The documentation for this class was generated from the following file:
Generated on Mon Feb 27 19:59:24 2006 for channel by  doxygen 1.4.6-NO