1 #include <rtm/CorbaNaming.h>
2 #if (!defined(OPENRTM_VERSION042) && !defined(OPENRTM_VERSION110)) || defined(OPENRTM_VERSION_TRUNK)
3 #include <rtm/Manager.h>
14 OpenRTM::ExtTrigExecutionContextService_var extTrigExecContext =
15 OpenRTM::ExtTrigExecutionContextService::_narrow(this->getObjRef());
16 m_cg->subscribe(extTrigExecContext, 1.0/get_rate());
24 #if (defined(OPENRTM_VERSION042) || defined(OPENRTM_VERSION110)) && !defined(OPENRTM_VERSION_TRUNK)
25 if (!m_running)
return RTC::PRECONDITION_NOT_MET;
27 OpenRTM::ExtTrigExecutionContextService_var extTrigExecContext =
28 OpenRTM::ExtTrigExecutionContextService::_narrow(this->getObjRef());
29 m_cg->unsubscribe(extTrigExecContext);
35 std::for_each(m_comps.begin(), m_comps.end(), invoke_on_shutdown());
38 #ifdef OPENRTM_VERSION_042
46 ReturnCode_t ret = OpenHRPExecutionContext::stop();
48 OpenRTM::ExtTrigExecutionContextService_var extTrigExecContext =
49 OpenRTM::ExtTrigExecutionContextService::_narrow(this->getObjRef());
50 m_cg->unsubscribe(extTrigExecContext);
61 RTC::Properties &props = manager->getConfig();
63 = RTC::CorbaNaming(manager->getORB(), props[
"corba.nameservers"].c_str());
65 CORBA::Object_ptr
obj = cn.resolve(
"ClockGenerator");
68 #if defined(OPENRTM_VERSION042) || defined(OPENRTM_VERSION110)
69 manager->registerECFactory(
"SimulationEC",
70 RTC::ECCreate<RTC::SimulationExecutionContext>,
71 RTC::ECDelete<RTC::OpenHRPExecutionContext>);
73 RTC::ExecutionContextFactory::
74 instance().addFactory(
"SimulationEC",
75 ::coil::Creator< ::RTC::ExecutionContextBase,
77 ::coil::Destructor< ::RTC::ExecutionContextBase,
78 ::RTC::OpenHRPExecutionContext>);
82 std::cerr <<
"SimultationExecutionContext: can not find ClockGenerator"