Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

IDEA::IPCCommunicationRelayListener Class Reference
[IPC]

Listens to the IPC central if messages have arrived, managed by IPCRelay instances. More...

#include <IPCCommunicationRelay.hh>

Inheritance diagram for IDEA::IPCCommunicationRelayListener:

IDEA::Singleton< IPCCommunicationRelayListener > List of all members.

Public Methods

 ~IPCCommunicationRelayListener ()
 Destructor.

int activate (long flags=THR_NEW_LWP|THR_JOINABLE|THR_INHERIT_SCHED, int n_threads=1, int force_active=0, long priority=ACE_DEFAULT_THREAD_PRIORITY, int grp_id=-1, ACE_Task_Base *task=0, ACE_hthread_t thread_handles[]=0, void *stack[]=0, size_t stack_size[]=0, ACE_thread_t thread_ids[]=0)
 Activates the listener; Hard-coded to be limited to one thread.

void shutDown ()
 Shutsdown (de-activates) the invoking listener.

bool isActive () const
 Returns true if the invoking listeners is active (listening).

int getListenMilliSeconds () const
 Returns the number of milliseconds we block the thread before we check if we should end the life-cycle of the thread.


Static Public Methods

IPCCommunicationRelayListener * instance ()

Static Protected Methods

IPCCommunicationRelayListener *& getInstance ()
 The instance.

void release ()

Private Methods

 IPCCommunicationRelayListener (int listenMilliSeconds=100)
 Constructor.

int svc (void)
 Main thread function which does the actual listening.


Private Attributes

int m_ListenMilliSeconds
bool m_Active

Friends

class Singleton< IPCCommunicationRelayListener >

Detailed Description

Listens to the IPC central if messages have arrived, managed by IPCRelay instances.

Author:
David Rijsman, rijsman@email.arc.nasa.gov Class IPCRelayListener
The listeners listens for IPCCommunicationRelayListener::getListenMilliSeconds for events that have been subscribed to. If no events have been received we will listen again if we have not shut-down the listener.


Constructor & Destructor Documentation

IDEA::IPCCommunicationRelayListener::~IPCCommunicationRelayListener  
 

Destructor.

IDEA::IPCCommunicationRelayListener::IPCCommunicationRelayListener int    listenMilliSeconds = 100 [private]
 

Constructor.


Member Function Documentation

int IDEA::IPCCommunicationRelayListener::activate long    flags = THR_NEW_LWP|THR_JOINABLE|THR_INHERIT_SCHED,
int    n_threads = 1,
int    force_active = 0,
long    priority = ACE_DEFAULT_THREAD_PRIORITY,
int    grp_id = -1,
ACE_Task_Base *    task = 0,
ACE_hthread_t    thread_handles[] = 0,
void *    stack[] = 0,
size_t    stack_size[] = 0,
ACE_thread_t    thread_ids[] = 0
 

Activates the listener; Hard-coded to be limited to one thread.

Will return -1 in case of an error. We need to be connected before we activate the listener.

IPCCommunicationRelayListener*& IDEA::Singleton< IPCCommunicationRelayListener >::getInstance   [inline, static, protected, inherited]
 

The instance.

This pattern is used to prevent "static initialization order fiasco" (Google this for better understanding)

int IDEA::IPCCommunicationRelayListener::getListenMilliSeconds   const [inline]
 

Returns the number of milliseconds we block the thread before we check if we should end the life-cycle of the thread.

IPCCommunicationRelayListener* IDEA::Singleton< IPCCommunicationRelayListener >::instance   [inline, static, inherited]
 

bool IDEA::IPCCommunicationRelayListener::isActive   const [inline]
 

Returns true if the invoking listeners is active (listening).

void IDEA::Singleton< IPCCommunicationRelayListener >::release   [inline, static, protected, inherited]
 

void IDEA::IPCCommunicationRelayListener::shutDown  
 

Shutsdown (de-activates) the invoking listener.

int IDEA::IPCCommunicationRelayListener::svc void    [private]
 

Main thread function which does the actual listening.


Friends And Related Function Documentation

friend class Singleton< IPCCommunicationRelayListener > [friend]
 


Member Data Documentation

bool IDEA::IPCCommunicationRelayListener::m_Active [private]
 

int IDEA::IPCCommunicationRelayListener::m_ListenMilliSeconds [private]
 


Contact information
© IDEA
Generated on Fri Feb 3 17:09:45 2006 for IDEA.