#include <RtpsUdpLoader.h>
Public Member Functions | |
virtual int | init (int argc, ACE_TCHAR *argv[]) |
Definition at line 23 of file RtpsUdpLoader.h.
int OpenDDS::DCPS::RtpsUdpLoader::init | ( | int | argc, | |
ACE_TCHAR * | argv[] | |||
) | [virtual] |
Reimplemented from ACE_Shared_Object.
Definition at line 34 of file RtpsUdpLoader.cpp.
References OpenDDS::DCPS::TransportRegistry::create_inst(), OpenDDS::DCPS::TransportRegistry::DEFAULT_CONFIG_NAME, OpenDDS::DCPS::TransportRegistry::DEFAULT_INST_PREFIX, OpenDDS::DCPS::TransportRegistry::get_config(), OPENDDS_STRING, OpenDDS::DCPS::TransportRegistry::register_type(), and TheTransportRegistry.
00035 { 00036 static bool initialized(false); 00037 00038 if (initialized) return 0; // already initialized 00039 00040 TransportRegistry* registry = TheTransportRegistry; 00041 registry->register_type(make_rch<RtpsUdpType>()); 00042 // Don't create a default for RTPS. At least for the initial implementation, 00043 // the user needs to explicitly configure it... 00044 #ifdef OPENDDS_SAFETY_PROFILE 00045 // ...except for Safety Profile where RTPS is the only option. 00046 TransportInst_rch default_inst = 00047 registry->create_inst(TransportRegistry::DEFAULT_INST_PREFIX + 00048 OPENDDS_STRING("0600_RTPS_UDP"), 00049 RTPS_UDP_NAME); 00050 registry->get_config(TransportRegistry::DEFAULT_CONFIG_NAME) 00051 ->sorted_insert(default_inst); 00052 #endif 00053 initialized = true; 00054 00055 return 0; 00056 }