[openrtm-commit:03028] r785 - in trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder: . generator/param manager nl template template/choreonoid template/common ui/editors
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 12月 16日 (土) 15:47:14 JST
Author: ga
Date: 2017-12-16 15:47:14 +0900 (Sat, 16 Dec 2017)
New Revision: 785
Added:
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/choreonoid/
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/choreonoid/CXX_RTC.cpp.vsl
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/choreonoid/CXX_RTC.h.vsl
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/common/README_Choreonoid.vsl
Modified:
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/IRtcBuilderConstants.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/RtcParam.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CXXGenerateManager.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CommonGenerateManager.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/nl/messages.properties
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/BasicEditorFormPage.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/IMessageConstants.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/LanguageEditorFormPage.java
Log:
Modified to generate source code for Choreonoid.
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/IRtcBuilderConstants.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/IRtcBuilderConstants.java 2017-12-10 16:22:54 UTC (rev 784)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/IRtcBuilderConstants.java 2017-12-16 06:47:14 UTC (rev 785)
@@ -65,7 +65,9 @@
"onInitialize", "onFinalize", "onStartup", "onShutdown", "onActivated",
"onDeactivated", "onAborting", "onError", "onReset",
"onExecute", "onStateUpdate", "onRateChanged",
- "onAction", "onModeChanged"};
+ "onAction", "onModeChanged",
+ "initializeIO", "initializeSimulation", "startSimulation",
+ "inputFromSimulator", "outputToSimulator", "stopSimulation"};
public static final String TAG_BACKEND = "backend";
public static final String TAG_SVC_IDL = "svc-idl";
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/RtcParam.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/RtcParam.java 2017-12-10 16:22:54 UTC (rev 784)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/RtcParam.java 2017-12-16 06:47:14 UTC (rev 785)
@@ -119,6 +119,8 @@
private String rtm_version = IRtcBuilderConstants.DEFAULT_RTM_VERSION;
private String rtm_java_version = IRtcBuilderConstants.DEFAULT_RTM_VERSION;
private boolean test_version = false;
+
+ private boolean isChoreonoid = false;
public RtcParam(GeneratorParam parent) {
this(parent, false);
@@ -138,7 +140,7 @@
}
//
actions = new RecordedList<ActionsParam>();
- for (int intidx = IRtcBuilderConstants.ACTIVITY_INITIALIZE; intidx < IRtcBuilderConstants.ACTIVITY_MODE_CHANGED + 1; intidx++) {
+ for (int intidx = IRtcBuilderConstants.ACTIVITY_INITIALIZE; intidx < IRtcBuilderConstants.ACTIVITY_DUMMY; intidx++) {
actions.add(new ActionsParam());
}
//
@@ -654,6 +656,12 @@
this.configurationSuffix = configurationSuffix;
}
+ public boolean isChoreonoid() {
+ return isChoreonoid;
+ }
+ public void setChoreonoid(boolean value) {
+ isChoreonoid = value;
+ }
//
public void checkAndSetParameter() {
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CXXGenerateManager.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CXXGenerateManager.java 2017-12-10 16:22:54 UTC (rev 784)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CXXGenerateManager.java 2017-12-16 06:47:14 UTC (rev 785)
@@ -103,7 +103,12 @@
RtcParam rtcParam = (RtcParam) contextMap.get("rtcParam");
String outfile = null;
outfile = "include/" + rtcParam.getName() + "/" + rtcParam.getName() + ".h";
- String infile = "cpp/CXX_RTC.h.vsl";
+ String infile = "";
+ if(rtcParam.isChoreonoid()) {
+ infile = "choreonoid/CXX_RTC.h.vsl";
+ } else {
+ infile = "cpp/CXX_RTC.h.vsl";
+ }
return generate(infile, outfile, contextMap);
}
@@ -111,7 +116,12 @@
RtcParam rtcParam = (RtcParam) contextMap.get("rtcParam");
String outfile = null;
outfile = "src/" + rtcParam.getName() + ".cpp";
- String infile = "cpp/CXX_RTC.cpp.vsl";
+ String infile = "";
+ if(rtcParam.isChoreonoid()) {
+ infile = "choreonoid/CXX_RTC.cpp.vsl";
+ } else {
+ infile = "cpp/CXX_RTC.cpp.vsl";
+ }
return generate(infile, outfile, contextMap);
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CommonGenerateManager.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CommonGenerateManager.java 2017-12-10 16:22:54 UTC (rev 784)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CommonGenerateManager.java 2017-12-16 06:47:14 UTC (rev 785)
@@ -71,7 +71,12 @@
public GeneratedResult generateREADME(Map<String, Object> contextMap) {
RtcParam rtcParam = (RtcParam) contextMap.get("rtcParam");
String outfile = "README." + rtcParam.getName();
- String infile = "common/README.vsl";
+ String infile = "";
+ if(rtcParam.isChoreonoid()) {
+ infile = "common/README_Choreonoid.vsl";
+ } else {
+ infile = "common/README.vsl";
+ }
return generate(infile, outfile, contextMap);
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/nl/messages.properties
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/nl/messages.properties 2017-12-10 16:22:54 UTC (rev 784)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/nl/messages.properties 2017-12-16 06:47:14 UTC (rev 785)
@@ -44,6 +44,7 @@
IMessageConstants.BASIC_HINT_COMPKIND_DESC_P2=\u30fbDataFlowComponent: Periodic execution RTC
IMessageConstants.BASIC_HINT_COMPKIND_DESC_P3=\u30fbFiniteStateMachine: Finite state machine RTC
IMessageConstants.BASIC_HINT_COMPKIND_DESC_P4=\u30fbMultiMode: Multi mode RTC
+IMessageConstants.BASIC_HINT_COMPKIND_DESC_P5=\u30fbChoreonoid: XXXXX
IMessageConstants.BASIC_HINT_MAXINST_TITLE_P1=Number of
IMessageConstants.BASIC_HINT_MAXINST_TITLE_P2=maximum instance :
IMessageConstants.BASIC_HINT_MAXINST_DESC_P1=Specifies the maximum number of instances that can be generated.
@@ -325,9 +326,8 @@
IMessageConstants.LANGUAGE_LBL_LIBRARY=Libraries
IMessageConstants.LANGUAGE_SELECTION_CAUTION=Please select a language for generation.
-IMessageConstants.LANGUAGE_USE_OLD_BUILD=Use old build environment.
+IMessageConstants.LANGUAGE_CHOREONOID_CAUTION=Choreonoid type RTC can only select C++.
-
IMessageConstants.RTCXML_SECTION=RTC.xml
IMessageConstants.RTCXML_CAUTION_P1=* In this page, editing XML files directly is not recommended.
IMessageConstants.RTCXML_CAUTION_P2=Only expert users of the RTC specification should modify them direcly.
Added: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/choreonoid/CXX_RTC.cpp.vsl
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/choreonoid/CXX_RTC.cpp.vsl (rev 0)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/choreonoid/CXX_RTC.cpp.vsl 2017-12-16 06:47:14 UTC (rev 785)
@@ -0,0 +1,368 @@
+// -*- C++ -*-
+/*!
+ * @file ${rtcParam.name}.cpp
+ * @brief ${rtcParam.description}
+ * @date ${dol}Date${dol}
+#parse("${template}/cpp/_doc.vsl")
+ * ${dol}Id${dol}
+ */
+
+${sharp}include "${rtcParam.name}.h"
+
+// Module specification
+// <rtc-template block="module_spec">
+static const char* ${rtcParam.name.toLowerCase()}_spec[] =
+ {
+ "implementation_id", "${rtcParam.name}",
+ "type_name", "${rtcParam.name}",
+ "description", "${rtcParam.description}",
+ "version", "${rtcParam.version}",
+ "vendor", "${rtcParam.vender}",
+ "category", "${rtcParam.category}",
+ "activity_type", "${rtcParam.activityType}",
+ "kind", "${rtcParam.componentKind}",
+ "max_instance", "${rtcParam.maxInstance}",
+ "language", "C++",
+ "lang_type", "compile",
+#if( ${rtcParam.configParams.size()} > 0 )
+ // Configuration variables
+#foreach($configParam in ${rtcParam.configParams})
+ "conf.default.${configParam.name}", "${configParam.defaultVal}",
+#end
+
+ // Widget
+#foreach($configParam in ${rtcParam.configParams})
+#if( ${configParam.widget.length()} > 0 )
+ "conf.__widget__.${configParam.name}", "${configParam.widget}#if( ${configParam.step.length()} > 0 ).${configParam.step}#end",
+#end
+#end
+ // Constraints
+#foreach($configParam in ${rtcParam.configParams})
+#if( ${configParam.constraint.length()} > 0 )
+ "conf.__constraints__.${configParam.name}", "${configParam.constraint}",
+#end
+#end
+
+#foreach($configParam in ${rtcParam.configParams})
+ "conf.__type__.${configParam.name}", "${configParam.type}",
+#end
+
+#end
+#if( ${rtcParam.configParameterParams.size()} > 0 )
+ // System Configuration
+#foreach($parameterParam in ${rtcParam.configParameterParams})
+#if( ${parameterParam.isNonPeriodic()} )
+ "${parameterParam.configName}", "${parameterParam.defaultVal}",
+#end
+#end
+#end
+ ""
+ };
+// </rtc-template>
+
+/*!
+ * @brief constructor
+ * @param manager Maneger Object
+ */
+${rtcParam.name}::${rtcParam.name}(RTC::Manager* manager)
+ // <rtc-template block="initializer">
+ : BodyIoRTC(manager)#foreach($port in ${rtcParam.inports})#if(${port.type}!=""),
+ ${rtcParam.commonPrefix}${rtcParam.dataPortPrefix}${port.tmplVarName}In${rtcParam.dataPortSuffix}${rtcParam.commonSuffix}("${port.name}", ${rtcParam.commonPrefix}${rtcParam.dataPortPrefix}${port.tmplVarName}${rtcParam.dataPortSuffix}${rtcParam.commonSuffix})#end#end#foreach($port in ${rtcParam.outports})#if(${port.type}!=""),
+ ${rtcParam.commonPrefix}${rtcParam.dataPortPrefix}${port.tmplVarName}Out${rtcParam.dataPortSuffix}${rtcParam.commonSuffix}("${port.name}", ${rtcParam.commonPrefix}${rtcParam.dataPortPrefix}${port.tmplVarName}${rtcParam.dataPortSuffix}${rtcParam.commonSuffix})#end#end
+#if(${rtcParam.servicePorts.size()}>0)
+#foreach($servicePort in ${rtcParam.servicePorts})
+#if(${servicePort.servicePortInterfaces.size()}>0)
+,
+ ${rtcParam.commonPrefix}${rtcParam.servicePortPrefix}${servicePort.name}Port${rtcParam.servicePortSuffix}${rtcParam.commonSuffix}("${servicePort.name}")#end#end#end
+
+
+ // </rtc-template>
+{
+}
+
+/*!
+ * @brief destructor
+ */
+${rtcParam.name}::~${rtcParam.name}()
+{
+}
+
+
+#if(${rtcParam.getDocActionOverView(0).length()}>0)/*!
+ * ${tmpltHelper.convertDoc(${rtcParam.getDocActionOverView(0)})}
+ */#end
+#if(${rtcParam.configParams.size()}==0 && ${rtcParam.IsNotImplemented(0)} && ${rtcParam.inports.size()}==0 && ${rtcParam.outports.size()}==0 && ${rtcParam.servicePorts.size()}==0)/*#end
+
+RTC::ReturnCode_t ${rtcParam.name}::onInitialize()
+{
+ // Registration: InPort/OutPort/Service
+ // <rtc-template block="registration">
+ // Set InPort buffers
+#foreach($port in ${rtcParam.inports})
+#if(${port.type}!="") addInPort("${port.name}", ${rtcParam.commonPrefix}${rtcParam.dataPortPrefix}${port.tmplVarName}In${rtcParam.dataPortSuffix}${rtcParam.commonSuffix});
+#end
+#end
+
+ // Set OutPort buffer
+#foreach($port in ${rtcParam.outports})
+#if(${port.type}!="") addOutPort("${port.name}", ${rtcParam.commonPrefix}${rtcParam.dataPortPrefix}${port.tmplVarName}Out${rtcParam.dataPortSuffix}${rtcParam.commonSuffix});
+#end
+#end
+
+ // Set service provider to Ports
+#if(${rtcParam.servicePorts.size()}>0)
+#foreach($servicePort in ${rtcParam.servicePorts})
+#if(${servicePort.servicePortInterfaces.size()}>0)
+#foreach($serviceInterface in ${servicePort.servicePortInterfaces})
+#if(${serviceInterface.index}==0)
+ ${rtcParam.commonPrefix}${rtcParam.servicePortPrefix}${servicePort.name}Port${rtcParam.servicePortSuffix}${rtcParam.commonSuffix}.registerProvider("${serviceInterface.name}", "${serviceInterface.interfaceType}", ${rtcParam.commonPrefix}${rtcParam.serviceIFPrefix}${serviceInterface.tmplVarName}${rtcParam.serviceIFSuffix}${rtcParam.commonSuffix});
+#end#end#end#end#end
+
+ // Set service consumers to Ports
+#if(${rtcParam.servicePorts.size()}>0)
+#foreach($servicePort in ${rtcParam.servicePorts})
+#if(${servicePort.servicePortInterfaces.size()}>0)
+#foreach($serviceInterface in ${servicePort.servicePortInterfaces})
+#if(${serviceInterface.index}==1)
+ ${rtcParam.commonPrefix}${rtcParam.servicePortPrefix}${servicePort.name}Port${rtcParam.servicePortSuffix}${rtcParam.commonSuffix}.registerConsumer("${serviceInterface.name}", "${serviceInterface.interfaceType}", ${rtcParam.commonPrefix}${rtcParam.serviceIFPrefix}${serviceInterface.tmplVarName}${rtcParam.serviceIFSuffix}${rtcParam.commonSuffix});
+#end#end#end#end#end
+
+ // Set CORBA Service Ports
+#if(${rtcParam.servicePorts.size()}>0)
+#foreach($servicePort in ${rtcParam.servicePorts})
+#if(${servicePort.servicePortInterfaces.size()}>0)
+ addPort(${rtcParam.commonPrefix}${rtcParam.servicePortPrefix}${servicePort.name}Port${rtcParam.servicePortSuffix}${rtcParam.commonSuffix});
+#end#end#end
+
+ // </rtc-template>
+
+ // <rtc-template block="bind_config">
+#if(${rtcParam.configParams.size()}>0)
+ // Bind variables and configuration variable
+#foreach($configParam in ${rtcParam.configParams})
+ bindParameter("${configParam.name}", ${rtcParam.commonPrefix}${rtcParam.configurationPrefix}${configParam.tmplVarName}${rtcParam.configurationSuffix}${rtcParam.commonSuffix}, "${configParam.defaultVal}");
+#end
+#end
+ // </rtc-template>
+#if(${tmpltHelper.checkDetailContent(0,${rtcParam})})${rtcParam.getDetailContent(0)}
+#end
+
+ return RTC::RTC_OK;
+}
+#if(${rtcParam.configParams.size()}==0 && ${rtcParam.IsNotImplemented(0)} && ${rtcParam.inports.size()}==0 && ${rtcParam.outports.size()}==0 && ${rtcParam.servicePorts.size()}==0)*/
+#end
+
+#if(${rtcParam.getDocActionOverView(1).length()}>0)/*!
+ * ${tmpltHelper.convertDoc(${rtcParam.getDocActionOverView(1)})}
+ */
+#end
+#if(${rtcParam.IsNotImplemented(1)})/*#end
+
+RTC::ReturnCode_t ${rtcParam.name}::onFinalize()
+{
+#if(${tmpltHelper.checkDetailContent(1,${rtcParam})})${rtcParam.getDetailContent(1)}
+#end
+ return RTC::RTC_OK;
+}
+#if(${rtcParam.IsNotImplemented(1)})*/
+#end
+
+#if(${rtcParam.getDocActionOverView(2).length()}>0)/*!
+ * ${tmpltHelper.convertDoc(${rtcParam.getDocActionOverView(2)})}
+ */
+#end
+#if(${rtcParam.IsNotImplemented(2)})/*#end
+
+RTC::ReturnCode_t ${rtcParam.name}::onStartup(RTC::UniqueId ec_id)
+{
+#if(${tmpltHelper.checkDetailContent(2,${rtcParam})})${rtcParam.getDetailContent(2)}
+#end
+ return RTC::RTC_OK;
+}
+#if(${rtcParam.IsNotImplemented(2)})*/
+#end
+
+#if(${rtcParam.getDocActionOverView(3).length()}>0)/*!
+ * ${tmpltHelper.convertDoc(${rtcParam.getDocActionOverView(3)})}
+ */
+#end
+#if(${rtcParam.IsNotImplemented(3)})/*#end
+
+RTC::ReturnCode_t ${rtcParam.name}::onShutdown(RTC::UniqueId ec_id)
+{
+#if(${tmpltHelper.checkDetailContent(3,${rtcParam})})${rtcParam.getDetailContent(3)}
+#end
+ return RTC::RTC_OK;
+}
+#if(${rtcParam.IsNotImplemented(3)})*/
+#end
+
+#if(${rtcParam.getDocActionOverView(4).length()}>0)/*!
+ * ${tmpltHelper.convertDoc(${rtcParam.getDocActionOverView(4)})}
+ */
+#end
+#if(${rtcParam.IsNotImplemented(4)})/*#end
+
+RTC::ReturnCode_t ${rtcParam.name}::onActivated(RTC::UniqueId ec_id)
+{
+#if(${tmpltHelper.checkDetailContent(4,${rtcParam})})${rtcParam.getDetailContent(4)}
+#end
+ return RTC::RTC_OK;
+}
+#if(${rtcParam.IsNotImplemented(4)})*/
+#end
+
+#if(${rtcParam.getDocActionOverView(5).length()}>0)/*!
+ * ${tmpltHelper.convertDoc(${rtcParam.getDocActionOverView(5)})}
+ */
+#end
+#if(${rtcParam.IsNotImplemented(5)})/*#end
+
+RTC::ReturnCode_t ${rtcParam.name}::onDeactivated(RTC::UniqueId ec_id)
+{
+#if(${tmpltHelper.checkDetailContent(5,${rtcParam})})${rtcParam.getDetailContent(5)}
+#end
+ return RTC::RTC_OK;
+}
+#if(${rtcParam.IsNotImplemented(5)})*/
+#end
+
+#if(${rtcParam.getDocActionOverView(9).length()}>0)/*!
+ * ${tmpltHelper.convertDoc(${rtcParam.getDocActionOverView(9)})}
+ */
+#end
+#if(${rtcParam.IsNotImplemented(9)})/*#end
+
+RTC::ReturnCode_t ${rtcParam.name}::onExecute(RTC::UniqueId ec_id)
+{
+#if(${tmpltHelper.checkDetailContent(9,${rtcParam})})${rtcParam.getDetailContent(9)}
+#end
+ return RTC::RTC_OK;
+}
+#if(${rtcParam.IsNotImplemented(9)})*/
+#end
+
+#if(${rtcParam.getDocActionOverView(6).length()}>0)/*!
+ * ${tmpltHelper.convertDoc(${rtcParam.getDocActionOverView(6)})}
+ */
+#end
+#if(${rtcParam.IsNotImplemented(6)})/*#end
+
+RTC::ReturnCode_t ${rtcParam.name}::onAborting(RTC::UniqueId ec_id)
+{
+#if(${tmpltHelper.checkDetailContent(6,${rtcParam})})${rtcParam.getDetailContent(6)}
+#end
+ return RTC::RTC_OK;
+}
+#if(${rtcParam.IsNotImplemented(6)})*/
+#end
+
+#if(${rtcParam.getDocActionOverView(7).length()}>0)/*!
+ * ${tmpltHelper.convertDoc(${rtcParam.getDocActionOverView(7)})}
+ */
+#end
+#if(${rtcParam.IsNotImplemented(7)})/*#end
+
+RTC::ReturnCode_t ${rtcParam.name}::onError(RTC::UniqueId ec_id)
+{
+#if(${tmpltHelper.checkDetailContent(7,${rtcParam})})${rtcParam.getDetailContent(7)}
+#end
+ return RTC::RTC_OK;
+}
+#if(${rtcParam.IsNotImplemented(7)})*/
+#end
+
+#if(${rtcParam.getDocActionOverView(8).length()}>0)/*!
+ * ${tmpltHelper.convertDoc(${rtcParam.getDocActionOverView(8)})}
+ */
+#end
+#if(${rtcParam.IsNotImplemented(8)})/*#end
+
+RTC::ReturnCode_t ${rtcParam.name}::onReset(RTC::UniqueId ec_id)
+{
+#if(${tmpltHelper.checkDetailContent(8,${rtcParam})})${rtcParam.getDetailContent(8)}
+#end
+ return RTC::RTC_OK;
+}
+#if(${rtcParam.IsNotImplemented(8)})*/
+#end
+
+#if(${rtcParam.getDocActionOverView(10).length()}>0)/*!
+ * ${tmpltHelper.convertDoc(${rtcParam.getDocActionOverView(10)})}
+ */
+#end
+#if(${rtcParam.IsNotImplemented(10)})/*#end
+
+RTC::ReturnCode_t ${rtcParam.name}::onStateUpdate(RTC::UniqueId ec_id)
+{
+#if(${tmpltHelper.checkDetailContent(10,${rtcParam})})${rtcParam.getDetailContent(10)}
+#end
+ return RTC::RTC_OK;
+}
+#if(${rtcParam.IsNotImplemented(10)})*/
+#end
+
+#if(${rtcParam.getDocActionOverView(11).length()}>0)/*!
+ * ${tmpltHelper.convertDoc(${rtcParam.getDocActionOverView(11)})}
+ */
+#end
+#if(${rtcParam.IsNotImplemented(11)})/*#end
+
+RTC::ReturnCode_t ${rtcParam.name}::onRateChanged(RTC::UniqueId ec_id)
+{
+#if(${tmpltHelper.checkDetailContent(11,${rtcParam})})${rtcParam.getDetailContent(11)}
+#end
+ return RTC::RTC_OK;
+}
+#if(${rtcParam.IsNotImplemented(11)})*/
+#end
+
+bool ${rtcParam.name}::initializeIO(ControllerIO* io)
+{
+ return true;
+}
+
+bool ${rtcParam.name}::initializeSimulation(ControllerIO* io)
+{
+ return true;
+}
+
+bool ${rtcParam.name}::startSimulation()
+{
+ return true;
+}
+
+void ${rtcParam.name}::inputFromSimulator()
+{
+}
+
+void ${rtcParam.name}::outputToSimulator()
+{
+}
+
+void ${rtcParam.name}::stopSimulation()
+{
+}
+
+#if(${tmpltHelper.checkContents(${rtcParam.publicOpeSource})})${rtcParam.publicOpeSource}
+#end
+#if(${tmpltHelper.checkContents(${rtcParam.protectedOpeSource})})${rtcParam.protectedOpeSource}
+#end
+#if(${tmpltHelper.checkContents(${rtcParam.privateOpeSource})})${rtcParam.privateOpeSource}
+#end
+
+
+extern "C"
+{
+
+ void ${rtcParam.name}Init(RTC::Manager* manager)
+ {
+ coil::Properties profile(${rtcParam.name.toLowerCase()}_spec);
+ manager->registerFactory(profile,
+ RTC::Create<${rtcParam.name}>,
+ RTC::Delete<${rtcParam.name}>);
+ }
+
+};
+
+
Added: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/choreonoid/CXX_RTC.h.vsl
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/choreonoid/CXX_RTC.h.vsl (rev 0)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/choreonoid/CXX_RTC.h.vsl 2017-12-16 06:47:14 UTC (rev 785)
@@ -0,0 +1,578 @@
+// -*- C++ -*-
+/*!
+ * @file ${rtcParam.name}.h
+ * @brief ${rtcParam.description}
+ * @date ${dol}Date${dol}
+#parse("${template}/cpp/_doc.vsl")
+ * ${dol}Id${dol}
+ */
+
+${sharp}ifndef ${rtcParam.name.toUpperCase()}_H
+${sharp}define ${rtcParam.name.toUpperCase()}_H
+
+${sharp}include <cnoid/BodyIoRTC>
+${sharp}include <rtm/idl/BasicDataTypeSkel.h>
+${sharp}include <rtm/idl/ExtendedDataTypesSkel.h>
+${sharp}include <rtm/idl/InterfaceDataTypesSkel.h>
+
+// Service implementation headers
+// <rtc-template block="service_impl_h">
+#foreach($providerIdlFile in ${rtcParam.providerIdlPathes})
+${sharp}include "${tmpltHelper.getFilenameNoExt(${providerIdlFile.idlFile})}${tmpltHelper.serviceImplSuffix}.h"
+#end
+
+// </rtc-template>
+
+// Service Consumer stub headers
+// <rtc-template block="consumer_stub_h">
+#foreach($consumerIdlFile in ${rtcParam.consumerIdlPathes})
+${sharp}include "${tmpltHelper.getFilenameNoExt(${consumerIdlFile.idlFile})}${tmpltHelper.serviceStubSuffix}.h"
+#end
+
+// </rtc-template>
+
+// Service Consumer stub headers
+// <rtc-template block="port_stub_h">
+#foreach($type in ${cXXConv.getPortModules(${rtcParam})})
+${cXXConv.getDataportUsingNamespace(${type})}
+#end
+// </rtc-template>
+
+${sharp}include <rtm/Manager.h>
+${sharp}include <rtm/CorbaPort.h>
+${sharp}include <rtm/DataInPort.h>
+${sharp}include <rtm/DataOutPort.h>
+
+using namespace RTC;
+
+/*!
+ * @class ${rtcParam.name}
+ * @brief ${rtcParam.description}
+#if( ${rtcParam.docDescription.length()} > 0 )
+ *
+ * ${tmpltHelper.convertDoc(${rtcParam.docDescription})}
+#end
+#if( ${rtcParam.docInOut.length()} > 0 )
+ *
+ * ${tmpltHelper.convertDoc(${rtcParam.docInOut})}
+#end
+#if( ${rtcParam.docAlgorithm.length()} > 0 )
+ *
+ * ${tmpltHelper.convertDoc(${rtcParam.docAlgorithm})}
+#end
+#if( ${rtcParam.docReference.length()} > 0 )
+ *
+ * ${tmpltHelper.convertDoc(${rtcParam.docReference})}
+#end
+ *
+ */
+class ${rtcParam.name} : public BodyIoRTC {
+ public:
+ /*!
+ * @brief constructor
+ * @param manager Maneger Object
+ */
+ ${rtcParam.name}(RTC::Manager* manager);
+
+ /*!
+ * @brief destructor
+ */
+ ~${rtcParam.name}();
+
+ // <rtc-template block="public_attribute">
+#foreach($publicAttribute in ${rtcParam.publicAttributes})
+ ${publicAttribute}
+#end
+
+ // </rtc-template>
+
+ // <rtc-template block="public_operation">
+#foreach($publicOperation in ${rtcParam.publicOperations})
+ ${publicOperation}
+#end
+
+ // </rtc-template>
+
+ /***
+#if(${rtcParam.getDocActionOverView(0).length()}>0) * ${tmpltHelper.convertDescDoc(${rtcParam.getDocActionOverView(0)})}
+#end
+ *
+ * The initialize action (on CREATED->ALIVE transition)
+ * formaer rtc_init_entry()
+ *
+ * @return RTC::ReturnCode_t
+ *
+#if(${rtcParam.getDocActionPreCondition(0).length()}>0) * @pre ${tmpltHelper.convertPreDoc(${rtcParam.getDocActionPreCondition(0)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(0).length()}>0) * @post ${tmpltHelper.convertPostDoc(${rtcParam.getDocActionPostCondition(0)})}
+#end
+ *
+ */
+ #if(${rtcParam.configParams.size()}==0 && ${rtcParam.IsNotImplemented(0)} && ${rtcParam.inports.size()}==0 && ${rtcParam.outports.size()}==0 && ${rtcParam.servicePorts.size()}==0)//#end virtual RTC::ReturnCode_t onInitialize();
+
+ /***
+#if(${rtcParam.getDocActionOverView(0).length()}>0) * ${tmpltHelper.convertDescDoc(${rtcParam.getDocActionOverView(1)})}
+#end
+ *
+ * The finalize action (on ALIVE->END transition)
+ * formaer rtc_exiting_entry()
+ *
+ * @return RTC::ReturnCode_t
+ *
+#if(${rtcParam.getDocActionPreCondition(1).length()}>0) * @pre ${tmpltHelper.convertPreDoc(${rtcParam.getDocActionPreCondition(1)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(1).length()}>0) * @post ${tmpltHelper.convertPostDoc(${rtcParam.getDocActionPostCondition(1)})}
+#end
+ *
+ */
+ #if(${rtcParam.IsNotImplemented(1)})//#end virtual RTC::ReturnCode_t onFinalize();
+
+ /***
+#if(${rtcParam.getDocActionOverView(2).length()}>0) * ${tmpltHelper.convertDescDoc(${rtcParam.getDocActionOverView(2)})}
+#end
+ *
+ * The startup action when ExecutionContext startup
+ * former rtc_starting_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+#if(${rtcParam.getDocActionPreCondition(2).length()}>0) * @pre ${tmpltHelper.convertPreDoc(${rtcParam.getDocActionPreCondition(2)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(2).length()}>0) * @post ${tmpltHelper.convertPostDoc(${rtcParam.getDocActionPostCondition(2)})}
+#end
+ *
+ */
+ #if(${rtcParam.IsNotImplemented(2)})//#end virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
+
+ /***
+#if(${rtcParam.getDocActionOverView(3).length()}>0) * ${tmpltHelper.convertDescDoc(${rtcParam.getDocActionOverView(3)})}
+#end
+ *
+ * The shutdown action when ExecutionContext stop
+ * former rtc_stopping_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+#if(${rtcParam.getDocActionPreCondition(3).length()}>0) * @pre ${tmpltHelper.convertPreDoc(${rtcParam.getDocActionPreCondition(3)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(3).length()}>0) * @post ${tmpltHelper.convertPostDoc(${rtcParam.getDocActionPostCondition(3)})}
+#end
+ *
+ */
+ #if(${rtcParam.IsNotImplemented(3)})//#end virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
+
+ /***
+#if(${rtcParam.getDocActionOverView(4).length()}>0) * ${tmpltHelper.convertDescDoc(${rtcParam.getDocActionOverView(4)})}
+#end
+ *
+ * The activated action (Active state entry action)
+ * former rtc_active_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+#if(${rtcParam.getDocActionPreCondition(4).length()}>0) * @pre ${tmpltHelper.convertPreDoc(${rtcParam.getDocActionPreCondition(4)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(4).length()}>0) * @post ${tmpltHelper.convertPostDoc(${rtcParam.getDocActionPostCondition(4)})}
+#end
+ *
+ */
+ #if(${rtcParam.IsNotImplemented(4)})//#end virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id);
+
+ /***
+#if(${rtcParam.getDocActionOverView(5).length()}>0) * ${tmpltHelper.convertDescDoc(${rtcParam.getDocActionOverView(5)})}
+#end
+ *
+ * The deactivated action (Active state exit action)
+ * former rtc_active_exit()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+#if(${rtcParam.getDocActionPreCondition(5).length()}>0) * @pre ${tmpltHelper.convertPreDoc(${rtcParam.getDocActionPreCondition(5)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(5).length()}>0) * @post ${tmpltHelper.convertPostDoc(${rtcParam.getDocActionPostCondition(5)})}
+#end
+ *
+ */
+ #if(${rtcParam.IsNotImplemented(5)})//#end virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
+
+ /***
+#if(${rtcParam.getDocActionOverView(9).length()}>0) * ${tmpltHelper.convertDescDoc(${rtcParam.getDocActionOverView(9)})}
+#end
+ *
+ * The execution action that is invoked periodically
+ * former rtc_active_do()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+#if(${rtcParam.getDocActionPreCondition(9).length()}>0) * @pre ${tmpltHelper.convertPreDoc(${rtcParam.getDocActionPreCondition(9)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(9).length()}>0) * @post ${tmpltHelper.convertPostDoc(${rtcParam.getDocActionPostCondition(9)})}
+#end
+ *
+ */
+ #if(${rtcParam.IsNotImplemented(9)})//#end virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);
+
+ /***
+#if(${rtcParam.getDocActionOverView(6).length()}>0) * ${tmpltHelper.convertDescDoc(${rtcParam.getDocActionOverView(6)})}
+#end
+ *
+ * The aborting action when main logic error occurred.
+ * former rtc_aborting_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+#if(${rtcParam.getDocActionPreCondition(6).length()}>0) * @pre ${tmpltHelper.convertPreDoc(${rtcParam.getDocActionPreCondition(6)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(6).length()}>0) * @post ${tmpltHelper.convertPostDoc(${rtcParam.getDocActionPostCondition(6)})}
+#end
+ *
+ */
+ #if(${rtcParam.IsNotImplemented(6)})//#end virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
+
+ /***
+#if(${rtcParam.getDocActionOverView(7).length()}>0) * ${tmpltHelper.convertDescDoc(${rtcParam.getDocActionOverView(7)})}
+#end
+ *
+ * The error action in ERROR state
+ * former rtc_error_do()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+#if(${rtcParam.getDocActionPreCondition(7).length()}>0) * @pre ${tmpltHelper.convertPreDoc(${rtcParam.getDocActionPreCondition(7)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(7).length()}>0) * @post ${tmpltHelper.convertPostDoc(${rtcParam.getDocActionPostCondition(7)})}
+#end
+ *
+ */
+ #if(${rtcParam.IsNotImplemented(7)})//#end virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
+
+ /***
+#if(${rtcParam.getDocActionOverView(8).length()}>0) * ${tmpltHelper.convertDescDoc(${rtcParam.getDocActionOverView(8)})}
+#end
+ *
+ * The reset action that is invoked resetting
+ * This is same but different the former rtc_init_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+#if(${rtcParam.getDocActionPreCondition(8).length()}>0) * @pre ${tmpltHelper.convertPreDoc(${rtcParam.getDocActionPreCondition(8)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(8).length()}>0) * @post ${tmpltHelper.convertPostDoc(${rtcParam.getDocActionPostCondition(8)})}
+#end
+ *
+ */
+ #if(${rtcParam.IsNotImplemented(8)})//#end virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
+
+ /***
+#if(${rtcParam.getDocActionOverView(10).length()}>0) * ${tmpltHelper.convertDescDoc(${rtcParam.getDocActionOverView(10)})}
+#end
+ *
+ * The state update action that is invoked after onExecute() action
+ * no corresponding operation exists in OpenRTm-aist-0.2.0
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+#if(${rtcParam.getDocActionPreCondition(10).length()}>0) * @pre ${tmpltHelper.convertPreDoc(${rtcParam.getDocActionPreCondition(10)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(10).length()}>0) * @post ${tmpltHelper.convertPostDoc(${rtcParam.getDocActionPostCondition(10)})}
+#end
+ *
+ */
+ #if(${rtcParam.IsNotImplemented(10)})//#end virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
+
+ /***
+#if(${rtcParam.getDocActionOverView(11).length()}>0) * ${tmpltHelper.convertDescDoc(${rtcParam.getDocActionOverView(11)})}
+#end
+ *
+ * The action that is invoked when execution context's rate is changed
+ * no corresponding operation exists in OpenRTm-aist-0.2.0
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+#if(${rtcParam.getDocActionPreCondition(11).length()}>0) * @pre ${tmpltHelper.convertPreDoc(${rtcParam.getDocActionPreCondition(11)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(11).length()}>0) * @post ${tmpltHelper.convertPostDoc(${rtcParam.getDocActionPostCondition(11)})}
+#end
+ *
+ */
+ #if(${rtcParam.IsNotImplemented(11)})//#end virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The action that is invoked when execution context's rate is changed
+ * no corresponding operation exists in OpenRTm-aist-0.2.0
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ virtual bool initializeIO(ControllerIO* io) override;
+
+ /***
+ *
+ * The action that is invoked when execution context's rate is changed
+ * no corresponding operation exists in OpenRTm-aist-0.2.0
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ virtual bool initializeSimulation(ControllerIO* io) override;
+
+ /***
+ *
+ * The action that is invoked when execution context's rate is changed
+ * no corresponding operation exists in OpenRTm-aist-0.2.0
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ virtual bool startSimulation() override;
+
+ /***
+ *
+ * The action that is invoked when execution context's rate is changed
+ * no corresponding operation exists in OpenRTm-aist-0.2.0
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ virtual void inputFromSimulator() override;
+
+ /***
+ *
+ * The action that is invoked when execution context's rate is changed
+ * no corresponding operation exists in OpenRTm-aist-0.2.0
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ virtual void outputToSimulator() override;
+
+ /***
+ *
+ * The action that is invoked when execution context's rate is changed
+ * no corresponding operation exists in OpenRTm-aist-0.2.0
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ virtual void stopSimulation() override;
+
+ protected:
+ // <rtc-template block="protected_attribute">
+#foreach($protectedAttribute in ${rtcParam.protectedAttributes})
+ ${protectedAttribute}
+#end
+
+ // </rtc-template>
+
+ // <rtc-template block="protected_operation">
+#foreach($protectedOperation in ${rtcParam.protectedOperations})
+ ${protectedOperation}
+#end
+
+ // </rtc-template>
+
+ // Configuration variable declaration
+ // <rtc-template block="config_declare">
+#if( ${rtcParam.configParams.size()} > 0 )
+#foreach($configParam in ${rtcParam.configParams})
+ /*!
+ * ${tmpltHelper.convertDescDoc(${configParam.docDescription})}
+ * - Name: ${configParam.docDataName} ${configParam.tmplVarName}
+ * - DefaultValue: ${configParam.defaultVal}
+#if(${configParam.docUnit.length()}>0) * - Unit: ${tmpltHelper.convertUnitDoc(${configParam.docUnit})}
+#end
+#if(${configParam.docRange.length()}>0) * - Range: ${tmpltHelper.convertRangeDoc(${configParam.docRange})}
+#end
+#if(${configParam.docConstraint.length()}>0) * - Constraint: ${tmpltHelper.convertConstraintDoc(${configParam.docConstraint})}
+#end
+ */
+ ${cXXConv.convConfigSetType(${configParam.type})} ${rtcParam.commonPrefix}${rtcParam.configurationPrefix}${configParam.tmplVarName}${rtcParam.configurationSuffix}${rtcParam.commonSuffix};
+#end
+#end
+
+ // </rtc-template>
+
+ // DataInPort declaration
+ // <rtc-template block="inport_declare">
+#foreach($port in ${rtcParam.inports})
+#if(${port.type}!="") ${port.type} ${rtcParam.commonPrefix}${rtcParam.dataPortPrefix}${port.tmplVarName}${rtcParam.dataPortSuffix}${rtcParam.commonSuffix};
+ /*!
+#if(${port.docDescription.length()}>0) * ${tmpltHelper.convertDescDoc(${port.docDescription})}
+#end
+#if(${port.docType.length()}>0) * - Type: ${tmpltHelper.convertTypeDoc(${port.docType})}
+#end
+#if(${port.docNum.length()}>0) * - Number: ${tmpltHelper.convertNumberDoc(${port.docNum})}
+#end
+#if(${port.docSemantics.length()}>0) * - Semantics: ${tmpltHelper.convertSemanticsDoc(${port.docSemantics})}
+#end
+#if(${port.docUnit.length()}>0) * - Unit: ${tmpltHelper.convertUnitDoc(${port.docUnit})}
+#end
+#if(${port.docOccurrence.length()}>0) * - Frequency: ${tmpltHelper.convertFrequencyDoc(${port.docOccurrence})}
+#end
+#if(${port.docOperation.length()}>0) * - Operation Cycle: ${tmpltHelper.convertCycleDoc(${port.docOperation})}
+#end
+ */
+ InPort<${port.type}> ${rtcParam.commonPrefix}${rtcParam.dataPortPrefix}${port.tmplVarName}In${rtcParam.dataPortSuffix}${rtcParam.commonSuffix};
+#end
+#end
+
+ // </rtc-template>
+
+
+ // DataOutPort declaration
+ // <rtc-template block="outport_declare">
+#foreach($port in ${rtcParam.outports})
+#if(${port.type}!="") ${port.type} ${rtcParam.commonPrefix}${rtcParam.dataPortPrefix}${port.tmplVarName}${rtcParam.dataPortSuffix}${rtcParam.commonSuffix};
+ /*!
+#if(${port.docDescription.length()}>0) * ${tmpltHelper.convertDescDoc(${port.docDescription})}
+#end
+#if(${port.docType.length()}>0) * - Type: ${tmpltHelper.convertTypeDoc(${port.docType})}
+#end
+#if(${port.docNum.length()}>0) * - Number: ${tmpltHelper.convertNumberDoc(${port.docNum})}
+#end
+#if(${port.docSemantics.length()}>0) * - Semantics: ${tmpltHelper.convertSemanticsDoc(${port.docSemantics})}
+#end
+#if(${port.docUnit.length()}>0) * - Unit: ${tmpltHelper.convertUnitDoc(${port.docUnit})}
+#end
+#if(${port.docOccurrence.length()}>0) * - Frequency: ${tmpltHelper.convertFrequencyDoc(${port.docOccurrence})}
+#end
+#if(${port.docOperation.length()}>0) * - Operation Cycle: ${tmpltHelper.convertCycleDoc(${port.docOperation})}
+#end
+ */
+ OutPort<${port.type}> ${rtcParam.commonPrefix}${rtcParam.dataPortPrefix}${port.tmplVarName}Out${rtcParam.dataPortSuffix}${rtcParam.commonSuffix};
+#end
+#end
+
+ // </rtc-template>
+
+ // CORBA Port declaration
+ // <rtc-template block="corbaport_declare">
+#if(${rtcParam.servicePorts.size()}>0)
+#foreach($servicePort in ${rtcParam.servicePorts})
+#if(${servicePort.servicePortInterfaces.size()}>0)
+ /*!
+#if(${servicePort.docDescription.length()}>0) * ${tmpltHelper.convertDescDoc(${servicePort.docDescription})}
+#end
+#if(${servicePort.docIfDescription.length()}>0) * Interface: ${tmpltHelper.convertInterfaceDoc(${servicePort.docIfDescription})}
+#end
+ */
+ RTC::CorbaPort ${rtcParam.commonPrefix}${rtcParam.servicePortPrefix}${servicePort.name}Port${rtcParam.servicePortSuffix}${rtcParam.commonSuffix};
+#end#end#end
+
+ // </rtc-template>
+
+ // Service declaration
+ // <rtc-template block="service_declare">
+#if(${rtcParam.servicePorts.size()}>0)
+#foreach($servicePort in ${rtcParam.servicePorts})
+#if(${servicePort.servicePortInterfaces.size()}>0)
+#foreach($serviceInterface in ${servicePort.servicePortInterfaces})
+#if(${serviceInterface.index}==0)
+ /*!
+#if(${serviceInterface.docDescription.length()}>0) * ${tmpltHelper.convertDescDoc(${serviceInterface.docDescription})}
+#end
+#if(${serviceInterface.docArgument.length()}>0) * - Argument: ${tmpltHelper.convertInterfaceDetailDoc(${serviceInterface.docArgument})}
+#end
+#if(${serviceInterface.docReturn.length()}>0) * - Return Value: ${tmpltHelper.convertInterfaceDetailDoc(${serviceInterface.docReturn})}
+#end
+#if(${serviceInterface.docException.length()}>0) * - Exception: ${tmpltHelper.convertInterfaceDetailDoc(${serviceInterface.docException})}
+#end
+#if(${serviceInterface.docPreCondition.length()}>0) * - PreCondition: ${tmpltHelper.convertInterfaceDetailDoc(${serviceInterface.docPreCondition})}
+#end
+#if(${serviceInterface.docPostCondition.length()}>0) * - PostCondition: ${tmpltHelper.convertInterfaceDetailDoc(${serviceInterface.docPostCondition})}
+#end
+ */
+ ${serviceInterface.interfaceRawType}${tmpltHelper.serviceImplSuffix} ${rtcParam.commonPrefix}${rtcParam.serviceIFPrefix}${serviceInterface.tmplVarName}${rtcParam.serviceIFSuffix}${rtcParam.commonSuffix};
+#end#end#end#end#end
+
+ // </rtc-template>
+
+ // Consumer declaration
+ // <rtc-template block="consumer_declare">
+#if(${rtcParam.servicePorts.size()}>0)
+#foreach($servicePort in ${rtcParam.servicePorts})
+#if(${servicePort.servicePortInterfaces.size()}>0)
+#foreach($serviceInterface in ${servicePort.servicePortInterfaces})
+#if(${serviceInterface.index}==1)
+ /*!
+#if(${serviceInterface.docDescription.length()}>0) * ${tmpltHelper.convertDescDoc(${serviceInterface.docDescription})}
+#end
+#if(${serviceInterface.docArgument.length()}>0) * - Argument: ${tmpltHelper.convertInterfaceDetailDoc(${serviceInterface.docArgument})}
+#end
+#if(${serviceInterface.docReturn.length()}>0) * - Return Value: ${tmpltHelper.convertInterfaceDetailDoc(${serviceInterface.docReturn})}
+#end
+#if(${serviceInterface.docException.length()}>0) * - Exception: ${tmpltHelper.convertInterfaceDetailDoc(${serviceInterface.docException})}
+#end
+#if(${serviceInterface.docPreCondition.length()}>0) * - PreCondition: ${tmpltHelper.convertInterfaceDetailDoc(${serviceInterface.docPreCondition})}
+#end
+#if(${serviceInterface.docPostCondition.length()}>0) * - PostCondition: ${tmpltHelper.convertInterfaceDetailDoc(${serviceInterface.docPostCondition})}
+#end
+ */
+ RTC::CorbaConsumer<${serviceInterface.interfaceType}> ${rtcParam.commonPrefix}${rtcParam.serviceIFPrefix}${serviceInterface.tmplVarName}${rtcParam.serviceIFSuffix}${rtcParam.commonSuffix};
+#end#end#end#end#end
+
+ // </rtc-template>
+
+ private:
+ // <rtc-template block="private_attribute">
+#foreach($privateAttribute in ${rtcParam.privateAttributes})
+ ${privateAttribute}
+#end
+
+ // </rtc-template>
+
+ // <rtc-template block="private_operation">
+#foreach($privateOperation in ${rtcParam.privateOperations})
+ ${privateOperation}
+#end
+
+ // </rtc-template>
+
+};
+
+
+extern "C"
+{
+ DLL_EXPORT void ${rtcParam.name}Init(RTC::Manager* manager);
+};
+
+#endif // ${rtcParam.name.toUpperCase()}_H
Added: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/common/README_Choreonoid.vsl
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/common/README_Choreonoid.vsl (rev 0)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/common/README_Choreonoid.vsl 2017-12-16 06:47:14 UTC (rev 785)
@@ -0,0 +1,305 @@
+======================================================================
+ RTComponent: ${rtcParam.name} specificatioin
+
+ OpenRTM-aist-${rtcParam.rtmVersion}
+#set( $Date$ = "dummy" )
+ Date: \$Date$
+#if( ${rtcParam.docCreator.length()} > 0 )
+
+ @author ${tmpltHelper.convertReadMeAuthorDoc(${rtcParam.docCreator})}
+#end
+#if( ${rtcParam.docLicense.length()} > 0 )
+
+ ${tmpltHelper.convertReadMeCopyRightDoc(${rtcParam.docLicense})}
+#end
+
+ This file is generated by rtc-template with the following argments.
+
+#parse("${template}/common/_commandline.vsl")
+
+
+======================================================================
+ Basic Information
+======================================================================
+# <rtc-template block="module">
+Module Name: ${rtcParam.name}
+Description: ${rtcParam.description}
+Version: ${rtcParam.version}
+Vendor: ${rtcParam.vender}
+Category: ${rtcParam.category}
+Kind: ${rtcParam.componentKind}
+Comp. Type: ${rtcParam.componentType}
+Act. Type: ${rtcParam.activityType}
+MAX Inst.: ${rtcParam.maxInstance}
+Lang: ${rtcParam.language}
+Lang Type:
+
+#if(${rtcParam.docDescription.length()}>0)Overview: ${tmpltHelper.convertReadMeModuleDoc(${rtcParam.docDescription})}
+#end
+#if(${rtcParam.docInOut.length()}>0)In/Out: ${tmpltHelper.convertReadMeModuleDoc(${rtcParam.docInOut})}
+#end
+#if(${rtcParam.docAlgorithm.length()}>0)Algorithm: ${tmpltHelper.convertReadMeModuleDoc(${rtcParam.docAlgorithm})}
+#end
+#if(${rtcParam.docReference.length()}>0)Reference: ${tmpltHelper.convertReadMeModuleDoc(${rtcParam.docReference})}
+#end
+# </rtc-template>
+
+
+======================================================================
+ Activity definition
+======================================================================
+
+[on_initialize]#if(!${rtcParam.IsNotImplemented(0)}) implemented#end
+
+#if(${rtcParam.getDocActionOverView(0).length()}>0) Description: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionOverView(0)})}
+#end
+#if(${rtcParam.getDocActionPreCondition(0).length()}>0) PreCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPreCondition(0)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(0).length()}>0) PostCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPostCondition(0)})}
+#end
+
+[on_finalize]#if(!${rtcParam.IsNotImplemented(1)}) implemented#end
+
+#if(${rtcParam.getDocActionOverView(1).length()}>0) Description: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionOverView(1)})}
+#end
+#if(${rtcParam.getDocActionPreCondition(1).length()}>0) PreCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPreCondition(1)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(1).length()}>0) PostCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPostCondition(1)})}
+#end
+
+[on_startup]#if(!${rtcParam.IsNotImplemented(2)}) implemented#end
+
+#if(${rtcParam.getDocActionOverView(2).length()}>0) Description: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionOverView(2)})}
+#end
+#if(${rtcParam.getDocActionPreCondition(2).length()}>0) PreCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPreCondition(2)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(2).length()}>0) PostCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPostCondition(2)})}
+#end
+
+[on_shutdown]#if(!${rtcParam.IsNotImplemented(3)}) implemented#end
+
+#if(${rtcParam.getDocActionOverView(3).length()}>0) Description: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionOverView(3)})}
+#end
+#if(${rtcParam.getDocActionPreCondition(3).length()}>0) PreCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPreCondition(3)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(3).length()}>0) PostCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPostCondition(3)})}
+#end
+
+[on_activated]#if(!${rtcParam.IsNotImplemented(4)}) implemented#end
+
+#if(${rtcParam.getDocActionOverView(4).length()}>0) Description: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionOverView(4)})}
+#end
+#if(${rtcParam.getDocActionPreCondition(4).length()}>0) PreCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPreCondition(4)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(4).length()}>0) PostCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPostCondition(4)})}
+#end
+
+[on_deactivated]#if(!${rtcParam.IsNotImplemented(5)}) implemented#end
+
+#if(${rtcParam.getDocActionOverView(5).length()}>0) Description: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionOverView(5)})}
+#end
+#if(${rtcParam.getDocActionPreCondition(5).length()}>0) PreCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPreCondition(5)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(5).length()}>0) PostCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPostCondition(5)})}
+#end
+
+[on_execute]#if(!${rtcParam.IsNotImplemented(9)}) implemented#end
+
+#if(${rtcParam.getDocActionOverView(9).length()}>0) Description: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionOverView(9)})}
+#end
+#if(${rtcParam.getDocActionPreCondition(9).length()}>0) PreCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPreCondition(9)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(9).length()}>0) PostCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPostCondition(9)})}
+#end
+
+[on_aborting]#if(!${rtcParam.IsNotImplemented(6)}) implemented#end
+
+#if(${rtcParam.getDocActionOverView(6).length()}>0) Description: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionOverView(6)})}
+#end
+#if(${rtcParam.getDocActionPreCondition(6).length()}>0) PreCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPreCondition(6)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(6).length()}>0) PostCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPostCondition(6)})}
+#end
+
+[on_error]#if(!${rtcParam.IsNotImplemented(7)}) implemented#end
+
+#if(${rtcParam.getDocActionOverView(7).length()}>0) Description: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionOverView(7)})}
+#end
+#if(${rtcParam.getDocActionPreCondition(7).length()}>0) PreCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPreCondition(7)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(7).length()}>0) PostCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPostCondition(7)})}
+#end
+
+[on_reset]#if(!${rtcParam.IsNotImplemented(8)}) implemented#end
+
+#if(${rtcParam.getDocActionOverView(8).length()}>0) Description: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionOverView(8)})}
+#end
+#if(${rtcParam.getDocActionPreCondition(8).length()}>0) PreCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPreCondition(8)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(8).length()}>0) PostCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPostCondition(8)})}
+#end
+
+[on_state_update]#if(!${rtcParam.IsNotImplemented(10)}) implemented#end
+
+#if(${rtcParam.getDocActionOverView(10).length()}>0) Description: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionOverView(10)})}
+#end
+#if(${rtcParam.getDocActionPreCondition(10).length()}>0) PreCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPreCondition(10)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(10).length()}>0) PostCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPostCondition(10)})}
+#end
+
+[on_rate_changed]#if(!${rtcParam.IsNotImplemented(11)}) implemented#end
+
+#if(${rtcParam.getDocActionOverView(11).length()}>0) Description: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionOverView(11)})}
+#end
+#if(${rtcParam.getDocActionPreCondition(11).length()}>0) PreCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPreCondition(11)})}
+#end
+#if(${rtcParam.getDocActionPostCondition(11).length()}>0) PostCondition: ${tmpltHelper.convertReadMeActivityDoc(${rtcParam.getDocActionPostCondition(11)})}
+#end
+
+[initializeIO] implemented
+
+ Description:
+ PreCondition:
+ PostCondition:
+
+[initializeSimulation] implemented
+
+ Description:
+ PreCondition:
+ PostCondition:
+
+[startSimulation] implemented
+
+ Description:
+ PreCondition:
+ PostCondition:
+
+[inputFromSimulator] implemented
+
+ Description:
+ PreCondition:
+ PostCondition:
+
+[outputToSimulator] implemented
+
+ Description:
+ PreCondition:
+ PostCondition:
+
+[stopSimulation] implemented
+
+ Description:
+ PreCondition:
+ PostCondition:
+
+======================================================================
+ InPorts definition
+======================================================================
+# <rtc-template block="inport">
+
+#foreach($port in ${rtcParam.inports})
+ Name: ${port.name}
+ PortNumber: #set($count= ${velocityCount} - 1)$count
+ Description: ${tmpltHelper.convertReadMePortDoc(${port.docDescription})}
+ PortType:
+ DataType: ${port.type}
+ MaxOut:
+ [Data Elements]
+ Name:
+ Type: ${tmpltHelper.convertReadMePortDetailDoc(${port.docType})}
+ Number: ${tmpltHelper.convertReadMePortDetailDoc(${port.docNum})}
+ Semantics: ${tmpltHelper.convertReadMePortDetailDoc(${port.docSemantics})}
+ Unit: ${tmpltHelper.convertReadMePortDetailDoc(${port.docUnit})}
+ Frequency: ${tmpltHelper.convertReadMePortDetailDoc(${port.docOccurrence})}
+ Operation Cycle: ${tmpltHelper.convertReadMePortDetailDoc(${port.docOperation})}
+ RangeLow:
+ RangeHigh:
+ DefaultValue:
+
+#end
+
+# </rtc-template>
+
+======================================================================
+ OutPorts definition
+======================================================================
+# <rtc-template block="outport">
+
+#foreach($port in ${rtcParam.outports})
+ Name: ${port.name}
+ PortNumber: #set($count= ${velocityCount} - 1)$count
+ Description: ${tmpltHelper.convertReadMePortDoc(${port.docDescription})}
+ PortType:
+ DataType: ${port.type}
+ MaxOut:
+ [Data Elements]
+ Name:
+ Type: ${tmpltHelper.convertReadMePortDetailDoc(${port.docType})}
+ Number: ${tmpltHelper.convertReadMePortDetailDoc(${port.docNum})}
+ Semantics: ${tmpltHelper.convertReadMePortDetailDoc(${port.docSemantics})}
+ Unit: ${tmpltHelper.convertReadMePortDetailDoc(${port.docUnit})}
+ Frequency: ${tmpltHelper.convertReadMePortDetailDoc(${port.docOccurrence})}
+ Operation Cycle: ${tmpltHelper.convertReadMePortDetailDoc(${port.docOperation})}
+ RangeLow:
+ RangeHigh:
+ DefaultValue:
+
+#end
+
+# </rtc-template>
+
+
+======================================================================
+ Service Port definition
+======================================================================
+# <rtc-template block="serviceport">
+#if(${rtcParam.servicePorts.size()}>0)
+#foreach($servicePort in ${rtcParam.servicePorts})
+#if(${servicePort.servicePortInterfaces.size()}>0)
+ PortName: ${servicePort.name}
+ Description: ${tmpltHelper.convertReadMePortDoc(${servicePort.docDescription})}
+ Interface: ${tmpltHelper.convertReadMePortDoc(${servicePort.docIfDescription})}
+#foreach($serviceInterface in ${servicePort.servicePortInterfaces})
+#if(${serviceInterface.index}==0)
+ [Service Provider Interfaces]
+#else
+ [Service Consumer Interfaces]
+#end
+ Name: ${serviceInterface.name}
+ Type: ${serviceInterface.interfaceType}
+ Description: ${tmpltHelper.convertReadMeInterfaceDoc(${serviceInterface.docDescription})}
+ Argument: ${tmpltHelper.convertReadMeInterfaceDoc(${serviceInterface.docArgument})}
+ Return Value: ${tmpltHelper.convertReadMeInterfaceDoc(${serviceInterface.docReturn})}
+ Exception: ${tmpltHelper.convertReadMeInterfaceDoc(${serviceInterface.docException})}
+ PreCondition: ${tmpltHelper.convertReadMeInterfaceDoc(${serviceInterface.docPreCondition})}
+ PostCondition: ${tmpltHelper.convertReadMeInterfaceDoc(${serviceInterface.docPostCondition})}
+#end#end#end#end
+# </rtc-template>
+
+======================================================================
+ Configuration definition
+======================================================================
+# <rtc-template block="configuration">
+#if( ${rtcParam.configParams.size()} > 0 )
+ Configuration:
+#foreach($configParam in ${rtcParam.configParams})
+ Name: ${configParam.docDataName} ${configParam.name}
+ Description: ${tmpltHelper.convertReadMeConfigDoc(${configParam.docDescription})}
+ Type: ${configParam.type}
+ DefaultValue: ${configParam.docDefaultVal} ${configParam.defaultVal}
+ Unit: ${tmpltHelper.convertReadMeConfigDoc(${configParam.docUnit})}
+ Range: ${tmpltHelper.convertReadMeConfigDoc(${configParam.docRange})}
+ Constraint: ${tmpltHelper.convertReadMeConfigDoc(${configParam.docConstraint})}
+
+#end
+#end
+# </rtc-template>
+
+This software is developed at the National Institute of Advanced
+Industrial Science and Technology. Approval number H23PRO-????. This
+software is licensed under the Lesser General Public License. See
+COPYING.LESSER.
+
+This area is reserved for future OpenRTM.
+
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java 2017-12-10 16:22:54 UTC (rev 784)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java 2017-12-16 06:47:14 UTC (rev 785)
@@ -218,6 +218,10 @@
}
protected Text createLabelAndText(FormToolkit toolkit, Composite composite,
String labelString, int style, int color) {
+ return createLabelAndText(toolkit, composite, labelString, style, color, 1);
+ }
+ protected Text createLabelAndText(FormToolkit toolkit, Composite composite,
+ String labelString, int style, int color, int hspan) {
if( labelString!=null && labelString.length()>0 ) {
Label label = toolkit.createLabel(composite, labelString);
if(color>0 ) label.setForeground(getSite().getShell().getDisplay().getSystemColor(color));
@@ -253,6 +257,7 @@
});
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
+ gridData.horizontalSpan = hspan;
text.setLayoutData(gridData);
return text;
}
@@ -264,6 +269,10 @@
protected Combo createLabelAndCombo(FormToolkit toolkit, Composite composite,
String labelString, String[] items, int color) {
+ return createLabelAndCombo(toolkit, composite, labelString, items, color, 1);
+ }
+ protected Combo createLabelAndCombo(FormToolkit toolkit, Composite composite,
+ String labelString, String[] items, int color, int hspan) {
Label label = toolkit.createLabel(composite, labelString);
if(color>0 ) label.setForeground(getSite().getShell().getDisplay().getSystemColor(color));
Combo combo = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
@@ -278,6 +287,7 @@
public void widgetSelected(SelectionEvent e){ update();}
});
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
+ gridData.horizontalSpan = hspan;
combo.setLayoutData(gridData);
return combo;
@@ -341,6 +351,10 @@
}
protected Combo createEditableCombo(FormToolkit toolkit, Composite composite,
String labelString, String key, String[] defaultValue, int color) {
+ return createEditableCombo(toolkit, composite, labelString, key, defaultValue, color, 1);
+ }
+ protected Combo createEditableCombo(FormToolkit toolkit, Composite composite,
+ String labelString, String key, String[] defaultValue, int color, int hspan) {
Label label = toolkit.createLabel(composite, labelString);
if(color>0) label.setForeground(getSite().getShell().getDisplay().getSystemColor(color));
Combo combo = new Combo(composite, SWT.DROP_DOWN);
@@ -359,6 +373,7 @@
public void widgetSelected(SelectionEvent e){ update(); }
});
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
+ gridData.horizontalSpan = hspan;
combo.setLayoutData(gridData);
return combo;
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/BasicEditorFormPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/BasicEditorFormPage.java 2017-12-10 16:22:54 UTC (rev 784)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/BasicEditorFormPage.java 2017-12-16 06:47:14 UTC (rev 785)
@@ -71,6 +71,7 @@
*/
private static final String CATEGORY_INDEX_KEY = BasicEditorFormPage.class.getName() + ".category.name";
private final String CATEGORY_COMPOSITE = "composite.";
+ private final String KIND_CHOREONOID = "BodyIoRTC";
private Text nameText;
private Combo categoryCombo;
@@ -86,6 +87,9 @@
private Button dataFlowBtn;
private Button fsmBtn;
private Button multiModeBtn;
+ private Group compGroup;
+ private Button choreonoidBtn;
+
private Text rtcTypeText;
private Button generateButton;
@@ -218,7 +222,8 @@
//Component Kind
if( !dataFlowBtn.getSelection() &&
!fsmBtn.getSelection() &&
- !multiModeBtn.getSelection() ) {
+ !multiModeBtn.getSelection() &&
+ !choreonoidBtn.getSelection() ) {
result = "Please Select Component Kind.";
}
//Composite Component
@@ -233,26 +238,27 @@
private void createModuleSection(FormToolkit toolkit, ScrolledForm form) {
Composite composite = createSectionBaseWithLabel(toolkit, form,
- IMessageConstants.BASIC_COMPONENT_TITLE, IMessageConstants.BASIC_COMPONENT_EXPL, 2);
+ IMessageConstants.BASIC_COMPONENT_TITLE, IMessageConstants.BASIC_COMPONENT_EXPL, 3);
//
nameText = createLabelAndText(toolkit, composite,
- IMessageConstants.REQUIRED + IMessageConstants.BASIC_LBL_MODULENAME, SWT.NONE, SWT.COLOR_RED);
- descriptionText = createLabelAndText(toolkit, composite, IMessageConstants.BASIC_LBL_DESCRIPTION);
+ IMessageConstants.REQUIRED + IMessageConstants.BASIC_LBL_MODULENAME, SWT.NONE, SWT.COLOR_RED, 2);
+ descriptionText = createLabelAndText(toolkit, composite, IMessageConstants.BASIC_LBL_DESCRIPTION, SWT.NONE, SWT.COLOR_BLACK, 2);
versionText = createLabelAndText(toolkit, composite,
- IMessageConstants.REQUIRED + IMessageConstants.BASIC_LBL_VERSION, SWT.NONE, SWT.COLOR_RED);
+ IMessageConstants.REQUIRED + IMessageConstants.BASIC_LBL_VERSION, SWT.NONE, SWT.COLOR_RED, 2);
venderText = createLabelAndText(toolkit, composite,
- IMessageConstants.REQUIRED + IMessageConstants.BASIC_LBL_VENDOR, SWT.NONE, SWT.COLOR_RED);
+ IMessageConstants.REQUIRED + IMessageConstants.BASIC_LBL_VENDOR, SWT.NONE, SWT.COLOR_RED, 2);
String[] defaultCategory = {};
categoryCombo = createEditableCombo(toolkit, composite,
IMessageConstants.REQUIRED + IMessageConstants.BASIC_LBL_CATEGORY,
- CATEGORY_INDEX_KEY, defaultCategory, SWT.COLOR_RED);
+ CATEGORY_INDEX_KEY, defaultCategory, SWT.COLOR_RED, 2);
typeCombo = createLabelAndCombo(toolkit, composite, IMessageConstants.BASIC_LBL_COMPONENT_TYPE,
- IRtcBuilderConstants.COMPONENT_TYPE_ITEMS);
+ IRtcBuilderConstants.COMPONENT_TYPE_ITEMS, SWT.COLOR_BLACK, 2);
activityTypeCombo = createLabelAndCombo(toolkit, composite, IMessageConstants.BASIC_LBL_ACTIVITY_TYPE,
- IRtcBuilderConstants.ACTIVITY_TYPE_ITEMS);
+ IRtcBuilderConstants.ACTIVITY_TYPE_ITEMS, SWT.COLOR_BLACK, 2);
//
toolkit.createLabel(composite, IMessageConstants.BASIC_LBL_COMPONENT_KIND);
- Group compGroup = new Group(composite, SWT.NONE);
+
+ compGroup = new Group(composite, SWT.NONE);
compGroup.setLayout(new GridLayout(3, false));
GridData gd = new GridData();
compGroup.setLayoutData(gd);
@@ -259,17 +265,20 @@
dataFlowBtn = createRadioCheckButton(toolkit, compGroup, "DataFlow", SWT.CHECK);
fsmBtn = createRadioCheckButton(toolkit, compGroup, "FSM", SWT.CHECK);
multiModeBtn = createRadioCheckButton(toolkit, compGroup, "MultiMode", SWT.CHECK);
+
+ choreonoidBtn = createRadioCheckButton(toolkit, composite, "Choreonoid", SWT.CHECK);
//
- maxInstanceText = createLabelAndText(toolkit, composite, IMessageConstants.BASIC_LBL_MAX_INSTANCES);
+ maxInstanceText = createLabelAndText(toolkit, composite, IMessageConstants.BASIC_LBL_MAX_INSTANCES, SWT.NONE, SWT.COLOR_BLACK, 2);
executionTypeCombo = createLabelAndCombo(toolkit, composite, IMessageConstants.BASIC_LBL_EXECUTION_TYPE,
- IRtcBuilderConstants.EXECUTIONCONTEXT_TYPE_ITEMS);
- executionRateText = createLabelAndText(toolkit, composite, IMessageConstants.BASIC_LBL_EXECUTION_RATE);
+ IRtcBuilderConstants.EXECUTIONCONTEXT_TYPE_ITEMS, SWT.COLOR_BLACK, 2);
+ executionRateText = createLabelAndText(toolkit, composite, IMessageConstants.BASIC_LBL_EXECUTION_RATE, SWT.NONE, SWT.COLOR_BLACK, 2);
abstractText = createLabelAndText(toolkit, composite, IMessageConstants.BASIC_LBL_ABSTRACT, SWT.MULTI | SWT.V_SCROLL | SWT.WRAP);
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.heightHint = 50;
gridData.widthHint = 100;
+ gridData.horizontalSpan = 2;
abstractText.setLayoutData(gridData);
- rtcTypeText = createLabelAndText(toolkit, composite, IMessageConstants.BASIC_LBL_RTCTYPE);
+ rtcTypeText = createLabelAndText(toolkit, composite, IMessageConstants.BASIC_LBL_RTCTYPE, SWT.NONE, SWT.COLOR_BLACK, 2);
}
private void createHintSection(FormToolkit toolkit, ScrolledForm form) {
@@ -606,9 +615,15 @@
rtcParam.setCategory(getText(categoryCombo.getText()));
rtcParam.setActivityType(getText(activityTypeCombo.getText()));
rtcParam.setComponentType(getText(typeCombo.getText()));
- rtcParam.setComponentKind(getSelectedCompKind());
+ if(choreonoidBtn.getSelection()) {
+ rtcParam.setComponentKind(KIND_CHOREONOID);
+ } else {
+ rtcParam.setComponentKind(getSelectedCompKind());
+ }
rtcParam.setAbstract(getText(abstractText.getText()));
rtcParam.setRtcType(getText(rtcTypeText.getText()));
+
+ rtcParam.setChoreonoid(choreonoidBtn.getSelection());
try {
int maxInstance = Integer.parseInt(getText(maxInstanceText
@@ -629,6 +644,18 @@
//executionRateText.setText(String.valueOf(rtcParam.getExecutionRate()));
}
+ if(choreonoidBtn.getSelection()) {
+ dataFlowBtn.setEnabled(false);
+ fsmBtn.setEnabled(false);
+ multiModeBtn.setEnabled(false);
+ compGroup.setEnabled(false);
+ } else {
+ dataFlowBtn.setEnabled(true);
+ fsmBtn.setEnabled(true);
+ multiModeBtn.setEnabled(true);
+ compGroup.setEnabled(true);
+ }
+
editor.updateEMFModuleName(getText(nameText.getText()));
editor.updateDirty();
}
@@ -664,6 +691,7 @@
if( type.contains("DataFlow") ) dataFlowBtn.setSelection(true);
if( type.contains("FiniteStateMachine") ) fsmBtn.setSelection(true);
if( type.contains("MultiMode") ) multiModeBtn.setSelection(true);
+ if( type.contains(KIND_CHOREONOID) ) choreonoidBtn.setSelection(true);
}
private String getSelectedCompKind() {
StringBuffer result = new StringBuffer();
@@ -685,8 +713,8 @@
}
@Override
- protected Combo createEditableCombo(FormToolkit toolkit, Composite composite, String labelString, String key, String[] defaultValue, int color) {
- Combo combo = super.createEditableCombo(toolkit, composite, labelString, key, defaultValue, color);
+ protected Combo createEditableCombo(FormToolkit toolkit, Composite composite, String labelString, String key, String[] defaultValue, int color, int hspan) {
+ Combo combo = super.createEditableCombo(toolkit, composite, labelString, key, defaultValue, color, hspan);
GridData gd = (GridData)combo.getLayoutData();
gd.widthHint = 100;
return combo;
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/IMessageConstants.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/IMessageConstants.java 2017-12-10 16:22:54 UTC (rev 784)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/IMessageConstants.java 2017-12-16 06:47:14 UTC (rev 785)
@@ -59,7 +59,8 @@
public static final String BASIC_HINT_COMPKIND_DESC_P2 = Messages.getString("IMessageConstants.BASIC_HINT_COMPKIND_DESC_P2"); //$NON-NLS-1$
public static final String BASIC_HINT_COMPKIND_DESC_P3 = Messages.getString("IMessageConstants.BASIC_HINT_COMPKIND_DESC_P3"); //$NON-NLS-1$
public static final String BASIC_HINT_COMPKIND_DESC_P4 = Messages.getString("IMessageConstants.BASIC_HINT_COMPKIND_DESC_P4"); //$NON-NLS-1$
- public static final String BASIC_HINT_COMPKIND_DESC = StringUtil.connectMessageWithSepalator( new String[]{BASIC_HINT_COMPKIND_DESC_P1, BASIC_HINT_COMPKIND_DESC_P2, BASIC_HINT_COMPKIND_DESC_P3, BASIC_HINT_COMPKIND_DESC_P4});
+ public static final String BASIC_HINT_COMPKIND_DESC_P5 = Messages.getString("IMessageConstants.BASIC_HINT_COMPKIND_DESC_P5"); //$NON-NLS-1$
+ public static final String BASIC_HINT_COMPKIND_DESC = StringUtil.connectMessageWithSepalator( new String[]{BASIC_HINT_COMPKIND_DESC_P1, BASIC_HINT_COMPKIND_DESC_P2, BASIC_HINT_COMPKIND_DESC_P3, BASIC_HINT_COMPKIND_DESC_P4, BASIC_HINT_COMPKIND_DESC_P5});
public static final String BASIC_HINT_MAXINST_TITLE_P1 = Messages.getString("IMessageConstants.BASIC_HINT_MAXINST_TITLE_P1"); //$NON-NLS-1$
public static final String BASIC_HINT_MAXINST_TITLE_P2 = Messages.getString("IMessageConstants.BASIC_HINT_MAXINST_TITLE_P2"); //$NON-NLS-1$
public static final String BASIC_HINT_MAXINST_TITLE = StringUtil.connectMessageWithSepalator( new String[]{BASIC_HINT_MAXINST_TITLE_P1, BASIC_HINT_MAXINST_TITLE_P2});
@@ -367,9 +368,8 @@
public static final String LANGUAGE_LBL_LIBRARY = Messages.getString("IMessageConstants.LANGUAGE_LBL_LIBRARY"); //$NON-NLS-1$
public static final String LANGUAGE_SELECTION_CAUTION = Messages.getString("IMessageConstants.LANGUAGE_SELECTION_CAUTION"); //$NON-NLS-1$
- public static final String LANGUAGE_USE_OLD_BUILD = Messages.getString("IMessageConstants.LANGUAGE_USE_OLD_BUILD");
+ public static final String LANGUAGE_CHOREONOID_CAUTION = Messages.getString("IMessageConstants.LANGUAGE_CHOREONOID_CAUTION"); //$NON-NLS-1$
-
public static final String RTCXML_SECTION = Messages.getString("IMessageConstants.RTCXML_SECTION"); //$NON-NLS-1$
public static final String RTCXML_CAUTION_P1 = Messages.getString("IMessageConstants.RTCXML_CAUTION_P1"); //$NON-NLS-1$
public static final String RTCXML_CAUTION_P2 = Messages.getString("IMessageConstants.RTCXML_CAUTION_P2"); //$NON-NLS-1$
@@ -433,6 +433,12 @@
public static final String ACTIVITY_HINT_ONRATECHANGED_DESC = Messages.getString("IMessageConstants.ACTIVITY_HINT_ONRATECHANGED_DESC"); //$NON-NLS-1$
public static final String ACTIVITY_HINT_ONACTION_DESC = Messages.getString("IMessageConstants.ACTIVITY_HINT_ONACTION_DESC"); //$NON-NLS-1$
public static final String ACTIVITY_HINT_ONMODECHANGED_DESC = Messages.getString("IMessageConstants.ACTIVITY_HINT_ONMODECHANGED_DESC"); //$NON-NLS-1$
+ public static final String ACTIVITY_HINT_INITIALIZE_IO_DESC = Messages.getString("IMessageConstants.ACTIVITY_HINT_INITIALIZE_IO_DESC"); //$NON-NLS-1$
+ public static final String ACTIVITY_HINT_INITIALIZE_SIMULATION_DESC = Messages.getString("IMessageConstants.ACTIVITY_HINT_INITIALIZE_SIMULATION_DESC"); //$NON-NLS-1$
+ public static final String ACTIVITY_HINT_START_SIMULATION_DESC = Messages.getString("IMessageConstants.ACTIVITY_HINT_START_SIMULATION_DESC"); //$NON-NLS-1$
+ public static final String ACTIVITY_HINT_INPUT_SIMULATION_DESC = Messages.getString("IMessageConstants.ACTIVITY_HINT_INPUT_SIMULATION_DESC"); //$NON-NLS-1$
+ public static final String ACTIVITY_HINT_OUTPUT_SIMULATION_DESC = Messages.getString("IMessageConstants.ACTIVITY_HINT_OUTPUT_SIMULATION_DESC"); //$NON-NLS-1$
+ public static final String ACTIVITY_HINT_STOP_SIMULATION_DESC = Messages.getString("IMessageConstants.ACTIVITY_HINT_STOP_SIMULATION_DESC"); //$NON-NLS-1$
public static final String ACTIVITY_HINT_DESCRIPTION_TITLE = Messages.getString("IMessageConstants.ACTIVITY_HINT_DESCRIPTION_TITLE"); //$NON-NLS-1$
public static final String ACTIVITY_HINT_DESCRIPTION_DESC = Messages.getString("IMessageConstants.ACTIVITY_HINT_DESCRIPTION_DESC"); //$NON-NLS-1$
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/LanguageEditorFormPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/LanguageEditorFormPage.java 2017-12-10 16:22:54 UTC (rev 784)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/LanguageEditorFormPage.java 2017-12-16 06:47:14 UTC (rev 785)
@@ -535,6 +535,12 @@
result = IMessageConstants.LANGUAGE_SELECTION_CAUTION;
return result;
}
+
+ if(rtcParam.isChoreonoid() && rtcParam.getLangList().contains(IRtcBuilderConstants.LANG_CPP)==false ) {
+ result = IMessageConstants.LANGUAGE_CHOREONOID_CAUTION;
+ return result;
+ }
+
return null;
}
More information about the openrtm-commit
mailing list