|
From: Aaron R. <aar...@gm...> - 2009-10-23 17:45:14
|
Hello,
I have modified the messenger cpp example to the the transport configuration
manual as such:
// Initialize and attach Transport
OpenDDS::DCPS::TransportIdType transportId = 0;
std::string multicastAddress = "238.1.1.1";
OpenDDS::DCPS::TransportConfiguration_rch transport_cfg;
//TODO: build tcp, udp, reliable_mcast based up input. Maybe look at IP
address
// to determine mcast if UDP?
//build configuration
transport_cfg =
TheTransportFactory->create_configuration(transportId,
ACE_TEXT("SimpleMcast"));
//cast to proper config
OpenDDS::DCPS::SimpleMcastConfiguration* smcast_config
= static_cast <OpenDDS::DCPS::SimpleMcastConfiguration*> (
transport_cfg.in ());
//set multicast values
//TODO: set local address to force nic card. Right now rely on system
routing
smcast_config->multicast_group_address_ = ACE_INET_Addr
(multicastAddress.c_str ());
smcast_config->receiver_ = true;
OpenDDS::DCPS::TransportImpl_rch transport_impl =
TheTransportFactory->create_transport_impl(transportId,
ACE_TEXT("SimpleMcast"),
OpenDDS::DCPS::DONT_AUTO_CONFIG);
//set configuration
transport_impl->configure(transport_cfg.in());
this compiles but I am having trouble running it to test. when I try:
$DDS_ROOT/bin/DCPSInfoRepo -ORBSvcConf mcast.conf
I get:
(6217|3074930384)INFO: not using file configuration - no configuration file
specified.
(6217|3074930384)TransportFactory::get_or_create_factory: transport
(type=SimpleTcp) is not registered.
(6217|3074930384) ERROR: DCPSInfoRepo::init: Unable to initialize
transport.
Unexpected initialization Error: Unable to initialize transport.
If I do:
$DDS_ROOT/bin/DCPSInfoRepo -ORBSvcConf tcp.conf
I get:
(6231|3074729680)INFO: not using file configuration - no configuration file
specified.
but I can't run subscriber then.
./subscriber
(6243|3075283440)INFO: not using file configuration - no configuration file
specified.
(6243|3075283440)TransportFactory::get_or_create_factory: transport
(type=SimpleTcp) is not registered.
(6243|3075283440) EXCEPTION, Exception caught in main():
system exception, ID 'IDL:omg.org/CORBA/UNKNOWN:1.0'
Unknown vendor minor code id (0), minor code = 0, completed = NO
./subscriber -ORBSvcConf tcp.conf
(6245|3075467760)INFO: not using file configuration - no configuration file
specified.
(6245|3075467760)TransportFactory::create_configuration:
transport_type=SimpleMcast is not registered.
Segmentation fault
./subscriber -ORBSvcConf mcast.conf
(6254|3074034160)INFO: not using file configuration - no configuration file
specified.
(6254|3074034160)TransportFactory::get_or_create_factory: transport
(type=SimpleTcp) is not registered.
(6254|3074034160) EXCEPTION, Exception caught in main():
system exception, ID 'IDL:omg.org/CORBA/UNKNOWN:1.0'
Unknown vendor minor code id (0), minor code = 0, completed = NO
Where am I going wrong/what did I misunderstand?
-Aaron
|