[openrtm-commit:02858] r1055 - trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 10月 5日 (木) 14:37:26 JST
Author: t-katami
Date: 2017-10-05 14:37:25 +0900 (Thu, 05 Oct 2017)
New Revision: 1055
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ModuleManager.java
Log:
[compat,newfunc,bugfix->releng_1_2] fixed the bug. refs #4203
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java 2017-10-04 01:33:33 UTC (rev 1054)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java 2017-10-05 05:37:25 UTC (rev 1055)
@@ -320,6 +320,7 @@
rtcout.println(Logbuf.TRACE, "get_loadable_modules()");
// copy local module profiles
Vector<Properties> prof = m_mgr.getLoadableModules();
+ rtcout.println(Logbuf.PARANOID, "prof.size():"+prof.size());
RTM.ModuleProfile[] cprof = new RTM.ModuleProfile[prof.size()];
for (int i=0, len=prof.size(); i < len; ++i) {
String dumpString = new String();
@@ -364,6 +365,7 @@
}
}
}
+ rtcout.println(Logbuf.PARANOID, "cprof.length:"+cprof.length);
return cprof;
/*
@@ -1372,6 +1374,10 @@
public String get_parameter_by_modulename(String param_name,
String[] module_name){
+ rtcout.println(Logbuf.PARANOID,
+ "get_parameter_by_modulename("
+ +param_name
+ +")");
String arg = module_name[0];
int pos = arg.indexOf("&"+param_name+"=");
if(pos == -1){
@@ -1479,6 +1485,17 @@
config.getProperty("manager.modules."
+comp_param.language()
+".manager_cmd");
+ rtcout.println(Logbuf.PARANOID,
+ "comp_param.language():"
+ +comp_param.language());
+ rtcout.println(Logbuf.PARANOID,
+ "manager.modules."
+ +comp_param.language()
+ +".manager_cmd:"
+ +config.getProperty("manager.modules."
+ +comp_param.language()
+ +".manager_cmd"));
+
if(rtcd_cmd.isEmpty()){
rtcd_cmd = "rtcd_java";
}
@@ -1491,6 +1508,11 @@
load_path = load_path + "," + load_path_language;
List<String> cmd = new ArrayList();
+ String osname = System.getProperty("os.name").toLowerCase();
+ if(osname.startsWith("windows")){
+ cmd.add("cmd");
+ cmd.add("/c");
+ }
cmd.add(rtcd_cmd);
cmd.add("-o");
cmd.add("manager.is_master:NO");
@@ -1534,6 +1556,7 @@
= java.util.regex.Pattern.compile(
"^manager_[0-9]+$");
+ rtcout.println(Logbuf.PARANOID, "mgrstr:"+mgrstr);
if(mgrstr.equals("manager_%p")){
synchronized (m_slaveMutex) {
for (int ic=0; ic < m_slaves.length; ++ic) {
@@ -1553,9 +1576,13 @@
}
}
+ rtcout.println(Logbuf.PARANOID,
+ "slaves_name.size():"+slaves_name.size());
while (mgrobj == null) {
if(mgrstr.equals("manager_%p")){
synchronized (m_slaveMutex) {
+ rtcout.println(Logbuf.PARANOID,
+ "m_slaves.length:"+m_slaves.length);
for (int ic=0; ic < m_slaves.length; ++ic) {
_SDOPackage.NameValue[] prof
= m_slaves[ic]. get_configuration();
@@ -1565,7 +1592,13 @@
NVUtil.copyToProperties(proper, nvholder);
String i_name
= proper.getProperty("manager.instance_name");
+ rtcout.println(Logbuf.PARANOID, "i_name:"+i_name);
Matcher matcher = pattern.matcher(i_name);
+ rtcout.println(Logbuf.PARANOID,
+ "matcher.matches():"+matcher.matches());
+ rtcout.println(Logbuf.PARANOID,
+ "slaves_name.contains(i_name):"
+ +slaves_name.contains(i_name));
if(matcher.matches() &&
!slaves_name.contains(i_name)){
mgrobj = m_slaves[ic];
@@ -1674,6 +1707,11 @@
List<String> cmd = new ArrayList();
+ String osname = System.getProperty("os.name").toLowerCase();
+ if(osname.startsWith("windows")){
+ cmd.add("cmd");
+ cmd.add("/c");
+ }
cmd.add(rtcd_cmd);
cmd.add("-p");
cmd.add(mgrvstr[1]);
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ModuleManager.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ModuleManager.java 2017-10-04 01:33:33 UTC (rev 1054)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ModuleManager.java 2017-10-05 05:37:25 UTC (rev 1055)
@@ -620,8 +620,8 @@
String[] langs =
m_properties.getProperty("manager.supported_languages").split(",");
rtcout.println(Logbuf.DEBUG,
- "langs:"
- +m_properties.getProperty("manager.supported_languages"));
+ "manager.supported_languages:"
+ +m_properties.getProperty("manager.supported_languages"));
for(int ic=0;ic<langs.length;++ic) {
String lang = langs[ic].trim();
@@ -710,12 +710,17 @@
// get file list for each suffixes
ArrayList<String> flist = new ArrayList<String>();
+ File dir = new File(path);
+ rtcout.println(Logbuf.PARANOID,"dir:"+dir);
+ if(!dir.exists()){
+ continue;
+ }
for (String suffix: suffixes) {
String glob = ".*\\.";
glob += suffix.trim();
rtcout.println(Logbuf.PARANOID,"glob: "+glob);
- File dir = new File(path);
String[] files = dir.list(new FilePathFilter(glob));
+ rtcout.println(Logbuf.PARANOID,"files.length:"+files.length);
ArrayList<String> tmp
= new ArrayList<String>(Arrays.asList(files));
rtcout.println(Logbuf.DEBUG,
@@ -817,14 +822,14 @@
}
@Override
public boolean accept(File dir, String name) {
- if(m_regex.isEmpty()){
- return false;
- }
+ if(m_regex.isEmpty()){
+ return false;
+ }
- if(name.matches(m_regex)){
- return true;
- }
- return false;
+ if(name.matches(m_regex)){
+ return true;
+ }
+ return false;
}
}
@@ -863,6 +868,11 @@
rtcout.println(Logbuf.PARANOID,
"profile_cmd: "+cmd);
List<String> cmdlist = new ArrayList();
+ String osname = System.getProperty("os.name").toLowerCase();
+ if(osname.startsWith("windows")){
+ cmdlist.add("cmd");
+ cmdlist.add("/c");
+ }
cmdlist.add(cmd);
cmdlist.add(module);
Process process;
@@ -911,7 +921,7 @@
continue;
}
rtcout.println(Logbuf.PARANOID, "prop.size():"+prop.size());
- if(prop.size()!=0){
+ if(!prop.getProperty("implementation_id").isEmpty()){
prop.setProperty("module_file_name",
new File(module).getName());
prop.setProperty("module_file_path", module);
More information about the openrtm-commit
mailing list