TAO_ECG_Simple_Address_Server Class Reference

Basic implementation of RtecUDPAdmin idl interface. More...

#include <ECG_Simple_Address_Server.h>

Collaboration diagram for TAO_ECG_Simple_Address_Server:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~TAO_ECG_Simple_Address_Server (void)
 Destructor.

int init (const char *arg)
virtual void get_addr (const RtecEventComm::EventHeader &header, RtecUDPAdmin::UDP_Addr_out addr)
virtual void get_address (const RtecEventComm::EventHeader &header, RtecUDPAdmin::UDP_Address_out addr6)

Static Public Member Functions

TAO_EC_Servant_Var< TAO_ECG_Simple_Address_Servercreate (void)

Protected Member Functions

 TAO_ECG_Simple_Address_Server (void)

Private Attributes

ACE_INET_Addr addr_

Detailed Description

Basic implementation of RtecUDPAdmin idl interface.

This simple server always returns multicast address it was initialized with, regardless of the header.

Definition at line 30 of file ECG_Simple_Address_Server.h.


Constructor & Destructor Documentation

TAO_ECG_Simple_Address_Server::~TAO_ECG_Simple_Address_Server void   )  [virtual]
 

Destructor.

Definition at line 15 of file ECG_Simple_Address_Server.cpp.

00016 {
00017 }

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_ECG_Simple_Address_Server::TAO_ECG_Simple_Address_Server void   )  [protected]
 

Constructor (protected). Clients can create new TAO_ECG_Simple_Address_Server objects using the static create() method.

Definition at line 11 of file ECG_Simple_Address_Server.cpp.

00012 {
00013 }


Member Function Documentation

TAO_EC_Servant_Var<TAO_ECG_Simple_Address_Server> TAO_ECG_Simple_Address_Server::create void   )  [static]
 

Create a new TAO_ECG_Simple_Address_Server object. (Constructor access is restricted to insure that all TAO_ECG_Simple_Address_Server objects are heap-allocated.)

Referenced by TAO_ECG_Mcast_Gateway::init_address_server().

void TAO_ECG_Simple_Address_Server::get_addr const RtecEventComm::EventHeader header,
RtecUDPAdmin::UDP_Addr_out  addr
[virtual]
 

Definition at line 26 of file ECG_Simple_Address_Server.cpp.

References ACE_INET_Addr::get_ip_address(), ACE_INET_Addr::get_port_number(), and ACE_Addr::get_type().

00029 {
00030 #if defined (ACE_HAS_IPV6)
00031   if (this->addr_.get_type() == PF_INET6)
00032     throw CORBA::DATA_CONVERSION(0, CORBA::COMPLETED_YES);
00033 #endif /* ACE_HAS_IPV6 */
00034   // unsigned long
00035   addr.ipaddr = this->addr_.get_ip_address ();
00036   // unsigned short
00037   addr.port = this->addr_.get_port_number ();
00038 }

void TAO_ECG_Simple_Address_Server::get_address const RtecEventComm::EventHeader header,
RtecUDPAdmin::UDP_Address_out  addr6
[virtual]
 

Definition at line 42 of file ECG_Simple_Address_Server.cpp.

References ACE_INET_Addr::get_addr(), ACE_INET_Addr::get_ip_address(), ACE_INET_Addr::get_port_number(), ACE_Addr::get_type(), RtecUDPAdmin::UDP_Addr::ipaddr, RtecUDPAdmin::UDP_Addr_v6::ipaddr, ACE_OS::memcpy(), RtecUDPAdmin::UDP_Addr::port, and RtecUDPAdmin::UDP_Addr_v6::port.

00044 {
00045 #if defined (ACE_HAS_IPV6)
00046   if (this->addr_.get_type() == PF_INET6)
00047     {
00048       RtecUDPAdmin::UDP_Addr_v6 v6;
00049       sockaddr_in6 *in6 =
00050         reinterpret_cast<sockaddr_in6 *>(this->addr_.get_addr());
00051       ACE_OS::memcpy (v6.ipaddr,&in6->sin6_addr,16);
00052       v6.port = this->addr_.get_port_number();
00053       addr.v6_addr (v6);
00054       return;
00055     }
00056 #endif /* ACE_HAS_IPV6 */
00057   RtecUDPAdmin::UDP_Addr v4;
00058   v4.ipaddr = this->addr_.get_ip_address();
00059   v4.port = this->addr_.get_port_number();
00060   addr.v4_addr (v4);
00061 }

int TAO_ECG_Simple_Address_Server::init const char *  arg  ) 
 

Definition at line 20 of file ECG_Simple_Address_Server.cpp.

References ACE_INET_Addr::set().

00021 {
00022   return this->addr_.set (mcast_addr);
00023 }


Member Data Documentation

ACE_INET_Addr TAO_ECG_Simple_Address_Server::addr_ [private]
 

Definition at line 59 of file ECG_Simple_Address_Server.h.


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 15:36:40 2008 for TAO_RTEvent by doxygen 1.3.6