TAO_RTEvent 4.0.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TAO_ECG_UDP_Sender Class Reference

Send events received from a "local" EC using UDP. NOT THREAD-SAFE. This class connect as a consumer to an EventChannel and forwards the events it receives from that EC using UDP. More...

#include <ECG_UDP_Sender.h>

Inheritance diagram for TAO_ECG_UDP_Sender:
Inheritance graph
[legend]
Collaboration diagram for TAO_ECG_UDP_Sender:
Collaboration graph
[legend]

Public Member Functions

 ~TAO_ECG_UDP_Sender ()
 
void init (RtecEventChannelAdmin::EventChannel_ptr lcl_ec, RtecUDPAdmin::AddrServer_ptr addr_server, TAO_ECG_Refcounted_Endpoint endpoint_rptr)
 
void connect (const RtecEventChannelAdmin::ConsumerQOS &sub)
 Connect or reconnect to the EC with the given subscriptions.
 
void shutdown ()
 
int mtu (CORBA::ULong mtu)
 Accessors.
 
CORBA::ULong mtu () const
 
int get_local_addr (ACE_INET_Addr &addr)
 Get the local endpoint used to send the events.
 
virtual void disconnect_push_consumer ()
 The PushConsumer methods.
 
virtual void push (const RtecEventComm::EventSet &events)
 
- Public Member Functions inherited from TAO_EC_Deactivated_Object
void set_deactivator (TAO_EC_Object_Deactivator &deactivator)
 

Static Public Member Functions

static PortableServer::Servant_var< TAO_ECG_UDP_Sendercreate (CORBA::Boolean crc=0)
 Initialization and termination methods.
 

Protected Member Functions

 TAO_ECG_UDP_Sender (CORBA::Boolean crc=0)
 
- Protected Member Functions inherited from TAO_EC_Deactivated_Object
 TAO_EC_Deactivated_Object ()
 
 ~TAO_EC_Deactivated_Object ()
 

Private Types

typedef TAO_EC_Auto_Command< TAO_ECG_UDP_Sender_Disconnect_CommandECG_Sender_Auto_Proxy_Disconnect
 

Private Member Functions

void new_connect (const RtecEventChannelAdmin::ConsumerQOS &sub)
 Helpers for the connect() method.
 
void reconnect (const RtecEventChannelAdmin::ConsumerQOS &sub)
 

Private Attributes

RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_
 Proxy used to receive events from the Event Channel.
 
RtecEventChannelAdmin::EventChannel_var lcl_ec_
 Event Channel to which we act as a consumer.
 
RtecUDPAdmin::AddrServer_var addr_server_
 We query this object to determine where the events should be sent.
 
TAO_ECG_CDR_Message_Sender cdr_sender_
 Helper for fragmenting and sending cdr-encoded events using udp.
 
ECG_Sender_Auto_Proxy_Disconnect auto_proxy_disconnect_
 Manages our connection to Supplier Proxy.
 

Additional Inherited Members

- Protected Attributes inherited from TAO_EC_Deactivated_Object
TAO_EC_Object_Deactivator deactivator_
 Utility for deactivating ourselves from POA.
 

Detailed Description

Send events received from a "local" EC using UDP. NOT THREAD-SAFE. This class connect as a consumer to an EventChannel and forwards the events it receives from that EC using UDP.

Member Typedef Documentation

◆ ECG_Sender_Auto_Proxy_Disconnect

Constructor & Destructor Documentation

◆ ~TAO_ECG_UDP_Sender()

TAO_ECG_UDP_Sender::~TAO_ECG_UDP_Sender ( )

◆ TAO_ECG_UDP_Sender()

TAO_ECG_UDP_Sender::TAO_ECG_UDP_Sender ( CORBA::Boolean crc = 0)
protected

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

Member Function Documentation

◆ connect()

void TAO_ECG_UDP_Sender::connect ( const RtecEventChannelAdmin::ConsumerQOS & sub)

