[openrtm-commit:03054] r912 - trunk/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2018年 1月 6日 (土) 12:32:05 JST
Author: miyamoto
Date: 2018-01-06 12:32:05 +0900 (Sat, 06 Jan 2018)
New Revision: 912
Modified:
trunk/OpenRTM-aist-Python/OpenRTM_aist/ConfigAdmin.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaConsumer.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaNaming.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/ECFactory.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextBase.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortBase.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortPushConnector.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortPushConnector.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/PortBase.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeValue.py
Log:
[compat,bugfix,->RELENG_1_2] fixed bug.
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ConfigAdmin.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ConfigAdmin.py 2018-01-04 05:56:36 UTC (rev 911)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ConfigAdmin.py 2018-01-06 03:32:05 UTC (rev 912)
@@ -633,7 +633,7 @@
# update(const char* config_set)
if config_set and config_param is None:
- if self._configsets.hasKey(config_set) is None:
+ if self._configsets.hasKey(config_set) == False:
return
self._changedParam = []
prop = self._configsets.getNode(config_set)
@@ -803,7 +803,7 @@
# @endif
# bool haveConfig(const char* config_id);
def haveConfig(self, config_id):
- if self._configsets.hasKey(config_id) is None:
+ if self._configsets.hasKey(config_id) == False:
return False
else:
return True
@@ -1142,7 +1142,7 @@
# @endif
# bool activateConfigurationSet(const char* config_id);
def activateConfigurationSet(self, config_id):
- if config_id is None:
+ if config_id == "":
return False
# '_<conf_name>' is special configuration set name
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaConsumer.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaConsumer.py 2018-01-04 05:56:36 UTC (rev 911)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaConsumer.py 2018-01-06 03:32:05 UTC (rev 912)
@@ -60,7 +60,7 @@
if consumer:
self._objref = consumer._objref
else:
- self._objref = None
+ self._objref = CORBA.Object._nil
##
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaNaming.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaNaming.py 2018-01-04 05:56:36 UTC (rev 911)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaNaming.py 2018-01-06 03:32:05 UTC (rev 912)
@@ -864,7 +864,7 @@
string_name = sname
name_comps = []
- nc_length = 0
+
nc_length = self.split(string_name, "/", name_comps)
#if not (nc_length > 0):
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ECFactory.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ECFactory.py 2018-01-04 05:56:36 UTC (rev 911)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ECFactory.py 2018-01-06 03:32:05 UTC (rev 912)
@@ -110,7 +110,7 @@
# @else
#
# @endif
- def destroy(self, comp):
+ def destroy(self, ec):
pass
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextBase.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextBase.py 2018-01-04 05:56:36 UTC (rev 911)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextBase.py 2018-01-06 03:32:05 UTC (rev 912)
@@ -793,7 +793,7 @@
self._rtcout.RTC_TRACE("deactivateComponent()")
ret_ = self.onDeactivating(comp) # Template
if ret_ != RTC.RTC_OK:
- self._rtcout.RTC_ERROR("onDeactivatingComponent() failed.")
+ self._rtcout.RTC_ERROR("onDeactivating() failed.")
return ret_
# Deactivate all the RTCs
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortBase.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortBase.py 2018-01-04 05:56:36 UTC (rev 911)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortBase.py 2018-01-06 03:32:05 UTC (rev 912)
@@ -1159,7 +1159,7 @@
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
+ return None
self._rtcout.RTC_DEBUG("interface_type: %s", prop.getProperty("interface_type"))
@@ -1173,11 +1173,11 @@
if not provider.publishInterface(cprof.properties):
self._rtcout.RTC_ERROR("publishing interface information error")
OpenRTM_aist.InPortProviderFactory.instance().deleteObject(provider)
- return 0
+ return None
return provider
self._rtcout.RTC_ERROR("provider creation failed")
- return 0
+ return None
##
@@ -1200,7 +1200,7 @@
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
+ return None
self._rtcout.RTC_DEBUG("interface_type: %s", prop.getProperty("interface_type"))
consumer = OpenRTM_aist.OutPortConsumerFactory.instance().createObject(prop.getProperty("interface_type"))
@@ -1212,11 +1212,11 @@
if not consumer.subscribeInterface(cprof.properties):
self._rtcout.RTC_ERROR("interface subscription failed.")
OpenRTM_aist.OutPortConsumerFactory.instance().deleteObject(consumer)
- return 0
+ return None
return consumer
self._rtcout.RTC_ERROR("consumer creation failed")
- return 0
+ return None
##
@@ -1262,7 +1262,7 @@
else:
self._rtcout.RTC_ERROR("provider or consumer is not passed. returned 0;")
- return 0
+ return None
#if connector is None:
@@ -1281,6 +1281,6 @@
except:
self._rtcout.RTC_ERROR("InPortPushConnector creation failed")
self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- return 0
+ return None
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortPushConnector.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortPushConnector.py 2018-01-04 05:56:36 UTC (rev 911)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortPushConnector.py 2018-01-06 03:32:05 UTC (rev 912)
@@ -130,7 +130,7 @@
self._deleteBuffer = False
- if self._buffer == 0:
+ if self._buffer is None:
self._buffer = self.createBuffer(info)
@@ -263,7 +263,7 @@
self._provider.exit()
- self._provider = 0
+ self._provider = None
# delete buffer
if self._buffer and self._deleteBuffer == True:
@@ -270,7 +270,7 @@
bfactory = OpenRTM_aist.CdrBufferFactory.instance()
bfactory.deleteObject(self._buffer)
- self._buffer = 0
+ self._buffer = None
return self.PORT_OK
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py 2018-01-04 05:56:36 UTC (rev 911)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py 2018-01-06 03:32:05 UTC (rev 912)
@@ -2729,7 +2729,7 @@
if n == '{' or n == '(':
n = it.next()
env = ""
- for i in range(len_):
+ while True:
if n == '}' or n == ')':
break
env += n
@@ -2783,7 +2783,7 @@
return OpenRTM_aist.LogStream().getLogger(name)
if self._rtcout is None:
- self._rtcout = OpenRTM_aist.LogStream(name)
+ self._rtcout = OpenRTM_aist.LogStream()
self._rtcout.setLogLevel(self._config.getProperty("logger.log_level"))
return self._rtcout.getLogger(name)
else:
@@ -3334,8 +3334,8 @@
elif name:
self._name = name
- def __call__(self, factory):
- return self._name == factory.getInstanceName()
+ def __call__(self, comp):
+ return self._name == comp.getInstanceName()
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py 2018-01-04 05:56:36 UTC (rev 911)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py 2018-01-06 03:32:05 UTC (rev 912)
@@ -101,7 +101,7 @@
#
# virtual bool isAlive() = 0;
def isAlive(self):
- pass
+ return True
##
# @if jp
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py 2018-01-04 05:56:36 UTC (rev 911)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py 2018-01-06 03:32:05 UTC (rev 912)
@@ -970,7 +970,7 @@
if not provider:
return RTC.BAD_PARAMETER
- # create InPortPushConnector
+ # create OutPortPullConnector
connector = self.createConnector(cprof, prop, provider_ = provider)
if not connector:
return RTC.RTC_ERROR
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortPushConnector.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortPushConnector.py 2018-01-04 05:56:36 UTC (rev 911)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortPushConnector.py 2018-01-06 03:32:05 UTC (rev 912)
@@ -125,7 +125,7 @@
# InPortConsumer* consumer,
# ConnectorListeners& listeners,
# CdrBufferBase* buffer = 0);
- def __init__(self, info, consumer, listeners, buffer = 0):
+ def __init__(self, info, consumer, listeners, buffer = None):
OpenRTM_aist.OutPortConnector.__init__(self, info)
self._buffer = buffer
@@ -292,7 +292,7 @@
pfactory = OpenRTM_aist.PublisherFactory.instance()
pfactory.deleteObject(self._publisher)
- self._publisher = 0
+ self._publisher = None
# delete consumer
if self._consumer:
@@ -300,7 +300,7 @@
cfactory = OpenRTM_aist.InPortConsumerFactory.instance()
cfactory.deleteObject(self._consumer)
- self._consumer = 0
+ self._consumer = None
# delete buffer
if self._buffer:
@@ -308,7 +308,7 @@
bfactory = OpenRTM_aist.CdrBufferFactory.instance()
bfactory.deleteObject(self._buffer)
- self._buffer = 0
+ self._buffer = None
self._rtcout.RTC_TRACE("disconnect() done")
return self.PORT_OK
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/PortBase.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/PortBase.py 2018-01-04 05:56:36 UTC (rev 911)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/PortBase.py 2018-01-06 03:32:05 UTC (rev 912)
@@ -168,6 +168,7 @@
self._onConnectionLost = None
self._connectionLimit = -1
self._portconnListeners = None
+ self._properties = OpenRTM_aist.Properties()
return
@@ -835,7 +836,7 @@
if index < 0:
self._rtcout.RTC_ERROR("Invalid connector id: %s", connector_id)
return RTC.BAD_PARAMETER
-
+ prof = None
guard = OpenRTM_aist.ScopedLock(self._profile_mutex)
if index < len(self._profile.connector_profiles):
prof = self._profile.connector_profiles[index]
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py 2018-01-04 05:56:36 UTC (rev 911)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py 2018-01-06 03:32:05 UTC (rev 912)
@@ -171,7 +171,7 @@
#
# @endif
def escape(_str):
- return for_each(_str, escape_functor())._str
+ return for_each(_str[0], escape_functor())._str
##
@@ -199,7 +199,7 @@
# "\"" -> " <br>
# @endif
def unescape(_str):
- return for_each(_str, unescape_functor())._str
+ return for_each(_str[0], unescape_functor())._str
##
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeValue.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeValue.py 2018-01-04 05:56:36 UTC (rev 911)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeValue.py 2018-01-06 03:32:05 UTC (rev 912)
@@ -133,7 +133,7 @@
res.tv_sec = -(tm.tv_sec - self.tv_sec - 1)
res.tv_usec = -(tm.tv_usec + TIMEVALUE_ONE_SECOND_IN_USECS) + self.tv_usec
- self.normalize()
+ res.normalize()
return res
@@ -161,7 +161,7 @@
res.tv_sec += 1
res.tv_usec -= TIMEVALUE_ONE_SECOND_IN_USECS
- self.normalize()
+ res.normalize()
return res
More information about the openrtm-commit
mailing list