[openrtm-commit:00420] r481 - trunk/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 9月 21日 (水) 18:23:26 JST
Author: kurihara
Date: 2011-09-21 18:23:26 +0900 (Wed, 21 Sep 2011)
New Revision: 481
Modified:
trunk/OpenRTM-aist-Python/OpenRTM_aist/ConnectorBase.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortBase.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortPullConnector.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortPushConnector.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortPullConnector.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortPushConnector.py
Log:
Fixed a problem that does not call the InPortPushConnector.disconnect(). refs #2237
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ConnectorBase.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ConnectorBase.py 2011-09-21 09:16:22 UTC (rev 480)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ConnectorBase.py 2011-09-21 09:23:26 UTC (rev 481)
@@ -114,3 +114,123 @@
# @endif
def __del__(self):
pass
+
+
+ ##
+ # @if jp
+ # @brief Profile 取得
+ #
+ # Connector Profile を取得する
+ #
+ # @else
+ # @brief Getting Profile
+ #
+ # This operation returns Connector Profile
+ #
+ # @endif
+ # virtual const ConnectorInfo& profile() = 0;
+ def profile(self):
+ pass
+
+ ##
+ # @if jp
+ # @brief Connector ID 取得
+ #
+ # Connector ID を取得する
+ #
+ # @else
+ # @brief Getting Connector ID
+ #
+ # This operation returns Connector ID
+ #
+ # @endif
+ # virtual const char* id() = 0;
+ def id(self):
+ pass
+
+
+ ##
+ # @if jp
+ # @brief Connector 名取得
+ #
+ # Connector 名を取得する
+ #
+ # @else
+ # @brief Getting Connector name
+ #
+ # This operation returns Connector name
+ #
+ # @endif
+ # virtual const char* name() = 0;
+ def name(self):
+ pass
+
+
+ ##
+ # @if jp
+ # @brief 接続解除関数
+ #
+ # Connector が保持している接続を解除する
+ #
+ # @else
+ # @brief Disconnect connection
+ #
+ # This operation disconnect this connection
+ #
+ # @endif
+ # virtual ReturnCode disconnect() = 0;
+ def disconnect(self):
+ pass
+
+
+ ##
+ # @if jp
+ # @brief Buffer を取得する
+ #
+ # Connector が保持している Buffer を返す
+ #
+ # @else
+ # @brief Getting Buffer
+ #
+ # This operation returns this connector's buffer
+ #
+ # @endif
+ # virtual CdrBufferBase* getBuffer() = 0;
+ def getBuffer(self):
+ pass
+
+
+ ##
+ # @if jp
+ # @brief アクティブ化
+ #
+ # このコネクタをアクティブ化する
+ #
+ # @else
+ #
+ # @brief Connector activation
+ #
+ # This operation activates this connector
+ #
+ # @endif
+ # virtual void activate() = 0;
+ def activate(self):
+ pass
+
+
+ ##
+ # @if jp
+ # @brief 非アクティブ化
+ #
+ # このコネクタを非アクティブ化する
+ #
+ # @else
+ #
+ # @brief Connector deactivation
+ #
+ # This operation deactivates this connector
+ #
+ # @endif
+ # virtual void deactivate() = 0;
+ def deactivate(self):
+ pass
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortBase.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortBase.py 2011-09-21 09:16:22 UTC (rev 480)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortBase.py 2011-09-21 09:23:26 UTC (rev 481)
@@ -986,6 +986,7 @@
if id == self._connectors[idx].id():
# Connector's dtor must call disconnect()
self._connectors[idx].deactivate()
+ self._connectors[idx].disconnect()
del self._connectors[idx]
self._rtcout.RTC_TRACE("delete connector: %s", id)
return
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortPullConnector.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortPullConnector.py 2011-09-21 09:16:22 UTC (rev 480)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortPullConnector.py 2011-09-21 09:23:26 UTC (rev 481)
@@ -157,8 +157,6 @@
# @endif
#
def __del__(self):
- self.onDisconnect()
- self.disconnect()
return
@@ -230,6 +228,7 @@
# virtual ReturnCode disconnect();
def disconnect(self):
self._rtcout.RTC_TRACE("disconnect()")
+ self.onDisconnect()
# delete consumer
if self._consumer:
OpenRTM_aist.OutPortConsumerFactory.instance().deleteObject(self._consumer)
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortPushConnector.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortPushConnector.py 2011-09-21 09:16:22 UTC (rev 480)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortPushConnector.py 2011-09-21 09:23:26 UTC (rev 481)
@@ -160,8 +160,6 @@
# @endif
#
def __del__(self):
- self.onDisconnect()
- self.disconnect()
return
@@ -255,6 +253,7 @@
# virtual ReturnCode disconnect();
def disconnect(self):
self._rtcout.RTC_TRACE("disconnect()")
+ self.onDisconnect()
# delete consumer
if self._provider:
cfactory = OpenRTM_aist.InPortProviderFactory.instance()
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py 2011-09-21 09:16:22 UTC (rev 480)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py 2011-09-21 09:23:26 UTC (rev 481)
@@ -1028,6 +1028,7 @@
if id == self._connectors[idx].id():
# Connector's dtor must call disconnect()
self._connectors[idx].deactivate()
+ self._connectors[idx].disconnect()
del self._connectors[idx]
self._rtcout.RTC_TRACE("delete connector: %s", id)
return
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortPullConnector.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortPullConnector.py 2011-09-21 09:16:22 UTC (rev 480)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortPullConnector.py 2011-09-21 09:23:26 UTC (rev 481)
@@ -159,8 +159,6 @@
# @endif
#
def __del__(self):
- self.onDisConnect()
- self.disconnect()
return
@@ -212,6 +210,7 @@
# virtual ReturnCode disconnect();
def disconnect(self):
self._rtcout.RTC_TRACE("disconnect()")
+ self.onDisConnect()
# delete provider
if self._provider:
OpenRTM_aist.OutPortProviderFactory.instance().deleteObject(self._provider)
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortPushConnector.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortPushConnector.py 2011-09-21 09:16:22 UTC (rev 480)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortPushConnector.py 2011-09-21 09:23:26 UTC (rev 481)
@@ -188,8 +188,6 @@
# @endif
#
def __del__(self):
- self.onDisconnect()
- self.disconnect()
return
##
@@ -265,6 +263,7 @@
# virtual ReturnCode disconnect();
def disconnect(self):
self._rtcout.RTC_TRACE("disconnect()")
+ self.onDisconnect()
# delete publisher
if self._publisher:
self._rtcout.RTC_DEBUG("delete publisher")
openrtm-commit メーリングリストの案内