Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions OpenRTM_aist/DefaultConfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"logger.date_format", "%b %d %H:%M:%S",
"logger.log_level", "INFO",
"logger.stream_lock", "NO",
"logger.master_logger", "",
"logger.main_logger", "",
"module.conf_path", "",
"module.load_path", "",
"naming.enable", "YES",
Expand All @@ -73,17 +73,17 @@
"corba.endpoints", "all",
"corba.id", OpenRTM_aist.corba_name,
"corba.nameservers", "localhost",
"corba.master_manager", "localhost:2810",
"corba.main_manager", "localhost:2810",
"corba.nameservice.replace_endpoint", "NO",
"corba.update_master_manager.enable", "YES",
"corba.update_master_manager.interval", "10.0",
"corba.update_main_manager.enable", "YES",
"corba.update_main_manager.interval", "10.0",
"exec_cxt.periodic.type", "PeriodicExecutionContext",
"exec_cxt.periodic.rate", "1000",
"exec_cxt.sync_transition", "YES",
"exec_cxt.transition_timeout", "0.5",
"manager.modules.load_path", "./",
"manager.modules.abs_path_allowed", "YES",
"manager.is_master", "NO",
"manager.is_main", "NO",
"manager.corba_servant", "YES",
"manager.shutdown_on_nortcs", "YES",
"manager.shutdown_auto", "YES",
Expand Down
28 changes: 14 additions & 14 deletions OpenRTM_aist/Manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ def deleteComponent(self, instance_name=None, comp=None):

if OpenRTM_aist.toBool(self._config.getProperty("manager.shutdown_on_nortcs"),
"YES", "NO", True) and \
not OpenRTM_aist.toBool(self._config.getProperty("manager.is_master"),
not OpenRTM_aist.toBool(self._config.getProperty("manager.is_main"),
"YES", "NO", False):
comps = self.getComponents()
if not comps:
Expand Down Expand Up @@ -1423,7 +1423,7 @@ def initManager(self, argv):

if OpenRTM_aist.toBool(self._config.getProperty("manager.shutdown_auto"),
"YES", "NO", True) and \
not OpenRTM_aist.toBool(self._config.getProperty("manager.is_master"),
not OpenRTM_aist.toBool(self._config.getProperty("manager.is_main"),
"YES", "NO", False) and \
self._needsTimer:
tm = OpenRTM_aist.TimeValue(10, 0)
Expand Down Expand Up @@ -1826,14 +1826,14 @@ def createORBEndpoints(self):
"corba.endpoint: %s",
self._config.getProperty("corba.endpoint"))

# If this process has master manager,
# master manager's endpoint inserted at the top of endpoints
self._rtcout.RTC_DEBUG("manager.is_master: %s",
self._config.getProperty("manager.is_master"))
# If this process has main manager,
# main manager's endpoint inserted at the top of endpoints
self._rtcout.RTC_DEBUG("manager.is_main: %s",
self._config.getProperty("manager.is_main"))

if OpenRTM_aist.toBool(self._config.getProperty(
"manager.is_master"), "YES", "NO", False):
mm = self._config.getProperty("corba.master_manager", ":2810")
"manager.is_main"), "YES", "NO", False):
mm = self._config.getProperty("corba.main_manager", ":2810")
mmm = [s.strip() for s in mm.split(":")]
if len(mmm) == 2:
endpoints.insert(0, ":" + mmm[1])
Expand Down Expand Up @@ -2329,26 +2329,26 @@ def initManagerServant(self):
prop = self._config.getNode("manager")
names = OpenRTM_aist.split(prop.getProperty("naming_formats"), ",")

if OpenRTM_aist.toBool(prop.getProperty("is_master"),
if OpenRTM_aist.toBool(prop.getProperty("is_main"),
"YES", "NO", True):
for name in names:
mgr_name = self.formatString(name, prop)
self._namingManager.bindManagerObject(
mgr_name, self._mgrservant)

if OpenRTM_aist.toBool(self._config.getProperty("corba.update_master_manager.enable"),
if OpenRTM_aist.toBool(self._config.getProperty("corba.update_main_manager.enable"),
"YES", "NO", True) and \
not OpenRTM_aist.toBool(self._config.getProperty("manager.is_master"),
not OpenRTM_aist.toBool(self._config.getProperty("manager.is_main"),
"YES", "NO", False) and \
self._needsTimer:
tm = OpenRTM_aist.TimeValue(10, 0)
if self._config.findNode("corba.update_master_manager.interval"):
if self._config.findNode("corba.update_main_manager.interval"):
duration = float(self._config.getProperty(
"corba.update_master_manager.interval"))
"corba.update_main_manager.interval"))
if duration:
tm.set_time(duration)

self.addTask(self._mgrservant.updateMasterManager, tm)
self.addTask(self._mgrservant.updateMainManager, tm)

otherref = None

Expand Down
12 changes: 6 additions & 6 deletions OpenRTM_aist/ManagerConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def __init__(self, argv=None):

self._configFile = ""
self._argprop = OpenRTM_aist.Properties()
self._isMaster = False
self._isMain = False
self._ignoreNoConf = False
if argv:
self.init(argv)
Expand Down Expand Up @@ -167,7 +167,7 @@ def __init__(self, argv=None):
# -l module : Specify modules to be loaded at the beginning. <br>
# -o options: Other options. <br>
# -p : Specify a port number. <br>
# -d : Run Master Manager. <br>
# -d : Run Main Manager. <br>
#
# @endif

Expand Down Expand Up @@ -201,8 +201,8 @@ def configure(self, prop):
# print(OpenRTM_aist.Logger.print_exception())

self.setSystemInformation(prop)
if self._isMaster:
prop.setProperty("manager.is_master", "YES")
if self._isMain:
prop.setProperty("manager.is_main", "YES")

# Properties from arguments are marged finally
prop.mergeProperties(self._argprop)
Expand Down Expand Up @@ -256,7 +256,7 @@ def configure(self, prop):
# -l module : Specify modules to be loaded at the beginning. <br>
# -o options: Other options. <br>
# -p : Specify a port number. <br>
# -d : Run Master Manager. <br>
# -d : Run Main Manager. <br>
#
# @endif

Expand Down Expand Up @@ -293,7 +293,7 @@ def parseArgs(self, argv):
self._argprop.setProperty("corba.endpoints", arg_)

if opt == "-d":
self._isMaster = True
self._isMain = True

if opt == "-i":
self._ignoreNoConf = True
Expand Down
Loading