00001 // -*- C++ -*- 00002 00003 /** 00004 * @file EC_UDP_Admin.h 00005 * 00006 * $Id: EC_UDP_Admin.h 78519 2007-05-29 14:54:16Z mesnier_p $ 00007 * 00008 * @author Carlos O'Ryan (coryan@cs.wustl.edu) 00009 * 00010 * Based on previous work by Tim Harrison (harrison@cs.wustl.edu) and 00011 * other members of the DOC group. More details can be found in: 00012 * 00013 * http://doc.ece.uci.edu/~coryan/EC/index.html 00014 */ 00015 00016 #ifndef TAO_EC_UDP_ADMIN_H 00017 #define TAO_EC_UDP_ADMIN_H 00018 #include /**/ "ace/pre.h" 00019 00020 #include "orbsvcs/RtecUDPAdminS.h" 00021 #include /**/ "orbsvcs/Event/event_serv_export.h" 00022 00023 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00024 00025 /** 00026 * @class TAO_EC_Simple_AddrServer 00027 * 00028 * @brief TAO Real-time Event Service; a simple UDP address server. 00029 * 00030 * The EC is able to use multiple multicast groups to transmit its 00031 * data, the is given control over the mapping between the Event 00032 * (type,source) pair and the (ipaddr,port) pair using a 00033 * AddrServer. 00034 * This class implements a very simple server that simply maps the 00035 * type component to the ipaddr and uses a fixed port, 00036 * provided at initialization time. 00037 */ 00038 class TAO_RTEvent_Serv_Export TAO_EC_Simple_AddrServer : public POA_RtecUDPAdmin::AddrServer 00039 { 00040 public: 00041 /// Constructor 00042 TAO_EC_Simple_AddrServer (CORBA::UShort port); 00043 00044 /// Destructor 00045 virtual ~TAO_EC_Simple_AddrServer (void); 00046 00047 // = The RtecUDPAdmin::AddrServer methods 00048 virtual void get_addr (const RtecEventComm::EventHeader& header, 00049 RtecUDPAdmin::UDP_Addr_out addr); 00050 00051 virtual void get_address (const RtecEventComm::EventHeader& header, 00052 RtecUDPAdmin::UDP_Address_out addr); 00053 00054 private: 00055 CORBA::UShort port_; 00056 }; 00057 00058 TAO_END_VERSIONED_NAMESPACE_DECL 00059 00060 #include /**/ "ace/post.h" 00061 #endif /* TAO_EC_UDP_ADMIN_H */