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

# TAO_ECG_UDP_Receiver Class Reference

Decodes events from an ACE_SOCK_Dgram and pushes them to the Event_Channel. More...

`#include <EC_Gateway_UDP.h>`

Inheritance diagram for TAO_ECG_UDP_Receiver

[legend]
Collaboration diagram for TAO_ECG_UDP_Receiver:

[legend]
List of all members.

## Public Methods
| TAO_ECG_UDP_Receiver (void)
void | init (RtecEventChannelAdmin::EventChannel_ptr lcl_ec, TAO_ECG_UDP_Out_Endpoint* ignore_from, RtecUDPAdmin::AddrServer_ptr addr_server, ACE_Reactor *reactor, const ACE_Time_Value &expire_interval, int max_timeout, CORBA::Environment &env = TAO_default_environment ())
void | shutdown (CORBA::Environment & = TAO_default_environment ())
| Disconnect and shutdown the gateway, no further connectsions.
void | open (RtecEventChannelAdmin::SupplierQOS& pub, CORBA::Environment &env = TAO_default_environment ())
| Connect to the EC using the given publications lists.
virtual void | close (CORBA::Environment &env = TAO_default_environment ())
| Disconnect to the EC.
int | handle_input (ACE_SOCK_Dgram& dgram)
int | handle_timeout (const ACE_Time_Value& tv, const void* act)
| The timer has expired, must update all the unreceived messages...
virtual void | disconnect_push_supplier (CORBA::Environment & = TAO_default_environment ()) throw (CORBA::SystemException)
void | get_addr (const RtecEventComm::EventHeader& header, RtecUDPAdmin::UDP_Addr_out addr, CORBA::Environment &env = TAO_default_environment ())
| Call the RtecUDPAdmin::AddrServer.
## Private Types
typedef ACE_Hash_Map_Manager< TAO_ECG_UDP_Request_Index, TAO_ECG_UDP_Request_Entry*, TAO_SYNCH_MUTEX> | Request_Map
typedef ACE_Hash_Map_Entry< TAO_ECG_UDP_Request_Index, TAO_ECG_UDP_Request_Entry*> | Request_Map_Entry
## Private Attributes
RtecEventChannelAdmin::EventChannel_var | lcl_ec_
| The remote and the local EC, so we can reconnect when the list changes.
RtecEventChannelAdmin::ProxyPushConsumer_var | consumer_proxy_
| We talk to the EC (as a consumer) using this proxy.
TAO_ECG_UDP_Out_Endpoint* | ignore_from_
| Ignore any events coming from this IP addres.
RtecUDPAdmin::AddrServer_var | addr_server_
| The server used to map event types into multicast groups.
Request_Map | request_map_
| The map containing all the incoming requests which have been partially received.
TAO_ECG_UDP_TH | timeout_handler_
| To receive the timeouts..
ACE_Reactor* | reactor_
| The reactor we are using for the timeout handler...
int | max_timeout_
| How many timeouts before we expire a message...

## Detailed Description

Decodes events from an ACE_SOCK_Dgram and pushes them to the Event_Channel.

This supplier receives events from an ACE_SOCK_Dgram, either from a UDP socket or a Mcast group, decodes them and push them to the EC. = REASSEMBLY Whenever an incomplete fragment is received (one with fragment_count > 1) we allocate an entry for the message in an map indexed by (host,port,request_id). The entry contains the buffer, a bit vector to keep track of the fragments received so far, and a timeout counter. This timeout counter is set to 0 on each (new) fragment arrival, and incremented on a regular basis. If the counter reaches a maximum value the message is dropped. Once all the fragments have been received the message is sent up, and the memory reclaimed. The entry is *not* removed until the timer expires (to handle re-transmitions).

## Member Typedef Documentation

typedef ACE_Hash_Map_Manager<TAO_ECG_UDP_Request_Index, TAO_ECG_UDP_Request_Entry*, TAO_SYNCH_MUTEX> TAO_ECG_UDP_Receiver::Request_Map`[private]`