Connect or reconnect to the EC with the given subscriptions.

Note
if we are already connected to EC and a reconnection is necessary, the EC must have reconnects enabled in order for this method to succeed.

◆ create()

static PortableServer::Servant_var< TAO_ECG_UDP_Sender > TAO_ECG_UDP_Sender::create ( CORBA::Boolean crc = 0)
static

Initialization and termination methods.

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

◆ disconnect_push_consumer()

void TAO_ECG_UDP_Sender::disconnect_push_consumer ( )
virtual

The PushConsumer methods.

Invokes shutdown (), which may result in the object being deleted, if refcounting is used to manage its lifetime.

◆ get_local_addr()

int TAO_ECG_UDP_Sender::get_local_addr ( ACE_INET_Addr & addr)

Get the local endpoint used to send the events.

◆ init()

void TAO_ECG_UDP_Sender::init ( RtecEventChannelAdmin::EventChannel_ptr lcl_ec,
RtecUDPAdmin::AddrServer_ptr addr_server,
TAO_ECG_Refcounted_Endpoint endpoint_rptr )
Parameters
lcl_ecEvent Channel to which we will act as a consumer of events.
addr_serverAddress server used to obtain event type to multicast group mapping.
endpoint_rptrEndpoint for sending udp/multicast messages. Endpoint's dgram must be open!

To insure proper resource clean up, if init () is successful, shutdown () must be called when the sender is no longer needed. This is done by disconnect_push_consumer() method. If disconnect_push_consumer() will not be called, it is the responsibility of the user. Furthermore, if shutdown() is not explicitly called by either disconnect_push_consumer () or the user, the sender will clean up the resources in its destructor, however, certain entities involved in cleanup must still exist at that point, e.g., POA.

◆ mtu() [1/2]

CORBA::ULong TAO_ECG_UDP_Sender::mtu ( ) const

◆ mtu() [2/2]

int TAO_ECG_UDP_Sender::mtu ( CORBA::ULong mtu)

Accessors.

The sender may need to fragment the message, otherwise the network may drop the packets. Setting the MTU can fail if the value is too small (at least the header + 8 bytes must fit).

◆ new_connect()

void TAO_ECG_UDP_Sender::new_connect ( const RtecEventChannelAdmin::ConsumerQOS & sub)
private

Helpers for the connect() method.

◆ push()

void TAO_ECG_UDP_Sender::push ( const RtecEventComm::EventSet & events)
virtual

◆ reconnect()

void TAO_ECG_UDP_Sender::reconnect ( const RtecEventChannelAdmin::ConsumerQOS & sub)
private

◆ shutdown()

void TAO_ECG_UDP_Sender::shutdown ( )

Deactivate from POA and disconnect from EC, if necessary. Shut down all sender components. Calling this method may result in decrementing of the reference count (due to deactivation) and deletion of the object.

Member Data Documentation

◆ addr_server_

RtecUDPAdmin::AddrServer_var TAO_ECG_UDP_Sender::addr_server_
private

We query this object to determine where the events should be sent.

◆ auto_proxy_disconnect_

ECG_Sender_Auto_Proxy_Disconnect TAO_ECG_UDP_Sender::auto_proxy_disconnect_
private

Manages our connection to Supplier Proxy.

◆ cdr_sender_

TAO_ECG_CDR_Message_Sender TAO_ECG_UDP_Sender::cdr_sender_
private

Helper for fragmenting and sending cdr-encoded events using udp.

◆ lcl_ec_

RtecEventChannelAdmin::EventChannel_var TAO_ECG_UDP_Sender::lcl_ec_
private

Event Channel to which we act as a consumer.

◆ supplier_proxy_

RtecEventChannelAdmin::ProxyPushSupplier_var TAO_ECG_UDP_Sender::supplier_proxy_
private

Proxy used to receive events from the Event Channel.


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