[openrtm-commit:01778] r676 - trunk/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2016年 2月 27日 (土) 23:00:23 JST
Author: miyamoto
Date: 2016-02-27 23:00:22 +0900 (Sat, 27 Feb 2016)
New Revision: 676
Modified:
trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingServiceNumberingPolicy.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/NodeNumberingPolicy.py
Log:
[incompat,new_func,->RELENG_1_2] add getManagerServant() and getNaming() to Manager. refs #3411
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py 2016-02-27 13:54:19 UTC (rev 675)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py 2016-02-27 14:00:22 UTC (rev 676)
@@ -2541,7 +2541,7 @@
# PortServiceList_var getPortsOnNameServers(std::string nsname,std::string kind)
def getPortsOnNameServers(self, nsname, kind):
ports = []
- ns = self._namingManager._names
+ ns = self._namingManager.getNameServices()
for n in ns:
noc = n.ns
if noc is None:
@@ -2637,7 +2637,7 @@
# @if jp
# @brief 起動時にrtc.confで指定したポートを接続する
# 例:
- # manager.components.preconnect: RTC0.port0:RTC0.port1(interface_type=corba_cdr&dataport.dataflow_type=pull&~),~
+ # manager.components.preconnect: RTC0.port0^RTC0.port1(interface_type=corba_cdr&dataport.dataflow_type=pull&~),~
# @param self
# @else
#
@@ -2798,8 +2798,45 @@
self.createComponent(comps[i])
+ ##
+ # @if jp
+ # @brief ManagerServantを取得する
+ #
+ #
+ # @param self
+ # @return ManagerServant
+ # @else
+ #
+ # @brief
+ # @param self
+ # @return
+ # @endif
+ # ManagerServant* getManagerServant()
+ def getManagerServant(self):
+ self._rtcout.RTC_TRACE("Manager.getManagerServant()")
+ return self._mgrservant
+ ##
+ # @if jp
+ # @brief NamingManagerを取得する
+ #
+ #
+ # @param self
+ # @return NamingManager
+ # @else
+ #
+ # @brief
+ # @param self
+ # @return
+ # @endif
+ # NamingManager* getNaming()
+ def getNaming(self):
+ self._rtcout.RTC_TRACE("Manager.getNaming()")
+ return self._namingManager
+
+
+
#============================================================
# コンポーネントマネージャ
#============================================================
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py 2016-02-27 13:54:19 UTC (rev 675)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py 2016-02-27 14:00:22 UTC (rev 676)
@@ -386,9 +386,6 @@
def __init__(self, orb, mgr):
self._rtcout = OpenRTM_aist.Manager.instance().getLogbuf('manager.namingonmanager')
self._cosnaming = None
- #self.isMaster = isMaster
- #self.masters = masters
- #self.slaves = slaves
self._orb = orb
self._mgr = mgr
@@ -408,8 +405,8 @@
#
# @endif
def bindObject(self, name, rtobj):
- """self._rtcout.RTC_TRACE("bindObject(name = %s, rtobj or mgr)", name)
- print isinstance(rtobj, OpenRTM.ManagerServant)
+ self._rtcout.RTC_TRACE("bindObject(name = %s, rtobj or mgr)", name)
+ """print isinstance(rtobj, OpenRTM.ManagerServant)
if isinstance(rtobj, OpenRTM.ManagerServant):
self.manager = rtobj"""
@@ -533,7 +530,7 @@
# virtual Manager_ptr getManager(string name);
def getManager(self, name):
if name == "*":
- mgr_sev = self._mgr._mgrservant
+ mgr_sev = self._mgr.getManagerServant()
if mgr_sev.is_master():
mgr = mgr_sev.getObjRef()
else:
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingServiceNumberingPolicy.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingServiceNumberingPolicy.py 2016-02-27 13:54:19 UTC (rev 675)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingServiceNumberingPolicy.py 2016-02-27 14:00:22 UTC (rev 676)
@@ -118,7 +118,7 @@
rtcs = []
rtc_name = "rtcname://*/*/"
rtc_name += name
- rtcs = self._mgr._namingManager.string_to_component(rtc_name)
+ rtcs = self._mgr.getNaming().string_to_component(rtc_name)
if len(rtcs) > 0:
return True
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/NodeNumberingPolicy.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/NodeNumberingPolicy.py 2016-02-27 13:54:19 UTC (rev 675)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/NodeNumberingPolicy.py 2016-02-27 14:00:22 UTC (rev 676)
@@ -118,7 +118,7 @@
rtc_name = "rtcloc://*/*/"
rtc_name += name
- rtcs = self._mgr._namingManager.string_to_component(rtc_name)
+ rtcs = self._mgr.getNaming().string_to_component(rtc_name)
if len(rtcs) > 0:
return True
More information about the openrtm-commit
mailing list