[openrtm-commit:02877] r1060 - in branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC: . src/RTMExamples_scripts src/jp/go/aist/rtm/RTC
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 10月 20日 (金) 13:22:58 JST
Author: kawauchi
Date: 2017-10-20 13:22:58 +0900 (Fri, 20 Oct 2017)
New Revision: 1060
Added:
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/rtcprof.jsmooth.in
Modified:
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/build.xml
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples_scripts/rtcd_java.bat
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java
Log:
[merge] r1057-1059 have been merged from trunk.
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/build.xml
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/build.xml 2017-10-20 01:34:17 UTC (rev 1059)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/build.xml 2017-10-20 04:22:58 UTC (rev 1060)
@@ -237,6 +237,17 @@
<delete file="rtcd_java.exe" />
+ <delete file="rtcprof.jsmooth" />
+ <copy file="rtcprof.jsmooth.in" tofile="rtcprof.jsmooth"/>
+ <replace file="rtcprof.jsmooth" token="@version@"
+ value="${version}" />
+ <taskdef name="jsmoothgen"
+ classname="net.charabia.jsmoothgen.ant.JSmoothGen"
+ classpath="${dir.jsmooth}/lib/jsmoothgen-ant.jar"/>
+ <jsmoothgen project="rtcprof.jsmooth"
+ skeletonroot="${dir.jsmooth}/skeletons"/>
+ <copy file="rtcprof_java.exe" todir="${source.examples.scripts}" />
+ <delete file="rtcprof_java.exe" />
</target>
<target name="javaDoc" description="JavaDocを作成します">
Copied: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/rtcprof.jsmooth.in (from rev 1059, trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/rtcprof.jsmooth.in)
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/rtcprof.jsmooth.in (rev 0)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/rtcprof.jsmooth.in 2017-10-20 04:22:58 UTC (rev 1060)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<jsmoothproject>
+<JVMSearchPath>registry</JVMSearchPath>
+<JVMSearchPath>javahome</JVMSearchPath>
+<JVMSearchPath>jrepath</JVMSearchPath>
+<JVMSearchPath>jdkpath</JVMSearchPath>
+<JVMSearchPath>exepath</JVMSearchPath>
+<JVMSearchPath>jview</JVMSearchPath>
+<arguments></arguments>
+<classPath>..\jar\rtcprof.jar</classPath>
+<classPath>..\jar\OpenRTM-aist-1.2.0.jar</classPath>
+<classPath>..\jar\commons-cli-1.1.jar</classPath>
+<currentDirectory>${EXECUTABLEPATH}</currentDirectory>
+<embeddedJar>true</embeddedJar>
+<jarLocation>..\jar\rtcprof.jar</jarLocation>
+<executableName>rtcprof_java.exe</executableName>
+<initialMemoryHeap>-1</initialMemoryHeap>
+<jarLocation>..\jar\rtcprof.jar</jarLocation>
+<mainClassName>rtcporf.rtcprof</mainClassName>
+<maximumMemoryHeap>-1</maximumMemoryHeap>
+<maximumVersion></maximumVersion>
+<minimumVersion></minimumVersion>
+<skeletonName>Console Wrapper</skeletonName>
+<skeletonProperties>
+<key>Message</key>
+<value>This program needs Java to run.
+Please download it at http://www.java.com</value>
+</skeletonProperties>
+<skeletonProperties>
+<key>PressKey</key>
+<value>0</value>
+</skeletonProperties>
+<skeletonProperties>
+<key>Debug</key>
+<value>0</value>
+</skeletonProperties>
+</jsmoothproject>
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples_scripts/rtcd_java.bat
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples_scripts/rtcd_java.bat 2017-10-20 01:34:17 UTC (rev 1059)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples_scripts/rtcd_java.bat 2017-10-20 04:22:58 UTC (rev 1060)
@@ -2,6 +2,5 @@
call set_classpath.bat
set CLASSPATH=%CLASSPATH%;%RTM_JAVA_ROOT%\jar\rtcd.jar;
-rem java -jar "%RTM_JAVA_ROOT%\jar\rtcd.jar" -f "%RTM_JAVA_ROOT%\bin\rtcd_java.conf" %*
-java rtcd.rtcd -f "%RTM_JAVA_ROOT%\bin\rtcd_java.conf" %*
+java rtcd.rtcd %*
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java 2017-10-20 01:34:17 UTC (rev 1059)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java 2017-10-20 04:22:58 UTC (rev 1060)
@@ -413,44 +413,43 @@
Vector<Properties> prof = m_mgr.getLoadedModules();
cprof.value = new RTM.ModuleProfile[prof.size()];
- for (int i=0, len=prof.size(); i < len; ++i) {
- String dumpString = new String();
- dumpString = prof.elementAt(i)._dump(dumpString,
- prof.elementAt(i), 1);
-
+ int ic =0;
+ for (Properties prop: prof) {
+ //String dumpString = prop._dump(dumpString, porp, 1);
_SDOPackage.NVListHolder nvlist = new _SDOPackage.NVListHolder();
- NVUtil.copyFromProperties(nvlist, prof.elementAt(i));
- cprof.value[i] = new RTM.ModuleProfile(nvlist.value);
+ NVUtil.copyFromProperties(nvlist, prop);
+ cprof.value[ic] = new RTM.ModuleProfile(nvlist.value);
+ ++ic;
}
- if (false) {
+ if(m_isMaster){
// copy slaves' module profile
synchronized(m_slaveMutex) {
-
rtcout.println(Logbuf.DEBUG,
m_slaves.length+" slave managers exists.");
- for (int i=0, len= m_slaves.length; i < len; ++i) {
+ ArrayList<RTM.Manager> slaves
+ = new ArrayList(Arrays.asList(m_slaves));
+ Iterator<RTM.Manager> it = slaves.iterator();
+ while (it.hasNext()) {
+ RTM.Manager slave = (RTM.Manager)it.next();
try {
- if (m_slaves[i]!=null) {
- RTM.ModuleProfile[] sprof;
- sprof = m_slaves[i].get_loaded_modules();
- RTM.ModuleProfileListHolder holder
- = new RTM.ModuleProfileListHolder(sprof);
- CORBA_SeqUtil.push_back_list(cprof, holder);
- continue;
- }
+ RTM.ModuleProfile[] sprof;
+ sprof = slave.get_loaded_modules();
+ RTM.ModuleProfileListHolder holder
+ = new RTM.ModuleProfileListHolder(sprof);
+ CORBA_SeqUtil.push_back_list(cprof, holder);
+ continue;
}
catch(Exception ex) {
- rtcout.println(Logbuf.INFO,
- "slave ("+i+") has disappeared.");
- m_slaves[i] = (RTM.Manager)null;
+ String crlf = System.getProperty("line.separator");
+ rtcout.println(Logbuf.ERROR,
+ "Unknown exception cought."
+ + crlf
+ + ex.toString());
+ it.remove();
}
- RTM.ManagerListHolder holder
- = new RTM.ManagerListHolder(m_slaves);
- CORBA_SeqUtil.erase(holder, i);
- --i;
- m_slaves = holder.value;
- }
+ }
+ m_slaves = (RTM.Manager[])slaves.toArray(new RTM.Manager[0]);
}
}
return cprof.value;
@@ -1554,7 +1553,9 @@
ArrayList slaves_name = new ArrayList();
java.util.regex.Pattern pattern
= java.util.regex.Pattern.compile(
- "^manager_[0-9]+$");
+ "^manager(_[0-9]+)?(_%p)?$"
+ //"^manager_[0-9]+$"
+ );
rtcout.println(Logbuf.PARANOID, "mgrstr:"+mgrstr);
if(mgrstr.equals("manager_%p")){
@@ -1683,7 +1684,9 @@
return null;
}
+ rtcout.println(Logbuf.PARANOID, "mgrstr: "+mgrstr);
RTM.Manager mgrobj = findManager(mgrstr);
+ rtcout.println(Logbuf.PARANOID, "mgrobj: "+mgrobj);
CompParam comp_param = new CompParam(arg);
More information about the openrtm-commit
mailing list