23 from omniORB
import any
24 from omniORB
import CORBA
34 "implementation_id",
"",
91 def __init__(self, manager=None, orb=None, poa=None):
94 self.
_orb = self._manager.getORB()
95 self.
_poa = self._manager.getPOA()
104 self.
_rtcout = self._manager.getLogbuf(
"rtobject")
106 self.
_rtcout = OpenRTM_aist.Manager.instance().getLogbuf(
"rtobject")
111 self.
_profile = RTC.ComponentProfile(
"",
"",
"",
"",
"",
"",[],
None,[])
176 self._rtcout.RTC_TRACE(
"onInitialize()")
199 self._rtcout.RTC_TRACE(
"onFinalize()")
223 self._rtcout.RTC_TRACE(
"onStartup(%d)",ec_id)
247 self._rtcout.RTC_TRACE(
"onShutdown(%d)",ec_id)
271 self._rtcout.RTC_TRACE(
"onActivated(%d)",ec_id)
295 self._rtcout.RTC_TRACE(
"onDeactivated(%d)",ec_id)
321 self._rtcout.RTC_TRACE(
"onExecute(%d)",ec_id)
345 self._rtcout.RTC_TRACE(
"onAborting(%d)",ec_id)
368 self._rtcout.RTC_TRACE(
"onError(%d)",ec_id)
391 self._rtcout.RTC_TRACE(
"onReset(%d)",ec_id)
417 self._rtcout.RTC_TRACE(
"onStateupdate(%d)",ec_id)
443 self._rtcout.RTC_TRACE(
"onRatechanged(%d)",ec_id)
488 self._rtcout.RTC_TRACE(
"initialize()")
490 ec_args = self._properties.getProperty(
"exec_cxt.periodic.type")
493 ec_args += self._properties.getProperty(
"exec_cxt.periodic.rate")
495 ec = OpenRTM_aist.Manager.instance().createContext(ec_args)
499 ec.set_rate(float(self._properties.getProperty(
"exec_cxt.periodic.rate")))
500 self._eclist.append(ec)
502 if CORBA.is_nil(ecv):
505 ec.bindComponent(self)
509 return RTC.PRECONDITION_NOT_MET
512 if ret
is not RTC.RTC_OK:
517 for i
in range(len(self.
_ecMine)):
518 self._rtcout.RTC_DEBUG(
"EC[%d] starting.", i)
571 self._rtcout.RTC_TRACE(
"finalize()")
573 return RTC.PRECONDITION_NOT_MET
579 if not CORBA.is_nil(ec):
580 return RTC.PRECONDITION_NOT_MET
634 self._rtcout.RTC_TRACE(
"exit()")
636 return RTC.PRECONDITION_NOT_MET
647 if not CORBA.is_nil(ec)
or not ec._non_existent():
654 if not CORBA.is_nil(ec):
656 ec.remove_component(self._this())
699 self._rtcout.RTC_TRACE(
"is_alive()")
701 if exec_context._is_equivalent(ec):
705 if not CORBA.is_nil(ec):
706 if exec_context._is_equivalent(ec):
765 global ECOTHER_OFFSET
767 self._rtcout.RTC_TRACE(
"get_context(%d)", ec_id)
769 if ec_id < ECOTHER_OFFSET:
773 return RTC.ExecutionContext._nil
776 index = ec_id - ECOTHER_OFFSET
779 if not CORBA.is_nil(self.
_ecOther[index]):
782 return RTC.ExecutionContext._nil
804 self._rtcout.RTC_TRACE(
"get_owned_contexts()")
828 self._rtcout.RTC_TRACE(
"get_participating_contexts()")
859 self._rtcout.RTC_TRACE(
"get_context_handle()")
898 self._rtcout.RTC_TRACE(
"get_component_profile()")
900 prop_ = RTC.ComponentProfile(self._properties.getProperty(
"instance_name"),
901 self._properties.getProperty(
"type_name"),
902 self._properties.getProperty(
"description"),
903 self._properties.getProperty(
"version"),
904 self._properties.getProperty(
"vendor"),
905 self._properties.getProperty(
"category"),
906 self._portAdmin.getPortProfileList(),
907 self._profile.parent,
908 self._profile.properties)
922 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
950 self._rtcout.RTC_TRACE(
"get_ports()")
952 return self._portAdmin.getPortServiceList()
954 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
995 global ECOTHER_OFFSET
996 self._rtcout.RTC_TRACE(
"attach_context()")
1001 ecs = exec_context._narrow(RTC.ExecutionContextService)
1002 if CORBA.is_nil(ecs):
1006 for i
in range(len(self.
_ecOther)):
1009 ec_id = i + ECOTHER_OFFSET
1015 ec_id = long(len(self.
_ecOther) - 1 + ECOTHER_OFFSET)
1022 global ECOTHER_OFFSET
1023 self._rtcout.RTC_TRACE(
"bindContext()")
1028 ecs = exec_context._narrow(RTC.ExecutionContextService)
1030 if CORBA.is_nil(ecs):
1034 for i
in range(len(self.
_ecMine)):
1035 if CORBA.is_nil(self.
_ecMine[i]):
1044 return long(len(self.
_ecMine) - 1)
1091 global ECOTHER_OFFSET
1092 self._rtcout.RTC_TRACE(
"detach_context(%d)", ec_id)
1099 if (long(ec_id) < long(ECOTHER_OFFSET))
or \
1100 (long(ec_id - ECOTHER_OFFSET) > len_):
1101 return RTC.BAD_PARAMETER
1103 index = long(ec_id - ECOTHER_OFFSET)
1105 if index < 0
or CORBA.is_nil(self.
_ecOther[index]):
1106 return RTC.BAD_PARAMETER
1109 self.
_ecOther[index] = RTC.ExecutionContextService._nil
1139 self._rtcout.RTC_TRACE(
"on_initialize()")
1145 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1148 active_set = self._properties.getProperty(
"configuration.active_config",
1151 if self._configsets.haveConfig(active_set):
1152 self._configsets.update(active_set)
1154 self._configsets.update(
"default")
1185 self._rtcout.RTC_TRACE(
"on_finalize()")
1191 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1225 self._rtcout.RTC_TRACE(
"on_startup(%d)", ec_id)
1231 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1265 self._rtcout.RTC_TRACE(
"on_shutdown(%d)", ec_id)
1271 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1303 self._rtcout.RTC_TRACE(
"on_activated(%d)", ec_id)
1307 self._configsets.update()
1309 self._portAdmin.activatePorts()
1311 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1343 self._rtcout.RTC_TRACE(
"on_deactivated(%d)", ec_id)
1347 self._portAdmin.deactivatePorts()
1350 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1388 self._rtcout.RTC_TRACE(
"on_aborting(%d)", ec_id)
1394 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1443 self._rtcout.RTC_TRACE(
"on_error(%d)", ec_id)
1449 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1451 self._configsets.update()
1489 self._rtcout.RTC_TRACE(
"on_reset(%d)", ec_id)
1495 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1542 self._rtcout.RTC_TRACE(
"on_execute(%d)", ec_id)
1555 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1602 self._rtcout.RTC_TRACE(
"on_state_update(%d)", ec_id)
1607 self._configsets.update()
1609 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1650 self._rtcout.RTC_TRACE(
"on_rate_changed(%d)", ec_id)
1656 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1707 self._rtcout.RTC_TRACE(
"get_owned_organizations()")
1711 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1712 raise SDOPackage.NotAvailable(
"NotAvailable: get_owned_organizations")
1758 self._rtcout.RTC_TRACE(
"get_sdo_id()")
1760 return self._profile.instance_name
1762 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1763 raise SDOPackage.InternalError(
"get_sdo_id()")
1803 self._rtcout.RTC_TRACE(
"get_sdo_type()")
1805 return self._profile.description
1807 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1808 raise SDOPackage.InternalError(
"get_sdo_type()")
1852 self._rtcout.RTC_TRACE(
"get_device_profile()")
1854 return self._SdoConfigImpl.getDeviceProfile()
1856 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1857 raise SDOPackage.InternalError(
"get_device_profile()")
1859 return SDOPackage.DeviceProfile(
"",
"",
"",
"",[])
1902 self._rtcout.RTC_TRACE(
"get_service_profiles()")
1907 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1908 raise SDOPackage.InternalError(
"get_service_profiles()")
1957 self._rtcout.RTC_TRACE(
"get_service_profile(%s)", _id)
1960 raise SDOPackage.InvalidParameter(
"get_service_profile(): Empty name.")
1966 raise SDOPackage.InvalidParameter(
"get_service_profile(): Not found")
1970 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1971 raise SDOPackage.InternalError(
"get_service_profile()")
1973 return SDOPackage.ServiceProfile(
"",
"", [],
None)
2024 self._rtcout.RTC_TRACE(
"get_sdo_service(%s)", _id)
2028 raise SDOPackage.InvalidParameter(
"get_service(): Empty name.")
2033 raise SDOPackage.InvalidParameter(
"get_service(): Not found")
2038 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
2039 raise SDOPackage.InternalError(
"get_service()")
2040 return SDOPackage.SDOService._nil
2090 self._rtcout.RTC_TRACE(
"get_configuration()")
2092 raise SODPackage.InterfaceNotImplemented(
"InterfaceNotImplemented: get_configuration")
2096 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
2097 raise SDOPackage.InternalError(
"get_configuration()")
2098 return SDOPackage.Configuration._nil
2147 self._rtcout.RTC_TRACE(
"get_monitoring()")
2148 raise SDOPackage.InterfaceNotImplemented(
"Exception: get_monitoring")
2149 return SDOPackage.Monitoring._nil
2190 self._rtcout.RTC_TRACE(
"get_organizations()")
2195 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
2196 raise SDOPackage.InternalError(
"get_organizations()")
2234 self._rtcout.RTC_TRACE(
"get_status_list()")
2238 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
2239 raise SDOPackage.InternalError(
"get_status_list()")
2281 self._rtcout.RTC_TRACE(
"get_status(%s)", name)
2284 raise SDOPackage.InvalidParameter(
"get_status(): Not found")
2287 return any.to_any(self.
_sdoStatus[index].value)
2289 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
2290 raise SDOPackage.InternalError(
"get_status()")
2291 return any.to_any(
"")
2314 self._rtcout.RTC_TRACE(
"getInstanceName()")
2315 return self._profile.instance_name
2334 self._rtcout.RTC_TRACE(
"setInstanceName(%s)", instance_name)
2335 self._properties.setProperty(
"instance_name",instance_name)
2336 self._profile.instance_name = self._properties.getProperty(
"instance_name")
2355 self._rtcout.RTC_TRACE(
"getTypeName()")
2356 return self._profile.type_name
2375 self._rtcout.RTC_TRACE(
"getDescription()")
2376 return self._profile.description
2395 self._rtcout.RTC_TRACE(
"getVersion()")
2396 return self._profile.version
2415 self._rtcout.RTC_TRACE(
"getVendor()")
2416 return self._profile.vendor
2435 self._rtcout.RTC_TRACE(
"getCategory()")
2436 return self._profile.category
2455 self._rtcout.RTC_TRACE(
"getNamingNames()")
2456 return [s.strip()
for s
in self._properties.getProperty(
"naming.names").
split(
",")]
2474 self._rtcout.RTC_TRACE(
"setObjRef()")
2495 self._rtcout.RTC_TRACE(
"getObjRef()")
2526 self._rtcout.RTC_TRACE(
"setProperties()")
2527 self._properties.mergeProperties(prop)
2528 self._profile.instance_name = self._properties.getProperty(
"instance_name")
2529 self._profile.type_name = self._properties.getProperty(
"type_name")
2530 self._profile.description = self._properties.getProperty(
"description")
2531 self._profile.version = self._properties.getProperty(
"version")
2532 self._profile.vendor = self._properties.getProperty(
"vendor")
2533 self._profile.category = self._properties.getProperty(
"category")
2560 self._rtcout.RTC_TRACE(
"getProperties()")
2587 def bindParameter(self, param_name, var, def_val, trans=
None):
2588 self._rtcout.RTC_TRACE(
"bindParameter()")
2590 trans_ = OpenRTM_aist.stringTo
2593 self._configsets.bindParameter(param_name, var, def_val, trans_)
2613 self._rtcout.RTC_TRACE(
"updateParameters(%s)", config_set)
2614 self._configsets.update(config_set)
2653 self._rtcout.RTC_TRACE(
"registerPort()")
2655 self._rtcout.RTC_ERROR(
"addPort(PortBase&) failed.")
2667 self._rtcout.RTC_TRACE(
"addPort()")
2669 self._rtcout.RTC_TRACE(
"addPort(CorbaPort)")
2670 propkey =
"port.corbaport." 2671 prop = self._properties.getNode(propkey)
2673 self._properties.getNode(propkey).mergeProperties(self._properties.getNode(
"port.corba"))
2674 port.init(self._properties.getNode(propkey))
2678 self._rtcout.RTC_TRACE(
"addPort(PortBase)")
2683 elif isinstance(port, RTC._objref_PortService):
2684 self._rtcout.RTC_TRACE(
"addPort(PortService)")
2685 return self._portAdmin.addPort(port)
2714 self._rtcout.RTC_TRACE(
"registerInPort(%s)", name)
2716 self._rtcout.RTC_ERROR(
"addInPort(%s) failed.", name)
2721 self._rtcout.RTC_TRACE(
"addInPort(%s)", name)
2723 propkey =
"port.inport." + name
2724 prop_ = copy.copy(self._properties.getNode(propkey))
2725 prop_.mergeProperties(self._properties.getNode(
"port.inport.dataport"))
2730 self._rtcout.RTC_ERROR(
"addInPort() failed.")
2733 inport.init(self._properties.getNode(propkey))
2734 self._inports.append(inport)
2757 self._rtcout.RTC_TRACE(
"registerOutPort(%s)", name)
2759 self._rtcout.RTC_ERROR(
"addOutPort(%s) failed.", name)
2765 self._rtcout.RTC_TRACE(
"addOutPort(%s)", name)
2767 propkey =
"port.outport." + name
2768 prop_ = copy.copy(self._properties.getNode(propkey))
2769 prop_.mergeProperties(self._properties.getNode(
"port.outport.dataport"))
2774 self._rtcout.RTC_ERROR(
"addOutPort() failed.")
2777 outport.init(self._properties.getNode(propkey))
2778 self._outports.append(outport)
2805 self._rtcout.RTC_TRACE(
"removeInPort()")
2812 self._inports.remove(port)
2814 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
2844 self._rtcout.RTC_TRACE(
"removeOutPort()")
2851 self._outports.remove(port)
2853 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
2881 self._rtcout.RTC_TRACE(
"deletePort()")
2883 self._rtcout.RTC_ERROR(
"removePort() failed.")
2888 self._rtcout.RTC_TRACE(
"removePort()")
2891 return self._portAdmin.removePort(port)
2908 self._rtcout.RTC_TRACE(
"deletePortByName(%s)", port_name)
2909 self._portAdmin.deletePortByName(port_name)
3022 if CORBA.is_nil(ec):
3025 return ec.get_rate()
3084 if CORBA.is_nil(ec):
3085 return RTC.RTC_ERROR
3144 global ECOTHER_OFFSET
3145 if ec_id < ECOTHER_OFFSET:
3191 if CORBA.is_nil(ec):
3192 return RTC.RTC_ERROR
3193 return ec.deactivate_component(self.
getObjRef())
3235 if CORBA.is_nil(ec):
3236 return RTC.RTC_ERROR
3237 return ec.activate_component(self.
getObjRef())
3275 def reset(self, ec_id):
3277 if CORBA.is_nil(ec):
3278 return RTC.RTC_ERROR
3279 return ec.reset_component(self.
getObjRef())
3292 return self._sdoservice.addSdoServiceProvider(prof, provider)
3304 return self._sdoservice.removeSdoServiceProvider(id)
3316 return self._sdoservice.addSdoServiceConsumer(prof)
3328 return self._sdoservice.removeSdoServiceConsumer(id)
3353 self._rtcout.RTC_TRACE(
"readAll()")
3356 if not inport.read():
3357 self._rtcout.RTC_DEBUG(
"The error occurred in readAll().")
3387 self._rtcout.RTC_TRACE(
"writeAll()")
3390 if not outport.write():
3391 self._rtcout.RTC_DEBUG(
"The error occurred in writeAll().")
3433 def setReadAll(self, read=True, completion=False):
3470 def setWriteAll(self, write=True, completion=False):
3493 self._rtcout.RTC_TRACE(
"finalizePorts()")
3494 self._portAdmin.finalizePorts()
3501 self._rtcout.RTC_TRACE(
"finalizeContexts()")
3503 for i
in range(len_):
3504 idx = (len_ - 1) - i
3507 self._poa.deactivate_object(self._poa.servant_to_id(self.
_eclist[idx]))
3509 self._rtcout.RTC_TRACE(OpenRTM_aist.Logger.print_exception())
3599 def __call__(self, ec_id):
3603 listener = Noname(memfunc)
3604 self._actionListeners.preaction_[listener_type].addListener(listener, autoclean)
3631 self._actionListeners.preaction_[listener_type].removeListener(listener)
3718 def __call__(self, ec_id, ret):
3722 listener = Noname(memfunc)
3723 self._actionListeners.postaction_[listener_type].addListener(listener, autoclean)
3750 self._actionListeners.postaction_[listener_type].removeListener(listener)
3818 def __call__(self, pprofile):
3822 listener = Noname(memfunc)
3823 self._actionListeners.portaction_[listener_type].addListener(listener, autoclean)
3849 self._actionListeners.portaction_[listener_type].removeListener(listener)
3917 def __call__(self, ec_id):
3921 listener = Noname(memfunc)
3922 self._actionListeners.ecaction_[listener_type].addListener(listener, autoclean)
3949 self._actionListeners.ecaction_[listener_type].removeListener(listener)
4019 def __call__(self, portname, cprofile):
4023 listener = Noname(memfunc)
4024 self._portconnListeners.portconnect_[listener_type].addListener(listener, autoclean)
4051 self._portconnListeners.portconnect_[listener_type].removeListener(listener)
4125 def __call__(self, portname, cprofile, ret):
4129 listener = Noname(memfunc)
4130 self._portconnListeners.portconnret_[listener_type].addListener(listener, autoclean)
4157 self._portconnListeners.portconnret_[listener_type].removeListener(listener)
4205 def __call__(self, config_set_name, config_param_name):
4206 self.
_memfunc(config_set_name, config_param_name)
4209 listener = Noname(memfunc)
4210 self._configsets.addConfigurationParamListener(type, listener, autoclean)
4241 self._configsets.removeConfigurationParamListener(type, listener)
4287 def __call__(self, config_set):
4291 listener = Noname(memfunc)
4292 self._configsets.addConfigurationSetListener(listener_type, listener, autoclean)
4321 self._configsets.removeConfigurationSetListener(type, listener)
4369 def __call__(self, config_set_name):
4373 listener = Noname(memfunc)
4374 self._configsets.addConfigurationSetNameListener(type, listener, autoclean)
4407 self._configsets.removeConfigurationSetNameListener(type, listener)
4426 self._rtcout.RTC_TRACE(
"shutdown()")
4430 self._poa.deactivate_object(self._poa.servant_to_id(self.
_SdoConfigImpl))
4431 self._poa.deactivate_object(self._poa.servant_to_id(self))
4433 self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
4436 self._rtcout.RTC_DEBUG(
"Cleanup on Manager")
4437 self._manager.notifyFinalized(self)
4443 self._actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_INITIALIZE].notify(ec_id)
4448 self._actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_FINALIZE].notify(ec_id)
4453 self._actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_STARTUP].notify(ec_id)
4458 self._actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_SHUTDOWN].notify(ec_id)
4463 self._actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_ACTIVATED].notify(ec_id)
4468 self._actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_DEACTIVATED].notify(ec_id)
4473 self._actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_ABORTING].notify(ec_id)
4478 self._actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_ERROR].notify(ec_id)
4483 self._actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_RESET].notify(ec_id)
4488 self._actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_EXECUTE].notify(ec_id)
4493 self._actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_STATE_UPDATE].notify(ec_id)
4499 self._actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_RATE_CHANGED].notify(ec_id)
4505 self._actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_INITIALIZE].notify(ec_id, ret)
4511 self._actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_FINALIZE].notify(ec_id, ret)
4517 self._actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_STARTUP].notify(ec_id, ret)
4523 self._actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_SHUTDOWN].notify(ec_id, ret)
4529 self._actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_ACTIVATED].notify(ec_id, ret)
4535 self._actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_DEACTIVATED].notify(ec_id, ret)
4541 self._actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_ABORTING].notify(ec_id, ret)
4547 self._actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_ERROR].notify(ec_id, ret)
4553 self._actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_RESET].notify(ec_id, ret)
4559 self._actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_EXECUTE].notify(ec_id, ret)
4565 self._actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_STATE_UPDATE].notify(ec_id, ret)
4571 self._actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_RATE_CHANGED].notify(ec_id, ret)
4577 self._actionListeners.portaction_[OpenRTM_aist.PortActionListenerType.ADD_PORT].notify(pprof)
4583 self._actionListeners.portaction_[OpenRTM_aist.PortActionListenerType.REMOVE_PORT].notify(pprof)
4589 self._actionListeners.ecaction_[OpenRTM_aist.ExecutionContextActionListenerType.EC_ATTACHED].notify(ec_id)
4595 self._actionListeners.ecaction_[OpenRTM_aist.ExecutionContextActionListenerType.EC_DETACHED].notify(ec_id)
4611 def __call__(self, prof):
4612 return self._id == prof.id
4631 return self._name == nv.name
4647 if not CORBA.is_nil(ecs):
4648 ec = ecs._narrow(RTC.ExecutionContext)
4649 return self._ec._is_equivalent(ec)
4651 print OpenRTM_aist.Logger.print_exception()
4666 self._eclist = eclist
4669 if not CORBA.is_nil(ecs):
4670 self._eclist.append(ecs)
4686 if not CORBA.is_nil(ec)
and not ec._non_existent():
4687 ec.deactivate_component(self._comp)
4690 print OpenRTM_aist.Logger.print_exception()
4694 def onExecute(self, ec_id)
def get_status(self, name)
[SDO interface] Get SDO Status
def setReadAll(self, read=True, completion=False)
Set whether to execute the readAll() method.
def removePortConnectRetListener(self, listener_type, listener)
Removing PortConnectRet type listener.
def bindContext(self, exec_context)
def removeExecutionContextActionListener(self, listener_type, listener)
Removing ExecutionContextAction type listener.
PostComponentActionListener class.
def on_activated(self, ec_id)
[ComponentAction CORBA interface] Activate RTC
def on_finalize(self)
[ComponentAction CORBA interface] Finalize RTC
def postOnExecute(self, ec_id, ret)
def removePostComponentActionListener(self, listener_type, listener)
Removing PostComponentAction type listener.
def addSdoServiceProvider(self, prof, provider)
[local interface] Set a SDO service providerbool addSdoServiceProvider(const SDOPackage::ServiceProfi...
def getNamingNames(self)
std::vector<std::string> getNamingNames();
def getInstanceName(self)
const char* getInstanceName()
def finalizeContexts(self)
def reset(self, ec_id)
[local interface] Resetting and go to Inactive state
def initialize(self)
Initialize the RTC that realizes this interface.
def onDetachExecutionContext(self, ec_id)
def postOnStartup(self, ec_id, ret)
def preOnDeactivated(self, ec_id)
def get_service_profiles(self)
[SDO interface] Getting SDO ServiceProfile
def preOnAborting(self, ec_id)
RT Conponent CORBA service/consumer Port.
def deactivate(self, ec_id)
[local interface] Make transition to Inactive state
def registerOutPort(self, name, outport)
void registerOutPort(const char* name, OutPortBase& outport);
def removePortActionListener(self, listener_type, listener)
Removing PortAction type listener.
def get_sdo_service(self, _id)
[SDO interface] Getting specified SDO Service's reference
def addPortConnectRetListener(self, listener_type, memfunc, autoclean=True)
Adding PortConnectRet type listener.
def preOnStartup(self, ec_id)
def setWriteAll(self, write=True, completion=False)
Set whether to execute the writeAll() method.
def split(input, delimiter)
Split string by delimiter.
def push_back(seq, elem)
Push the new element back to the CORBA sequence.
def on_reset(self, ec_id)
[ComponentAction CORBA interface] Resetting RTC
def deletePortByName(self, port_name)
def getCategory(self)
const char* getCategory()
def __init__(self, eclist)
PreComponentActionListener class.
def getDescription(self)
const char* getDescription()
def addConfigurationSetNameListener(self, type, memfunc, autoclean=True)
Adding ConfigurationSetNameListener.
Configuration implementation class.
def addConfigurationSetListener(self, listener_type, memfunc, autoclean=True)
Adding ConfigurationSetListener.
def isOwnExecutionContext(self, ec_id)
[local interface] Checking if the current context is own context
def for_each(seq, f)
Apply the functor to all CORBA sequence elements.
def bindParameter(self, param_name, var, def_val, trans=None)
template <typename vartype>=""> bool bindParameter(const char* param_name, VarType& var...
def finalize(self)
Finalize the RTC for preparing it for destruction.
def preOnExecute(self, ec_id)
def removeConfigurationParamListener(self, type, listener)
Removing ConfigurationParamListener.
The Properties class represents a persistent set of properties.
def getObjRef(self)
RTObject_ptr getObjRef() const;.
def on_error(self, ec_id)
[ComponentAction CORBA interface] Error Processing of RTC
def removeSdoServiceConsumer(self, id)
[local interface] Remove a SDO service consumerbool removeSdoServiceConsumer(const char* id); ...
def on_shutdown(self, ec_id)
[ComponentAction CORBA interface] ShutDown RTC
def preOnInitialize(self, ec_id)
def addSdoServiceConsumer(self, prof)
[local interface] Set a SDO service consumerbool addSdoServiceConsumer(const SDOPackage::ServiceProfi...
def removePort(self, port)
PortActionListener class.
ConfigurationParamListener class.
def onAddPort(self, pprof)
def get_sdo_id(self)
[SDO interface] Getting SDO ID
def preOnActivated(self, ec_id)
def is_alive(self, exec_context)
Confirm whether RTC is an Alive state or NOT.
def addConfigurationParamListener(self, type, memfunc, autoclean=True)
Adding ConfigurationParamListener.
def deletePort(self, port)
[local interface] Unregister Port
def activate(self, ec_id)
[local interface] Make transition to Active state
def get_sdo_type(self)
[SDO interface] Getting SDO type
def __del__(self)
destructor
def setInstanceName(self, instance_name)
void setInstanceName(const char* instance_name);
def addPortActionListener(self, listener_type, memfunc, autoclean=True)
Adding PortAction type listener.
PortConnectRetListener class.
def onStartup(self, ec_id)
def get_status_list(self)
[SDO interface] Get SDO Status
def get_owned_organizations(self)
[SDO interface] Getting Organizations
def __init__(self, manager=None, orb=None, poa=None)
Consructor.
def on_deactivated(self, ec_id)
[ComponentAction CORBA interface] Deactivate RTC
def removeConfigurationSetListener(self, type, listener)
Removing ConfigurationSetListener.
def preOnError(self, ec_id)
def on_startup(self, ec_id)
[ComponentAction CORBA interface] StartUp RTC
def get_context(self, ec_id)
[CORBA interface] Get ExecutionContextList.
def postOnShutdown(self, ec_id, ret)
def addExecutionContextActionListener(self, listener_type, memfunc, autoclean=True)
Adding ExecutionContextAction type listener.
def getVendor(self)
const char* getVendor()
def writeAll(self)
The write() method of all OutPort is called.
def onAttachExecutionContext(self, ec_id)
def preOnFinalize(self, ec_id)
def onStateUpdate(self, ec_id)
def setProperties(self, prop)
[local interface] Set RTC property
def preOnReset(self, ec_id)
def removePortConnectListener(self, listener_type, listener)
Removing PortConnect type listener.
def get_ports(self)
[RTObject CORBA interface] Get Ports
def get_participating_contexts(self)
[CORBA interface] Get participating ExecutionContextList.
def detach_context(self, ec_id)
[CORBA interface] Attach ExecutionContext.
def getExecutionContext(self, ec_id)
[local interface] Getting current execution context
def readAll(self)
Readout the value from All InPorts.
def onAborting(self, ec_id)
def addOutPort(self, name, outport)
def removeSdoServiceProvider(self, id)
[local interface] Remove a SDO service providerbool removeSdoServiceProvider(const char* id); ...
def get_configuration(self)
[SDO interface] Getting Configuration object
def onActivated(self, ec_id)
def preOnStateUpdate(self, ec_id)
ExecutionContextActionListener class.
def get_service_profile(self, _id)
[SDO interface] Getting Organizations
def preOnShutdown(self, ec_id)
def addInPort(self, name, inport)
def postOnInitialize(self, ec_id, ret)
def setExecutionRate(self, ec_id, rate)
[local interface] Setting current context' execution rate
def get_organizations(self)
[SDO interface] Getting Organizations
def onRateChanged(self, ec_id)
def onShutdown(self, ec_id)
def finalizePorts(self)
Unregister the All Portse.
def onRemovePort(self, pprof)
def onDeactivated(self, ec_id)
def postOnAborting(self, ec_id, ret)
def exit(self)
Stop the RTC's execution context(s) and finalize it along with its contents.
def removePreComponentActionListener(self, listener_type, listener)
Removing PreComponentAction type listener.
def registerInPort(self, name, inport)
PortConnectListeners class.
def preOnRateChanged(self, ec_id)
def on_aborting(self, ec_id)
[ComponentAction CORBA interface] Transition Error State
def getTypeName(self)
const char* getTypeName()
ComponentActionListeners class.
def removeConfigurationSetNameListener(self, type, listener)
Removing ConfigurationSetNameListener.
def addPreComponentActionListener(self, listener_type, memfunc, autoclean=True)
Adding PreComponentAction type listener.
def addPostComponentActionListener(self, listener_type, memfunc, autoclean=True)
Adding PostComponentAction type listener.
def removeInPort(self, port)
[local interface] Unregister InPort
def find(seq, f)
Return the index of CORBA sequence element that functor matches.
def getProperties(self)
[local interface] Get RTC property
def get_owned_contexts(self)
[CORBA interface] Get ExecutionContextList.
ConfigurationSetListener class.
def registerPort(self, port)
[local interface] Register Port
def postOnError(self, ec_id, ret)
def updateParameters(self, config_set)
void updateParameters(const char* config_set);
def on_execute(self, ec_id)
[DataFlowComponentAction CORBA interface] Primary Periodic Operation of RTC
def on_state_update(self, ec_id)
[DataFlowComponentAction CORBA interface] Secondary Periodic Operation of RTC
def on_rate_changed(self, ec_id)
[DataFlowComponentAction CORBA interface] Notify rate chenged
def postOnActivated(self, ec_id, ret)
def get_component_profile(self)
[RTObject CORBA interface] Get RTC's profile
def postOnReset(self, ec_id, ret)
PortConnectListener class.
def getExecutionRate(self, ec_id)
[local interface] Getting current context' execution rate
def postOnRateChanged(self, ec_id, ret)
def get_context_handle(self, cxt)
def removeOutPort(self, port)
[local interface] Unregister OutPort
def on_initialize(self)
[ComponentAction CORBA interface] Initialize RTC
def copyFromProperties(nv, prop)
Copy to NVList from Proeprties.
ConfigurationSetNameListener class.
def getVersion(self)
const char* getVersion()
def postOnFinalize(self, ec_id, ret)
def postOnStateUpdate(self, ec_id, ret)
def addPortConnectListener(self, listener_type, memfunc, autoclean=True)
Adding PortConnect type listener.
def attach_context(self, exec_context)
[CORBA interface] Attach ExecutionContext.
def setObjRef(self, rtobj)
void setObjRef(const RTObject_ptr rtobj);
def get_monitoring(self)
[SDO interface] Get Monitoring object
def get_device_profile(self)
[SDO interface] Getting SDO DeviceProfile
def postOnDeactivated(self, ec_id, ret)