25 #if ( defined ( WIN32 ) || defined ( _WIN32 ) || defined(__WIN32__) ) 26 # if( defined (OPENRTM_VERSION_042) ) 27 #include <ace/OS_main.h> 37 const bool CONTROLLER_BRIDGE_DEBUG =
false;
40 CosNaming::NamingContext_ptr getNamingContext(CORBA::ORB_ptr orb,
const char* nameServerIdentifier)
42 CosNaming::NamingContext_ptr namingContext = CosNaming::NamingContext::_nil();
44 CORBA::Object_var nameServer;
47 nameServer = orb->string_to_object(nameServerIdentifier);
49 catch (
const CORBA::ORB::InvalidName&) {
50 cerr <<
"`NameService' cannot be resolved" << endl;
53 if(CORBA::is_nil(nameServer)){
54 cerr <<
"`NameService' is a nil object reference" << endl;
57 namingContext = CosNaming::NamingContext::_narrow(nameServer);
60 cerr <<
"`NameService' is not a NamingContext object reference" << endl;
70 CosNaming::NamingContext_var namingContext =
73 if(CORBA::is_nil(namingContext)){
78 CORBA::Object_var controller = controllerServant->_this();
80 CosNaming::Name controllerName;
81 controllerName.length(1);
83 controllerName[0].kind = CORBA::string_dup(
"");
85 namingContext->rebind(controllerName, controller);
94 int main(
int argc,
char* argv[])
102 char** rtc_argv = (
char **)
malloc(
sizeof(
char *)*argc);
103 rtc_argv[0] = argv[0];
104 for (i=1; i<argc; i++){
105 if (strncmp(argv[i],
"--", 2)!=0 ) {
106 rtc_argv[rtc_argc] = argv[
i];
116 cerr <<
"Cannot initialize OpenRTM" << endl;
124 }
catch (std::exception& ex) {
125 cerr << argv[0] <<
": " << ex.what() << endl;
131 if(setup(rtcManager, bridgeConf)){
132 cout <<
"ready" << endl;
void runManager(bool no_block=false)
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
static BridgeConf * initialize(int argc, char *argv[])
const char * getOpenHRPNameServerIdentifier()
static Manager * init(int argc, char **argv)
const char * getControllerName()
int main(int argc, char *argv[])