[openrtm-commit:01707] r651 - trunk/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2016年 2月 1日 (月) 20:14:43 JST
Author: miyamoto
Date: 2016-02-01 20:14:43 +0900 (Mon, 01 Feb 2016)
New Revision: 651
Modified:
trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaConsumer.py
Log:
[compat,->RELENG_1_2] Direct connect functionality with service ports has been implemented. refs #3408
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaConsumer.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaConsumer.py 2016-02-01 11:11:54 UTC (rev 650)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaConsumer.py 2016-02-01 11:14:43 UTC (rev 651)
@@ -19,6 +19,7 @@
from omniORB import CORBA
+import OpenRTM_aist
##
# @if jp
@@ -218,7 +219,9 @@
CorbaConsumerBase.__init__(self)
self._var = None
+ self._sev = None
+
##
# @if jp
#
@@ -278,6 +281,8 @@
self._var = obj._narrow(self._interfaceType)
else:
self._var = self._objref
+
+
if not CORBA.is_nil(self._var):
return True
@@ -312,6 +317,17 @@
#
# @endif
def _ptr(self):
+ #print dir(self._var)
+ if self._sev is not None:
+ return self._sev
+ try:
+ mgr = OpenRTM_aist.Manager.instance()
+ self._sev = mgr._poa.reference_to_servant(self._var)
+ if self._sev is not None:
+ return self._sev
+ except:
+ return self._var
+
return self._var
@@ -331,3 +347,4 @@
def releaseObject(self):
CorbaConsumerBase.releaseObject(self)
self._var = CORBA.Object._nil
+ self._sev = None
More information about the openrtm-commit
mailing list