本文整理汇总了Python中OpenRTM_aist.includes方法的典型用法代码示例。如果您正苦于以下问题:Python OpenRTM_aist.includes方法的具体用法?Python OpenRTM_aist.includes怎么用?Python OpenRTM_aist.includes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenRTM_aist
的用法示例。
在下文中一共展示了OpenRTM_aist.includes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createProvider
# 需要导入模块: import OpenRTM_aist [as 别名]
# 或者: from OpenRTM_aist import includes [as 别名]
def createProvider(self, cprof, prop):
if not prop.getProperty("interface_type") and \
not OpenRTM_aist.includes(self._providerTypes, prop.getProperty("interface_type")):
self._rtcout.RTC_ERROR("no provider found")
self._rtcout.RTC_DEBUG("interface_type: %s", prop.getProperty("interface_type"))
self._rtcout.RTC_DEBUG("interface_types: %s",
OpenRTM_aist.flatten(self._providerTypes))
return 0
self._rtcout.RTC_DEBUG("interface_type: %s", prop.getProperty("interface_type"))
provider = OpenRTM_aist.InPortProviderFactory.instance().createObject(prop.getProperty("interface_type"))
if provider != 0:
self._rtcout.RTC_DEBUG("provider created")
provider.init(prop.getNode("provider"))
if not provider.publishInterface(cprof.properties):
self._rtcout.RTC_ERROR("publishing interface information error")
OpenRTM_aist.InPortProviderFactory.instance().deleteObject(provider)
return 0
return provider
self._rtcout.RTC_ERROR("provider creation failed")
return 0
示例2: createConsumer
# 需要导入模块: import OpenRTM_aist [as 别名]
# 或者: from OpenRTM_aist import includes [as 别名]
def createConsumer(self, cprof, prop):
if not prop.getProperty("interface_type") and \
not OpenRTM_aist.includes(self._consumerTypes, prop.getProperty("interface_type")):
self._rtcout.RTC_ERROR("no consumer found")
self._rtcout.RTC_DEBUG("interface_type: %s", prop.getProperty("interface_type"))
self._rtcout.RTC_DEBUG("interface_types: %s",
OpenRTM_aist.flatten(self._consumerTypes))
return 0
self._rtcout.RTC_DEBUG("interface_type: %s", prop.getProperty("interface_type"))
consumer = OpenRTM_aist.OutPortConsumerFactory.instance().createObject(prop.getProperty("interface_type"))
if consumer != 0:
self._rtcout.RTC_DEBUG("consumer created")
consumer.init(prop.getNode("consumer"))
if not consumer.subscribeInterface(cprof.properties):
self._rtcout.RTC_ERROR("interface subscription failed.")
OpenRTM_aist.OutPortConsumerFactory.instance().deleteObject(consumer)
return 0
return consumer
self._rtcout.RTC_ERROR("consumer creation failed")
return 0