#include <EC_Gateway_UDP.h>
Inheritance diagram for TAO_ECG_Mcast_EH
Public Methods | |
TAO_ECG_Mcast_EH (TAO_ECG_UDP_Receiver *recv, const ACE_TCHAR *net_if = 0) | |
virtual | ~TAO_ECG_Mcast_EH (void) |
Destructor. | |
int | open (RtecEventChannelAdmin::EventChannel_ptr ec, CORBA::Environment &env = TAO_default_environment ()) |
int | close (CORBA::Environment &env = TAO_default_environment ()) |
ACE_SOCK_Dgram& | dgram (void) |
virtual int | handle_input (ACE_HANDLE fd) |
Reactor callbacks. | |
virtual ACE_HANDLE | get_handle (void) const |
void | update_consumer (const RtecEventChannelAdmin::ConsumerQOS& sub, CORBA::Environment &env = TAO_default_environment ()) throw (CORBA::SystemException) |
The Observer methods. | |
void | update_supplier (const RtecEventChannelAdmin::SupplierQOS& pub, CORBA::Environment &env = TAO_default_environment ()) throw (CORBA::SystemException) |
Private Methods | |
int | subscribe (const ACE_INET_Addr &mcast_addr) |
Control the multicast group subscriptions. | |
int | unsubscribe (const ACE_INET_Addr &mcast_addr) |
Private Attributes | |
ACE_TCHAR* | net_if_ |
The NIC name used to subscribe for multicast traffic. | |
ACE_SOCK_Dgram_Mcast | dgram_ |
The datagram used to receive the data. | |
TAO_ECG_UDP_Receiver* | receiver_ |
We callback to this object when a message arrives. | |
Observer | observer_ |
This object will call us back when the subscription list changes. | |
RtecEventChannelAdmin::Observer_Handle | handle_ |
Keep the handle of the observer so we can unregister later. | |
RtecEventChannelAdmin::EventChannel_var | ec_ |
The Event Channel. |
This object receives callbacks from the Reactor when data is available on the mcast socket, it forwards to the UDP_Receive gateway which reads the events and transform it into an event.
|
Constructor, the messages received by this EH are forwarded to the <recv>. It is possible to select the NIC where the multicast messages are expected using <net_if> |
|
Destructor.
|
|
Remove ourselves from the event channel, unsubscribe from the multicast groups, close the sockets and unsubscribe from the reactor. |
|
Obtain the dgram, this is one of those "controlled violations of type safety", allowing the user to setup options and gain access to low-level features. |
|
Reimplemented from ACE_Event_Handler. |
|
Reactor callbacks.
Reimplemented from ACE_Event_Handler. |
|
Register for changes in the EC subscription list. When the subscription list becomes non-empty we join the proper multicast groups (using the receiver to translate between event types and mcast groups) and the class registers itself with the reactor. |
|
Control the multicast group subscriptions.
|
|
|
|
The Observer methods.
|
|
|
|
The datagram used to receive the data.
|
|
The Event Channel.
|
|
Keep the handle of the observer so we can unregister later.
|
|
The NIC name used to subscribe for multicast traffic.
|
|
This object will call us back when the subscription list changes.
|
|
We callback to this object when a message arrives.
|