typedef ACE_Hash_Map_Entry<TAO_ECG_UDP_Request_Index, TAO_ECG_UDP_Request_Entry*> TAO_ECG_UDP_Receiver::Request_Map_Entry`[private]`

## Constructor & Destructor Documentation

TAO_ECG_UDP_Receiver::TAO_ECG_UDP_Receiver ( | void )

## Member Function Documentation

void TAO_ECG_UDP_Receiver::close ( | CORBA::Environment & env = TAO_default_environment () )`[virtual]`

| Disconnect to the EC.

void TAO_ECG_UDP_Receiver::disconnect_push_supplier ( | CORBA::Environment & = TAO_default_environment () ) throw (CORBA::SystemException)`[virtual]`

void TAO_ECG_UDP_Receiver::get_addr ( | const RtecEventComm::EventHeader & header,
| RtecUDPAdmin::UDP_Addr_out addr,
| CORBA::Environment & env = TAO_default_environment () )

| Call the RtecUDPAdmin::AddrServer.

int TAO_ECG_UDP_Receiver::handle_input ( | ACE_SOCK_Dgram & dgram )

| The Event_Handlers call this method when data is available at the socket, the <dgram> must be ready for reading and contain a full event.

int TAO_ECG_UDP_Receiver::handle_timeout ( | const ACE_Time_Value & tv,
| const void * act )

| The timer has expired, must update all the unreceived messages...

void TAO_ECG_UDP_Receiver::init ( | RtecEventChannelAdmin::EventChannel_ptr lcl_ec,
| TAO_ECG_UDP_Out_Endpoint * ignore_from,
| RtecUDPAdmin::AddrServer_ptr addr_server,
| ACE_Reactor * reactor,
| const ACE_Time_Value & expire_interval,
| int max_timeout,
| CORBA::Environment & env = TAO_default_environment () )

| To do its job this class requires to know the local EC it will connect to; it also requires to build an RT_Info for the local scheduler. The <reactor> is used to receive timeout events.. The <ignore_from> endpoint is used to remove events generated by the same process. Todo: part of the RT_Info is hardcoded, we need to make it parametric.

void TAO_ECG_UDP_Receiver::open ( | RtecEventChannelAdmin::SupplierQOS & pub,
| CORBA::Environment & env = TAO_default_environment () )

| Connect to the EC using the given publications lists.

void TAO_ECG_UDP_Receiver::shutdown ( | CORBA::Environment & ACE_TRY_ENV = TAO_default_environment () )

| Disconnect and shutdown the gateway, no further connectsions.

## Member Data Documentation

RtecUDPAdmin::AddrServer_var TAO_ECG_UDP_Receiver::addr_server_`[private]`

| The server used to map event types into multicast groups.

RtecEventChannelAdmin::ProxyPushConsumer_var TAO_ECG_UDP_Receiver::consumer_proxy_`[private]`

| We talk to the EC (as a consumer) using this proxy.

TAO_ECG_UDP_Out_Endpoint * TAO_ECG_UDP_Receiver::ignore_from_`[private]`

| Ignore any events coming from this IP addres.

RtecEventChannelAdmin::EventChannel_var TAO_ECG_UDP_Receiver::lcl_ec_`[private]`

| The remote and the local EC, so we can reconnect when the list changes.

int TAO_ECG_UDP_Receiver::max_timeout_`[private]`

| How many timeouts before we expire a message...

ACE_Reactor * TAO_ECG_UDP_Receiver::reactor_`[private]`

| The reactor we are using for the timeout handler...

Request_Map TAO_ECG_UDP_Receiver::request_map_`[private]`

| The map containing all the incoming requests which have been partially received.

TAO_ECG_UDP_TH TAO_ECG_UDP_Receiver::timeout_handler_`[private]`

| To receive the timeouts..

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

- EC_Gateway_UDP.h
- EC_Gateway_UDP.cpp