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