ECG_UDP_Receiver.i

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // ECG_UDP_Receiver.i,v 1.4 2005/11/10 06:47:23 ossama Exp
00004 
00005 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00006 
00007 ACE_INLINE
00008 TAO_ECG_UDP_Receiver_Disconnect_Command::
00009 TAO_ECG_UDP_Receiver_Disconnect_Command (void)
00010   : proxy_ ()
00011 {
00012 }
00013 
00014 ACE_INLINE
00015 TAO_ECG_UDP_Receiver_Disconnect_Command::
00016 TAO_ECG_UDP_Receiver_Disconnect_Command (
00017                           RtecEventChannelAdmin::ProxyPushConsumer_ptr proxy)
00018   : proxy_ (RtecEventChannelAdmin::ProxyPushConsumer::_duplicate (proxy))
00019 {
00020 }
00021 
00022 ACE_INLINE
00023 TAO_ECG_UDP_Receiver_Disconnect_Command::
00024 TAO_ECG_UDP_Receiver_Disconnect_Command (
00025                           const TAO_ECG_UDP_Receiver_Disconnect_Command & rhs)
00026   : proxy_ (RtecEventChannelAdmin::ProxyPushConsumer::_duplicate
00027             (rhs.proxy_.in ()))
00028 {
00029 }
00030 
00031 ACE_INLINE
00032 TAO_ECG_UDP_Receiver_Disconnect_Command &
00033 TAO_ECG_UDP_Receiver_Disconnect_Command::operator= (
00034                          const TAO_ECG_UDP_Receiver_Disconnect_Command & rhs)
00035 {
00036   this->proxy_ =
00037     RtecEventChannelAdmin::ProxyPushConsumer::_duplicate (rhs.proxy_.in ());
00038 
00039   return *this;
00040 }
00041 
00042 ACE_INLINE void
00043 TAO_ECG_UDP_Receiver_Disconnect_Command::
00044 execute (ACE_ENV_SINGLE_ARG_DECL)
00045 {
00046   if (CORBA::is_nil (this->proxy_.in ()))
00047     // We are not connected.
00048     return;
00049 
00050   RtecEventChannelAdmin::ProxyPushConsumer_var release_proxy =
00051     this->proxy_._retn ();
00052 
00053   release_proxy->disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER);
00054   ACE_CHECK;
00055 }
00056 
00057 //***************************************************************************
00058 
00059 ACE_INLINE
00060 TAO_ECG_UDP_Receiver::TAO_ECG_UDP_Receiver (CORBA::Boolean perform_crc)
00061   : lcl_ec_ ()
00062   , addr_server_ ()
00063   , consumer_proxy_ ()
00064   , cdr_receiver_ (perform_crc)
00065   , handler_rptr_ ()
00066   , auto_proxy_disconnect_ ()
00067 {
00068 }
00069 
00070 ACE_INLINE TAO_EC_Servant_Var<TAO_ECG_UDP_Receiver>
00071 TAO_ECG_UDP_Receiver::create (CORBA::Boolean perform_crc)
00072 {
00073   TAO_EC_Servant_Var<TAO_ECG_UDP_Receiver> r;
00074   ACE_NEW_RETURN (r,
00075                   TAO_ECG_UDP_Receiver (perform_crc),
00076                   r);
00077   return r;
00078 }
00079 
00080 ACE_INLINE void
00081 TAO_ECG_UDP_Receiver::set_handler_shutdown (
00082                        TAO_ECG_Refcounted_Handler handler_shutdown_rptr)
00083 {
00084   this->handler_rptr_ = handler_shutdown_rptr;
00085 }
00086 
00087 ACE_INLINE void
00088 TAO_ECG_UDP_Receiver::get_addr (const RtecEventComm::EventHeader& header,
00089                                 RtecUDPAdmin::UDP_Addr_out addr
00090                                 ACE_ENV_ARG_DECL)
00091 {
00092   if (CORBA::is_nil (this->addr_server_.in ()))
00093     {
00094       ACE_ERROR ((LM_ERROR,
00095                   "TAO_ECG_UDP_Receiver::get_addr() called but "
00096                   "nil Address Server was supplied during "
00097                   "initialization through init().\n"));
00098 
00099       ACE_THROW (CORBA::INTERNAL ());
00100     }
00101 
00102   this->addr_server_->get_addr (header, addr
00103                                 ACE_ENV_ARG_PARAMETER);
00104 }
00105 
00106 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 13:11:11 2006 for TAO_RTEvent by doxygen 1.3.6