23 from omniORB
import any
24 from omniORB
import CORBA
34 "implementation_id",
"",
91 def __init__(self, manager=None, orb=None, poa=None):
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")))
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"),
922 self.
_rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
950 self.
_rtcout.RTC_TRACE(
"get_ports()")
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",
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)
1311 self.
_rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
1343 self.
_rtcout.RTC_TRACE(
"on_deactivated(%d)", ec_id)
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())
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)
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()")
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()")
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()")
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()")
2334 self.
_rtcout.RTC_TRACE(
"setInstanceName(%s)", instance_name)
2335 self.
_properties.setProperty(
"instance_name",instance_name)
2355 self.
_rtcout.RTC_TRACE(
"getTypeName()")
2375 self.
_rtcout.RTC_TRACE(
"getDescription()")
2395 self.
_rtcout.RTC_TRACE(
"getVersion()")
2415 self.
_rtcout.RTC_TRACE(
"getVendor()")
2435 self.
_rtcout.RTC_TRACE(
"getCategory()")
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()")
2560 self.
_rtcout.RTC_TRACE(
"getProperties()")
2588 def_val, trans=None):
2589 self.
_rtcout.RTC_TRACE(
"bindParameter()")
2591 trans_ = OpenRTM_aist.stringTo
2614 self.
_rtcout.RTC_TRACE(
"updateParameters(%s)", config_set)
2654 self.
_rtcout.RTC_TRACE(
"registerPort()")
2656 self.
_rtcout.RTC_ERROR(
"addPort(PortBase&) failed.")
2668 self.
_rtcout.RTC_TRACE(
"addPort()")
2670 self.
_rtcout.RTC_TRACE(
"addPort(CorbaPort)")
2671 propkey =
"port.corbaport." 2679 self.
_rtcout.RTC_TRACE(
"addPort(PortBase)")
2684 elif isinstance(port, RTC._objref_PortService):
2685 self.
_rtcout.RTC_TRACE(
"addPort(PortService)")
2715 self.
_rtcout.RTC_TRACE(
"registerInPort(%s)", name)
2717 self.
_rtcout.RTC_ERROR(
"addInPort(%s) failed.", name)
2722 self.
_rtcout.RTC_TRACE(
"addInPort(%s)", name)
2724 propkey =
"port.inport." + name
2725 prop_ = copy.copy(self.
_properties.getNode(propkey))
2726 prop_.mergeProperties(self.
_properties.getNode(
"port.inport.dataport"))
2731 self.
_rtcout.RTC_ERROR(
"addInPort() failed.")
2758 self.
_rtcout.RTC_TRACE(
"registerOutPort(%s)", name)
2760 self.
_rtcout.RTC_ERROR(
"addOutPort(%s) failed.", name)
2766 self.
_rtcout.RTC_TRACE(
"addOutPort(%s)", name)
2768 propkey =
"port.outport." + name
2769 prop_ = copy.copy(self.
_properties.getNode(propkey))
2770 prop_.mergeProperties(self.
_properties.getNode(
"port.outport.dataport"))
2775 self.
_rtcout.RTC_ERROR(
"addOutPort() failed.")
2806 self.
_rtcout.RTC_TRACE(
"removeInPort()")
2815 self.
_rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
2845 self.
_rtcout.RTC_TRACE(
"removeOutPort()")
2854 self.
_rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
2882 self.
_rtcout.RTC_TRACE(
"deletePort()")
2884 self.
_rtcout.RTC_ERROR(
"removePort() failed.")
2889 self.
_rtcout.RTC_TRACE(
"removePort()")
2909 self.
_rtcout.RTC_TRACE(
"deletePortByName(%s)", port_name)
3023 if CORBA.is_nil(ec):
3026 return ec.get_rate()
3085 if CORBA.is_nil(ec):
3086 return RTC.RTC_ERROR
3145 global ECOTHER_OFFSET
3146 if ec_id < ECOTHER_OFFSET:
3192 if CORBA.is_nil(ec):
3193 return RTC.RTC_ERROR
3194 return ec.deactivate_component(self.
getObjRef())
3236 if CORBA.is_nil(ec):
3237 return RTC.RTC_ERROR
3238 return ec.activate_component(self.
getObjRef())
3278 if CORBA.is_nil(ec):
3279 return RTC.RTC_ERROR
3280 return ec.reset_component(self.
getObjRef())
3354 self.
_rtcout.RTC_TRACE(
"readAll()")
3357 if not inport.read():
3358 self.
_rtcout.RTC_DEBUG(
"The error occurred in readAll().")
3388 self.
_rtcout.RTC_TRACE(
"writeAll()")
3391 if not outport.write():
3392 self.
_rtcout.RTC_DEBUG(
"The error occurred in writeAll().")
3494 self.
_rtcout.RTC_TRACE(
"finalizePorts()")
3502 self.
_rtcout.RTC_TRACE(
"finalizeContexts()")
3504 for i
in range(len_):
3505 idx = (len_ - 1) - i
3508 self.
_poa.deactivate_object(self.
_poa.servant_to_id(self.
_eclist[idx]))
3510 self.
_rtcout.RTC_TRACE(OpenRTM_aist.Logger.print_exception())
3596 memfunc, autoclean = True):
3601 def __call__(self, ec_id):
3605 listener = Noname(memfunc)
3606 self.
_actionListeners.preaction_[listener_type].addListener(listener, autoclean)
3716 memfunc, autoclean = True):
3721 def __call__(self, ec_id, ret):
3725 listener = Noname(memfunc)
3726 self.
_actionListeners.postaction_[listener_type].addListener(listener, autoclean)
3816 memfunc, autoclean = True):
3822 def __call__(self, pprofile):
3826 listener = Noname(memfunc)
3827 self.
_actionListeners.portaction_[listener_type].addListener(listener, autoclean)
3916 memfunc, autoclean = True):
3922 def __call__(self, ec_id):
3926 listener = Noname(memfunc)
3927 self.
_actionListeners.ecaction_[listener_type].addListener(listener, autoclean)
4019 memfunc, autoclean = True):
4025 def __call__(self, portname, cprofile):
4029 listener = Noname(memfunc)
4126 memfunc, autoclean = True):
4132 def __call__(self, portname, cprofile, ret):
4133 self.
_memfunc(portname, cprofile, ret)
4136 listener = Noname(memfunc)
4207 memfunc, autoclean = True):
4213 def __call__(self, config_set_name, config_param_name):
4214 self.
_memfunc(config_set_name, config_param_name)
4217 listener = Noname(memfunc)
4290 memfunc, autoclean = True):
4296 def __call__(self, config_set):
4300 listener = Noname(memfunc)
4378 def __call__(self, config_set_name):
4382 listener = Noname(memfunc)
4435 self.
_rtcout.RTC_TRACE(
"shutdown()")
4440 self.
_poa.deactivate_object(self.
_poa.servant_to_id(self))
4442 self.
_rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
4445 self.
_rtcout.RTC_DEBUG(
"Cleanup on Manager")
4446 self.
_manager.notifyFinalized(self)
4452 self.
_actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_INITIALIZE].notify(ec_id)
4457 self.
_actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_FINALIZE].notify(ec_id)
4462 self.
_actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_STARTUP].notify(ec_id)
4467 self.
_actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_SHUTDOWN].notify(ec_id)
4472 self.
_actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_ACTIVATED].notify(ec_id)
4477 self.
_actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_DEACTIVATED].notify(ec_id)
4482 self.
_actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_ABORTING].notify(ec_id)
4487 self.
_actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_ERROR].notify(ec_id)
4492 self.
_actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_RESET].notify(ec_id)
4497 self.
_actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_EXECUTE].notify(ec_id)
4502 self.
_actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_STATE_UPDATE].notify(ec_id)
4508 self.
_actionListeners.preaction_[OpenRTM_aist.PreComponentActionListenerType.PRE_ON_RATE_CHANGED].notify(ec_id)
4514 self.
_actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_INITIALIZE].notify(ec_id, ret)
4520 self.
_actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_FINALIZE].notify(ec_id, ret)
4526 self.
_actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_STARTUP].notify(ec_id, ret)
4532 self.
_actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_SHUTDOWN].notify(ec_id, ret)
4538 self.
_actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_ACTIVATED].notify(ec_id, ret)
4544 self.
_actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_DEACTIVATED].notify(ec_id, ret)
4550 self.
_actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_ABORTING].notify(ec_id, ret)
4556 self.
_actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_ERROR].notify(ec_id, ret)
4562 self.
_actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_RESET].notify(ec_id, ret)
4568 self.
_actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_EXECUTE].notify(ec_id, ret)
4574 self.
_actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_STATE_UPDATE].notify(ec_id, ret)
4580 self.
_actionListeners.postaction_[OpenRTM_aist.PostComponentActionListenerType.POST_ON_RATE_CHANGED].notify(ec_id, ret)
4586 self.
_actionListeners.portaction_[OpenRTM_aist.PortActionListenerType.ADD_PORT].notify(pprof)
4592 self.
_actionListeners.portaction_[OpenRTM_aist.PortActionListenerType.REMOVE_PORT].notify(pprof)
4598 self.
_actionListeners.ecaction_[OpenRTM_aist.ExecutionContextActionListenerType.EC_ATTACHED].notify(ec_id)
4604 self.
_actionListeners.ecaction_[OpenRTM_aist.ExecutionContextActionListenerType.EC_DETACHED].notify(ec_id)
4621 return self.
_id == prof.id
4640 return self.
_name == nv.name
4656 if not CORBA.is_nil(ecs):
4657 ec = ecs._narrow(RTC.ExecutionContext)
4658 return self.
_ec._is_equivalent(ec)
4660 print OpenRTM_aist.Logger.print_exception()
4678 if not CORBA.is_nil(ecs):
4695 if not CORBA.is_nil(ec)
and not ec._non_existent():
4696 ec.deactivate_component(self.
_comp)
4699 print OpenRTM_aist.Logger.print_exception()
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 __init__(self, _name)
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)