[openrtm-commit:01178] r488 - in branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor: template ui/editor
openrtm @ openrtm.org
openrtm @ openrtm.org
2014年 1月 23日 (木) 18:30:09 JST
Author: win-ei
Date: 2014-01-23 18:30:09 +0900 (Thu, 23 Jan 2014)
New Revision: 488
Added:
branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/template/Makefile.vsl
Modified:
branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/AbstractSystemDiagramEditor.java
Log:
Added the processing which outputs Malefile.
Added: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/template/Makefile.vsl
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/template/Makefile.vsl (rev 0)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/template/Makefile.vsl 2014-01-23 09:30:09 UTC (rev 488)
@@ -0,0 +1,310 @@
+${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}
+${sharp} Make file generated by HEW
+${sharp}
+
+${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}
+${sharp} Toolchain directory define
+${sharp} If incorrect, change to the location of the SuperH RISC engine Standard Toolchain toolchain
+TC_INSTALL_DIR = c:${yen}program files (x86)${yen}renesas${yen}hew${yen}tools${yen}renesas${yen}sh${yen}9_4_1
+
+${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}
+${sharp}
+${sharp} Details:
+${sharp} Project: ${project}
+${sharp} Configuration: ${build_config}
+${sharp} Toolchain: Renesas SuperH RISC engine Standard Toolchain
+${sharp}
+${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}
+
+${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}
+${sharp} Main Defines
+
+${sharp} Renesas SH C/C++ Library Generator01 phase
+
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_EXE=lbgsh.exe
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_EXEDIR=${dol}(TC_INSTALL_DIR)${yen}bin
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_OUTFILESC0="..${yen}${project}${yen}${build_config}${yen}${project}.lib"
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_DEPFILESC0="${dol}(TC_INSTALL_DIR)${yen}bin${yen}libsrc.pak"
+
+${sharp} Renesas SH C/C++ Compiler02 phase
+
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_EXE=shc.exe
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC0="..${yen}${project}${yen}${build_config}${yen}DataPortConctTbl.obj"
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC1="..${yen}${project}${yen}${build_config}${yen}DataPortCreateTbl.obj"
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC2="..${yen}${project}${yen}${build_config}${yen}EcAwakingTbl.obj"
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC3="..${yen}${project}${yen}${build_config}${yen}FaultDiagnosisMngTbl.obj"
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC4="..${yen}${project}${yen}${build_config}${yen}RtcCreateTbl.obj"
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC5="..${yen}${project}${yen}${build_config}${yen}RtcEcCreateTbl.obj"
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC6="..${yen}${project}${yen}${build_config}${yen}SafetyMntMngTbl.obj"
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC7="..${yen}${project}${yen}${build_config}${yen}SafetySndMngTbl.obj"
+#foreach($comp in $comps)
+#set($number = $velocityCount+7)
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC${number}="..${yen}${project}${yen}${build_config}${yen}${comp}.obj"
+#end
+${sharp} Renesas SH Assembler03 phase
+
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_ASSEMBLER03_EXE=asmsh.exe
+
+${sharp} Renesas OptLinker04 phase
+
+${project.toUpperCase()}_${build_config.toUpperCase()}_OPTLINKER04_EXE=LnkSpawn.exe
+${project.toUpperCase()}_${build_config.toUpperCase()}_OPTLINKER04_INFILESC0="..${yen}${project}${yen}${build_config}${yen}DataPortConctTbl.obj" ${yen}
+ "..${yen}${project}${yen}${build_config}${yen}DataPortCreateTbl.obj" ${yen}
+ "..${yen}${project}${yen}${build_config}${yen}EcAwakingTbl.obj" ${yen}
+ "..${yen}${project}${yen}${build_config}${yen}FaultDiagnosisMngTbl.obj" ${yen}
+ "..${yen}${project}${yen}${build_config}${yen}RtcCreateTbl.obj" ${yen}
+ "..${yen}${project}${yen}${build_config}${yen}RtcEcCreateTbl.obj" ${yen}
+ "..${yen}${project}${yen}${build_config}${yen}SafetyMntMngTbl.obj" ${yen}
+ "..${yen}${project}${yen}${build_config}${yen}SafetySndMngTbl.obj" ${yen}
+#foreach($comp in $comps)
+ "..${yen}${project}${yen}${build_config}${yen}${comp}.obj" ${yen}
+#end
+ "..${yen}${project}${yen}${build_config}${yen}${project}.lib"
+
+${project.toUpperCase()}_${build_config.toUpperCase()}_OPTLINKER04_OUTFILESC0="..${yen}${project}${yen}${build_config}${yen}${project}.mot" "..${yen}${project}${yen}${build_config}${yen}${project}.abs" "..${yen}${project}${yen}${build_config}${yen}${project}.map"
+
+${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}
+${sharp} nmake "all" statement
+
+ALL: ${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_ENVC0 ${yen}
+ ${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_OUTFILESC0) ${yen}
+ ${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC0) ${yen}
+ ${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC1) ${yen}
+ ${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC2) ${yen}
+ ${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC3) ${yen}
+ ${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC4) ${yen}
+ ${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC5) ${yen}
+ ${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC6) ${yen}
+ ${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC7) ${yen}
+#foreach($comp in $comps)
+#set($number = $velocityCount+7)
+ ${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC${number}) ${yen}
+#end
+ ${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_OPTLINKER04_OUTFILESC0)
+
+${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}${sharp}
+${sharp} Description blocks
+
+!MESSAGE
+!MESSAGE Executing Renesas SH C/C++ Library Generator01 phase
+!MESSAGE
+
+${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_ENVC0 :
+ set SHC_INC=${dol}(TC_INSTALL_DIR)${yen}include
+ set PATH=${dol}(TC_INSTALL_DIR)${yen}bin
+ set SHC_LIB=${dol}(TC_INSTALL_DIR)${yen}bin
+ set SHC_TMP=C:${yen}Users${yen}Public${yen}Temp
+
+${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_OUTFILESC0) : ${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_DEPFILESC0)
+ "${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_EXEDIR)${yen}${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_EXE)" -subcommand=<<
+-cpu=sh2afpu
+-output="..${yen}${project}${yen}${build_config}${yen}${project}.lib"
+-gbr=auto
+-head=runtime,new,stdio,stdlib,string
+<<
+
+!MESSAGE
+!MESSAGE Executing Renesas SH C/C++ Compiler02 phase
+!MESSAGE
+
+${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC0) : "..${yen}${project}${yen}DataPortConctTbl.c"
+ "${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_EXEDIR)${yen}${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_EXE)" -subcommand=<<
+-cpu=sh2afpu
+-object="..${yen}${project}${yen}${build_config}${yen}DataPortConctTbl.obj"
+#if ($build_config.toLowerCase()=="debug")
+-debug
+#end
+-gbr=auto
+"..${yen}${project}${yen}DataPortConctTbl.c"
+-global_volatile=0
+-opt_range=all
+-infinite_loop=0
+-del_vacant_loop=0
+-struct_alloc=1
+-lang=c
+-nologo
+<<
+
+${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC1) : "..${yen}${project}${yen}DataPortCreateTbl.c"
+ "${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_EXEDIR)${yen}${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_EXE)" -subcommand=<<
+-cpu=sh2afpu
+-object="..${yen}${project}${yen}${build_config}${yen}DataPortCreateTbl.obj"
+#if ($build_config.toLowerCase()=="debug")
+-debug
+#end
+-gbr=auto
+"..${yen}${project}${yen}DataPortCreateTbl.c"
+-global_volatile=0
+-opt_range=all
+-infinite_loop=0
+-del_vacant_loop=0
+-struct_alloc=1
+-lang=c
+-nologo
+<<
+
+${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC2) : "..${yen}${project}${yen}EcAwakingTbl.c"
+ "${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_EXEDIR)${yen}${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_EXE)" -subcommand=<<
+-cpu=sh2afpu
+-object="..${yen}${project}${yen}${build_config}${yen}EcAwakingTbl.obj"
+#if ($build_config.toLowerCase()=="debug")
+-debug
+#end
+-gbr=auto
+"..${yen}${project}${yen}EcAwakingTbl.c"
+-global_volatile=0
+-opt_range=all
+-infinite_loop=0
+-del_vacant_loop=0
+-struct_alloc=1
+-lang=c
+-nologo
+<<
+
+${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC3) : "..${yen}${project}${yen}FaultDiagnosisMngTbl.c"
+ "${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_EXEDIR)${yen}${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_EXE)" -subcommand=<<
+-cpu=sh2afpu
+-object="..${yen}${project}${yen}${build_config}${yen}FaultDiagnosisMngTbl.obj"
+#if ($build_config.toLowerCase()=="debug")
+-debug
+#end
+-gbr=auto
+"..${yen}${project}${yen}FaultDiagnosisMngTbl.c"
+-global_volatile=0
+-opt_range=all
+-infinite_loop=0
+-del_vacant_loop=0
+-struct_alloc=1
+-lang=c
+-nologo
+<<
+
+${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC4) : "..${yen}${project}${yen}RtcCreateTbl.c"
+ "${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_EXEDIR)${yen}${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_EXE)" -subcommand=<<
+-cpu=sh2afpu
+-object="..${yen}${project}${yen}${build_config}${yen}RtcCreateTbl.obj"
+#if ($build_config.toLowerCase()=="debug")
+-debug
+#end
+-gbr=auto
+"..${yen}${project}${yen}RtcCreateTbl.c"
+-global_volatile=0
+-opt_range=all
+-infinite_loop=0
+-del_vacant_loop=0
+-struct_alloc=1
+-lang=c
+-nologo
+<<
+
+${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC5) : "..${yen}${project}${yen}RtcEcCreateTbl.c"
+ "${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_EXEDIR)${yen}${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_EXE)" -subcommand=<<
+-cpu=sh2afpu
+-object="..${yen}${project}${yen}${build_config}${yen}RtcEcCreateTbl.obj"
+#if ($build_config.toLowerCase()=="debug")
+-debug
+#end
+-gbr=auto
+"..${yen}${project}${yen}RtcEcCreateTbl.c"
+-global_volatile=0
+-opt_range=all
+-infinite_loop=0
+-del_vacant_loop=0
+-struct_alloc=1
+-lang=c
+-nologo
+<<
+
+${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC6) : "..${yen}${project}${yen}SafetyMntMngTbl.c"
+ "${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_EXEDIR)${yen}${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_EXE)" -subcommand=<<
+-cpu=sh2afpu
+-object="..${yen}${project}${yen}${build_config}${yen}SafetyMntMngTbl.obj"
+#if ($build_config.toLowerCase()=="debug")
+-debug
+#end
+-gbr=auto
+"..${yen}${project}${yen}SafetyMntMngTbl.c"
+-global_volatile=0
+-opt_range=all
+-infinite_loop=0
+-del_vacant_loop=0
+-struct_alloc=1
+-lang=c
+-nologo
+<<
+
+${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC7) : "..${yen}${project}${yen}SafetySndMngTbl.c"
+ "${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_EXEDIR)${yen}${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_EXE)" -subcommand=<<
+-cpu=sh2afpu
+-object="..${yen}${project}${yen}${build_config}${yen}SafetySndMngTbl.obj"
+#if ($build_config.toLowerCase()=="debug")
+-debug
+#end
+-gbr=auto
+"..${yen}${project}${yen}SafetySndMngTbl.c"
+-global_volatile=0
+-opt_range=all
+-infinite_loop=0
+-del_vacant_loop=0
+-struct_alloc=1
+-lang=c
+-nologo
+<<
+
+#foreach($comp in $comps)
+#set($number = $velocityCount+7)
+${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_OUTFILESC${number}) : "..${yen}${project}${yen}${comp}.c"
+ "${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_EXEDIR)${yen}${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_COMPILER02_EXE)" -subcommand=<<
+-cpu=sh2afpu
+-object="..${yen}${project}${yen}${build_config}${yen}${comp}.obj"
+#if ($build_config.toLowerCase()=="debug")
+-debug
+#end
+-gbr=auto
+"..${yen}${project}${yen}${comp}.c"
+-global_volatile=0
+-opt_range=all
+-infinite_loop=0
+-del_vacant_loop=0
+-struct_alloc=1
+-lang=c
+-nologo
+<<
+#end
+
+!MESSAGE
+!MESSAGE Executing Renesas OptLinker04 phase
+!MESSAGE
+
+${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_OPTLINKER04_OUTFILESC0) : ${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_OPTLINKER04_INFILESC0)
+ "${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_SH_CC_LIBRARY_GENERATOR01_EXEDIR)${yen}${dol}(${project.toUpperCase()}_${build_config.toUpperCase()}_OPTLINKER04_EXE)" -subcommand=<<
+noprelink
+#if($build_config.toLowerCase()=="release")
+nodebug
+#end
+rom D=R
+nomessage
+list "..${yen}${project}${yen}${build_config}${yen}${project}.map"
+nooptimize
+-start=DVECTTBL,DINTTBL/00,PResetPRG,PIntPRG/0800,P,C,C${dol}BSEC,C${dol}DSEC,D/01000,B,R/0FFF80000,S/0FFFBFC00
+nologo
+-input="..${yen}${project}${yen}${build_config}${yen}DataPortConctTbl.obj"
+-input="..${yen}${project}${yen}${build_config}${yen}DataPortCreateTbl.obj"
+-input="..${yen}${project}${yen}${build_config}${yen}EcAwakingTbl.obj"
+-input="..${yen}${project}${yen}${build_config}${yen}FaultDiagnosisMngTbl.obj"
+-input="..${yen}${project}${yen}${build_config}${yen}RtcCreateTbl.obj"
+-input="..${yen}${project}${yen}${build_config}${yen}RtcEcCreateTbl.obj"
+-input="..${yen}${project}${yen}${build_config}${yen}SafetyMntMngTbl.obj"
+-input="..${yen}${project}${yen}${build_config}${yen}SafetySndMngTbl.obj"
+#foreach($comp in $comps)
+-input="..${yen}${project}${yen}${build_config}${yen}${comp}.obj"
+#end
+-library="..${yen}${project}${yen}${build_config}${yen}${project}.lib"
+-output="..${yen}${project}${yen}${build_config}${yen}${project}.abs"
+end
+-input="..${yen}${project}${yen}${build_config}${yen}${project}.abs"
+form stype
+output "..${yen}${project}${yen}${build_config}${yen}${project}.mot"
+-exit
+
+<<
Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/AbstractSystemDiagramEditor.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/AbstractSystemDiagramEditor.java 2014-01-23 00:43:35 UTC (rev 487)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/AbstractSystemDiagramEditor.java 2014-01-23 09:30:09 UTC (rev 488)
@@ -701,19 +701,11 @@
//DataPortConctTbl.c
//
{
- System.out.println("DataPortConctTbl.c");
String template = TEMPLATE_PATH + "/" +"DataPortConctTbl.c.vsl";
ClassLoader cl = Thread.currentThread().getContextClassLoader();
- System.out.println("Loads class for RTMSafety");
- System.out.println("template:"+template);
InputStream ins = cl.getResourceAsStream(template);
- System.out.println("Opens file.");
String outfile = "src/" + "testtable.c";
- System.out.print("outfile:");
- System.out.println(outfile);
- System.out.println("save 430");
Map<String, Object> contextMap = new HashMap<String, Object>();
- System.out.println("save 440");
contextMap.put("template", TEMPLATE_PATH);
List<DataportConnector> conns = profile.getDataPortConnectors();
int ic = 0;
@@ -723,38 +715,19 @@
connsMap.put(conn.getTargetDataPort().getPortName().replace(".", "_"),conn.getSourceDataPort().getPortName().replace(".", "_"));
}
contextMap.put("connectPorts", connsMap);
- System.out.println("save 450");
GeneratedResult gr = TemplateUtil.createGeneratedResult(ins, contextMap, outfile);
- System.out.println("save 460");
- System.out.println("Creates file.");
if (ins != null) {
- System.out.println("Closes file. 1");
ins.close();
- System.out.println("Closes file. 2");
}
- System.out.println("save 470 resource.getURI().devicePath()="+resource.getURI().devicePath());
- System.out.println("save 471 resource.getURI().device()="+resource.getURI().device());
- System.out.println("save 472 resource.getURI().path()="+resource.getURI().path());
- System.out.println("save 473 resource.getURI().fileExtension()="+resource.getURI().fileExtension());
- System.out.println("save 474 file.getLocation().lastSegment()="+file.getLocation().lastSegment());
- System.out.println("save 475 file.getLocation().toOSString())="+file.getLocation().toOSString());
String dataPortContct = tablepath+"\\DataPortConctTbl.c";
- System.out.println("save 476 tablepath="+dataPortContct);
File targetFile = new File(dataPortContct);
FileWriter filewriter = new FileWriter(targetFile);
BufferedWriter bw = new BufferedWriter(filewriter);
PrintWriter pw = new PrintWriter(bw);
pw.println(gr.getCode());
pw.close();
- System.out.println("save 480");
- System.out.println("save 490");
- System.out.println("save 495");
- System.out.println("save 500");
- System.out.println("save 600");
- System.out.println("save 700");
//System.out.println(gr.getCode());
- System.out.println("save 800");
}
//
//DataPortCreateTbl.c.vsl
@@ -886,8 +859,108 @@
PrintWriter pw = new PrintWriter(bw);
pw.println(gr.getCode());
pw.close();
- System.out.println(gr.getCode());
+ //System.out.println(gr.getCode());
}
+ //
+ //SafetyMntMngTbl.c
+ //
+ {
+ String template = TEMPLATE_PATH + "/" +"SafetyMntMngTbl.c.vsl";
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ InputStream ins = cl.getResourceAsStream(template);
+ String dataPortContct = tablepath+"\\SafetyMntMngTbl.c";
+ Map<String, Object> contextMap = new HashMap<String, Object>();
+ contextMap.put("template", TEMPLATE_PATH);
+ List<org.openrtp.namespaces.rts.version02.Component> componetns = profile.getComponents();
+ ArrayList complist = new ArrayList();
+ for(org.openrtp.namespaces.rts.version02.Component comp :componetns)
+ {
+ System.out.println(comp.getId());
+ String[] strary = comp.getId().split(":");
+ complist.add(strary[3]);
+ }
+ contextMap.put("comps", complist);
+ GeneratedResult gr = TemplateUtil.createGeneratedResult(ins, contextMap, dataPortContct);
+ File targetFile = new File(dataPortContct);
+ FileWriter filewriter = new FileWriter(targetFile);
+ BufferedWriter bw = new BufferedWriter(filewriter);
+ PrintWriter pw = new PrintWriter(bw);
+ pw.println(gr.getCode());
+ pw.close();
+ //System.out.println(gr.getCode());
+ }
+ //
+ //SafetySndMngTbl.c
+ //
+ {
+ String template = TEMPLATE_PATH + "/" +"SafetySndMngTbl.c.vsl";
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ InputStream ins = cl.getResourceAsStream(template);
+ String dataPortContct = tablepath+"\\SafetySndMngTbl.c";
+ Map<String, Object> contextMap = new HashMap<String, Object>();
+ contextMap.put("template", TEMPLATE_PATH);
+ List<org.openrtp.namespaces.rts.version02.Component> componetns = profile.getComponents();
+ ArrayList complist = new ArrayList();
+ for(org.openrtp.namespaces.rts.version02.Component comp :componetns)
+ {
+ System.out.println(comp.getId());
+ String[] strary = comp.getId().split(":");
+ complist.add(strary[3]);
+ }
+ contextMap.put("comps", complist);
+ GeneratedResult gr = TemplateUtil.createGeneratedResult(ins, contextMap, dataPortContct);
+ File targetFile = new File(dataPortContct);
+ FileWriter filewriter = new FileWriter(targetFile);
+ BufferedWriter bw = new BufferedWriter(filewriter);
+ PrintWriter pw = new PrintWriter(bw);
+ pw.println(gr.getCode());
+ pw.close();
+ //System.out.println(gr.getCode());
+ }
+ //
+ //Makefile
+ //
+ {
+ String template = TEMPLATE_PATH + "/" +"Makefile.vsl";
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ InputStream ins = cl.getResourceAsStream(template);
+ Map<String, Object> contextMap = new HashMap<String, Object>();
+ contextMap.put("template", TEMPLATE_PATH);
+ String[] id = profile.getId().split(":");
+
+ contextMap.put("project", id[2]);
+ System.out.println("id:"+profile.getId());
+ List<org.openrtp.namespaces.rts.version02.Component> componetns = profile.getComponents();
+ ArrayList complist = new ArrayList();
+ for(org.openrtp.namespaces.rts.version02.Component comp :componetns)
+ {
+ System.out.println(comp.getId());
+ String[] strary = comp.getId().split(":");
+ complist.add(strary[3]);
+ }
+ contextMap.put("comps", complist);
+ contextMap.put("build_config", "Debug");
+ String dataPortContct = tablepath+"\\"+id[2]+"_Deubg";
+ GeneratedResult gr = TemplateUtil.createGeneratedResult(ins, contextMap, dataPortContct);
+ File targetFile = new File(dataPortContct);
+ FileWriter filewriter = new FileWriter(targetFile);
+ BufferedWriter bw = new BufferedWriter(filewriter);
+ PrintWriter pw = new PrintWriter(bw);
+ pw.println(gr.getCode());
+ pw.close();
+ //System.out.println(gr.getCode());
+ cl = Thread.currentThread().getContextClassLoader();
+ ins = cl.getResourceAsStream(template);
+ contextMap.put("build_config", "Release");
+ dataPortContct = tablepath+"\\"+id[2]+"_Release";
+ gr = TemplateUtil.createGeneratedResult(ins, contextMap, dataPortContct);
+ targetFile = new File(dataPortContct);
+ filewriter = new FileWriter(targetFile);
+ bw = new BufferedWriter(filewriter);
+ pw = new PrintWriter(bw);
+ pw.println(gr.getCode());
+ pw.close();
+ }
}
}
More information about the openrtm-commit
mailing list