[openrtm-commit:02674] r859 - trunk/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 7月 13日 (木) 10:30:17 JST
Author: miyamoto
Date: 2017-07-13 10:30:16 +0900 (Thu, 13 Jul 2017)
New Revision: 859
Modified:
trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortBase.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/PortBase.py
Log:
[compat,->RELENG_1_2] refs #4142
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortBase.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortBase.py 2017-07-10 11:22:28 UTC (rev 858)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortBase.py 2017-07-13 01:30:16 UTC (rev 859)
@@ -488,7 +488,12 @@
#
def connect(self, connector_profile):
self._rtcout.RTC_TRACE("InPortBase.connect()")
-
+
+
+
+
+
+
if OpenRTM_aist.NVUtil.find_index(connector_profile.properties,
"dataport.serializer.cdr.endian") is -1:
self._rtcout.RTC_TRACE("ConnectorProfile dataport.serializer.cdr.endian set.")
@@ -496,9 +501,6 @@
return OpenRTM_aist.PortBase.connect(self, connector_profile)
-
-
-
##
# @if jp
#
@@ -523,7 +525,15 @@
prop = OpenRTM_aist.Properties()
OpenRTM_aist.NVUtil.copyToProperties(prop, connector_profile.properties)
- _str = self._properties.getProperty("dataport.fan_in")
+ node = prop.getNode("dataport.inport")
+ portprop = copy.deepcopy(self._properties)
+ portprop.mergeProperties(node)
+ node.mergeProperties(portprop)
+ OpenRTM_aist.NVUtil.copyFromProperties(connector_profile.properties, prop)
+
+
+ #_str = self._properties.getProperty("fan_in")
+ _str = node.getProperty("fan_in")
_type = [int(100)]
OpenRTM_aist.stringTo(_type, _str)
@@ -539,8 +549,8 @@
return (RTC.PRECONDITION_NOT_MET, connector_profile)
return OpenRTM_aist.PortBase.notify_connect(self, connector_profile)
+
-
##
# @if jp
#
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py 2017-07-10 11:22:28 UTC (rev 858)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py 2017-07-13 01:30:16 UTC (rev 859)
@@ -273,6 +273,7 @@
self._rtcout.RTC_DEBUG("available subscription_type: %s", pubs)
self.addProperty("dataport.subscription_type", pubs)
+ self.addProperty("dataport.io_mode", pubs)
self._properties = OpenRTM_aist.Properties()
self._name = name
@@ -397,6 +398,10 @@
#
def connect(self, connector_profile):
self._rtcout.RTC_TRACE("OutPortBase.connect()")
+
+
+
+
if OpenRTM_aist.NVUtil.find_index(connector_profile.properties,
"dataport.serializer.cdr.endian") is -1:
@@ -404,8 +409,9 @@
connector_profile.properties.append(OpenRTM_aist.NVUtil.newNV("dataport.serializer.cdr.endian","little,big"))
return OpenRTM_aist.PortBase.connect(self, connector_profile)
-
+
+
##
# @if jp
#
@@ -429,7 +435,15 @@
prop = OpenRTM_aist.Properties()
OpenRTM_aist.NVUtil.copyToProperties(prop, connector_profile.properties)
- _str = self._properties.getProperty("dataport.fan_out")
+
+ node = prop.getNode("dataport.outport")
+ portprop = copy.deepcopy(self._properties)
+ portprop.mergeProperties(node)
+ node.mergeProperties(portprop)
+ OpenRTM_aist.NVUtil.copyFromProperties(connector_profile.properties, prop)
+
+
+ _str = node.getProperty("fan_out")
_type = [int(100)]
OpenRTM_aist.stringTo(_type, _str)
@@ -447,7 +461,6 @@
return OpenRTM_aist.PortBase.notify_connect(self, connector_profile)
-
##
# @if jp
# @brief ¥×¥í¥Ñ¥Æ¥£¤ò¼èÆÀ¤¹¤ë
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/PortBase.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/PortBase.py 2017-07-10 11:22:28 UTC (rev 858)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/PortBase.py 2017-07-13 01:30:16 UTC (rev 859)
@@ -19,6 +19,7 @@
import copy
import OpenRTM_aist
+import OpenRTM_aist.CORBA_RTCUtil
import RTC, RTC__POA
@@ -545,7 +546,7 @@
if self.isEmptyId(connector_profile):
guard = OpenRTM_aist.ScopedLock(self._profile_mutex)
self.setUUID(connector_profile)
- assert(not self.isExistingConnId(connector_profile.connector_id))
+ #assert(not self.isExistingConnId(connector_profile.connector_id))
del guard
else:
guard = OpenRTM_aist.ScopedLock(self._profile_mutex)
@@ -554,6 +555,7 @@
return (RTC.PRECONDITION_NOT_MET,connector_profile)
del guard
+
try:
retval,connector_profile = connector_profile.ports[0].notify_connect(connector_profile)
if retval != RTC.RTC_OK:
@@ -688,11 +690,10 @@
def notify_connect(self, connector_profile):
self._rtcout.RTC_TRACE("notify_connect()")
-
prop = OpenRTM_aist.Properties()
OpenRTM_aist.NVUtil.copyToProperties(prop, connector_profile.properties)
- default_value = OpenRTM_aist.toBool(self._properties.getProperty("dataport.allow_dup_connection"), "YES","NO",False)
+ default_value = OpenRTM_aist.toBool(self._properties.getProperty("allow_dup_connection"), "YES","NO",False)
if not OpenRTM_aist.toBool(prop.getProperty("dataport.allow_dup_connection"), "YES","NO",default_value):
for port in connector_profile.ports:
@@ -700,9 +701,8 @@
ret = OpenRTM_aist.CORBA_RTCUtil.already_connected(port, self._objref)
if ret:
return (RTC.PRECONDITION_NOT_MET, connector_profile)
+
-
-
guard_connection = OpenRTM_aist.ScopedLock(self._connection_mutex)
# publish owned interface information to the ConnectorProfile
More information about the openrtm-commit
mailing list