Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_ECG_Complex_Address_Server Class Reference

Implementation of RtecUDPAdmin idl interface, which returns a different multicast address based on event source (or event type -depending on how the server is configured). More...

#include <ECG_Complex_Address_Server.h>

Collaboration diagram for TAO_ECG_Complex_Address_Server:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual ~TAO_ECG_Complex_Address_Server (void)
 Destructor.

int init (const char *arg)
virtual void get_addr (const RtecEventComm::EventHeader &header, RtecUDPAdmin::UDP_Addr_out addr ACE_ENV_ARG_DECL) throw (CORBA::SystemException)
void dump_content (void)

Static Public Methods

TAO_EC_Servant_Var< TAO_ECG_Complex_Address_Server > create (int is_source_mapping=1)
 Create a new TAO_ECG_Complex_Address_Server object.


Protected Methods

 TAO_ECG_Complex_Address_Server (int is_source_mapping=1)

Private Types

typedef ACE_Hash_Map_Manager_Ex<
CORBA::Long, ACE_INET_Addr,
ACE_Hash< CORBA::Long >,
ACE_Equal_To< CORBA::Long >,
ACE_Null_Mutex
MAP

Private Methods

int add_entry (const char *key, const char *mcast_addr)

Private Attributes

int is_source_mapping_
MAP mcast_mapping_
ACE_INET_Addr default_addr_

Detailed Description

Implementation of RtecUDPAdmin idl interface, which returns a different multicast address based on event source (or event type -depending on how the server is configured).

INITIALIZATION STRING FORMAT

The string is a sequence of <key><value> pairs separated by a single space, where <key> is event source (or type) and <value> is the corresponding mcast address. Example: "34@230.100.0.2:2300 45@230.100.123.43:2300" The string above represents two key-value pairs.

A special key "*" is used to specify the default mcast address, i.e., the one that will be returned for event sources that weren't explicitly specified in the initialization string. Example: "*@230.100.0.2:2300 45@230.100.123.43:2300"


Member Typedef Documentation

typedef ACE_Hash_Map_Manager_Ex<CORBA::Long, ACE_INET_Addr, ACE_Hash<CORBA::Long>, ACE_Equal_To<CORBA::Long>, ACE_Null_Mutex> TAO_ECG_Complex_Address_Server::MAP [private]
 


Constructor & Destructor Documentation

TAO_ECG_Complex_Address_Server::~TAO_ECG_Complex_Address_Server void    [virtual]
 

Destructor.

TAO_ECG_Complex_Address_Server::TAO_ECG_Complex_Address_Server int    is_source_mapping = 1 [protected]
 

Constructor (protected). Clients can create new TAO_ECG_Complex_Address_Server objects using the static create() method. <is_source_mapping> flag indicates whether this server maps based on event header source or event header type.


Member Function Documentation

int TAO_ECG_Complex_Address_Server::add_entry const char *    key,
const char *    mcast_addr
[private]
 

Helper. Given key and mcast address in string form, add them to the mapping.

ACE_INLINE TAO_EC_Servant_Var< TAO_ECG_Complex_Address_Server > TAO_ECG_Complex_Address_Server::create int    is_source_mapping = 1 [static]
 

Create a new TAO_ECG_Complex_Address_Server object.

void TAO_ECG_Complex_Address_Server::dump_content void   
 

Prints out complete content of the address server. Useful for debugging.

void TAO_ECG_Complex_Address_Server::get_addr const RtecEventComm::EventHeader   header,
RtecUDPAdmin::UDP_Addr_out addr    ACE_ENV_ARG_DECL
throw (CORBA::SystemException) [virtual]
 

int TAO_ECG_Complex_Address_Server::init const char *    arg
 

Initializes the mapping from the <arg> string. See class notes for the expected format.


Member Data Documentation

ACE_INET_Addr TAO_ECG_Complex_Address_Server::default_addr_ [private]
 

Mcast group to be used for all sources (or types) not explicitly mapped.

int TAO_ECG_Complex_Address_Server::is_source_mapping_ [private]
 

Flag indicating whether this address server maps event source or event type to mcast groups.

MAP TAO_ECG_Complex_Address_Server::mcast_mapping_ [private]
 


The documentation for this class was generated from the following files:
Generated on Thu Jan 15 00:25:58 2004 for TAO_RTEvent by doxygen1.2.18