[openrtm-commit:01174] r484 - branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/template
openrtm @ openrtm.org
openrtm @ openrtm.org
2014年 1月 22日 (水) 10:21:11 JST
Author: win-ei
Date: 2014-01-22 10:21:11 +0900 (Wed, 22 Jan 2014)
New Revision: 484
Modified:
branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/template/RtcEcCreateTbl.c.vsl
Log:
Daily work.
Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/template/RtcEcCreateTbl.c.vsl
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/template/RtcEcCreateTbl.c.vsl 2014-01-22 00:58:23 UTC (rev 483)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/template/RtcEcCreateTbl.c.vsl 2014-01-22 01:21:11 UTC (rev 484)
@@ -1,110 +1,47 @@
// -*- C -*-
/*!
- * @file ${rtcParam.name}Comp.c
- * @brief Standalone component
+ * @file RtcEcCreateTbl.c
+ * @brief RTC EC creation table
#set( $Date$ = "dummy" )
* @date \$Date$
-#if( ${rtcParam.docCreator.length()} > 0 )
*
- * @author ${tmpltHelper.convertAuthorDoc(${rtcParam.docCreator})}
-#end
-#if( ${rtcParam.docLicense.length()} > 0 )
- *
- * ${tmpltHelper.convertDoc(${rtcParam.docLicense})}
-#end
- *
#set( $Id$ = "dummy" )
* \$Id$
*/
-import jp.go.aist.rtm.RTC.Manager;
-import jp.go.aist.rtm.RTC.ModuleInitProc;
-import jp.go.aist.rtm.RTC.RTObject_impl;
-import jp.go.aist.rtm.RTC.util.Properties;
+${sharp}include "UserCommon.h"
+${sharp}include "UserConfig.h"
+${sharp}include "RtcEc.h"
+${sharp}include "MyObjectKey.h"
-/*!
- * @class ${rtcParam.name}Comp
- * @brief Standalone component Class
- *
- */
-public class ${rtcParam.name}Comp implements ModuleInitProc {
+/* RTC EC creation table */
+const RtcEcCreate_t gsRtcEcCreate[RTCEC_NUM] =
+{
+#foreach($comp in $comps)
+ {/* ExecutionContext setting */
+ EC_INDEX_MYRTCEC_${comp.toUpperCase()}, /* ECIndex */
+ RESERVE_FOR_RTCEC_CREATE_TBL, /* Reserve */
+ 0, /* taskId(Only uiTRON, the setup is required.) */
+ {/* sets up RTCIndex belonging to an execution context.(set up 0, when there is nothing) */
+ RTC_INDEX_${comp.toUpperCase()}, /* InputRTC */
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0
+ }/* A maximum of 16 */
+ } #if($velocityHasNext) ,
+#end
+#end
- public void myModuleInit(Manager mgr) {
- Properties prop = new Properties(${rtcParam.name}.component_conf);
- mgr.registerFactory(prop, new ${rtcParam.name}(), new ${rtcParam.name}());
-
- // Create a component
- RTObject_impl comp = mgr.createComponent("${rtcParam.name}");
- if( comp==null ) {
- System.err.println("Component create failed.");
- System.exit(0);
- }
-
- // Example
- // The following procedure is examples how handle RT-Components.
- // These should not be in this function.
-
-// // Get the component's object reference
-// Manager manager = Manager.instance();
-// RTObject rtobj = null;
-// try {
-// rtobj = RTObjectHelper.narrow(manager.getPOA().servant_to_reference(comp));
-// } catch (ServantNotActive e) {
-// e.printStackTrace();
-// } catch (WrongPolicy e) {
-// e.printStackTrace();
-// }
-//
-// // Get the port list of the component
-// PortListHolder portlist = new PortListHolder();
-// portlist.value = rtobj.get_ports();
-//
-// // getting port profiles
-// System.out.println( "Number of Ports: " );
-// System.out.println( portlist.value.length );
-// for( int intIdx=0;intIdx<portlist.value.length;++intIdx ) {
-// Port port = portlist.value[intIdx];
-// System.out.println( "Port" + intIdx + " (name): ");
-// System.out.println( port.get_port_profile().name );
-//
-// PortInterfaceProfileListHolder iflist = new PortInterfaceProfileListHolder();
-// iflist.value = port.get_port_profile().interfaces;
-// System.out.println( "---interfaces---" );
-// for( int intIdx2=0;intIdx2<iflist.value.length;++intIdx2 ) {
-// System.out.println( "I/F name: " );
-// System.out.println( iflist.value[intIdx2].instance_name );
-// System.out.println( "I/F type: " );
-// System.out.println( iflist.value[intIdx2].type_name );
-// if( iflist.value[intIdx2].polarity==PortInterfacePolarity.PROVIDED ) {
-// System.out.println( "Polarity: PROVIDED" );
-// } else {
-// System.out.println( "Polarity: REQUIRED" );
-// }
-// }
-// System.out.println( "---properties---" );
-// NVUtil.dump( new NVListHolder(port.get_port_profile().properties) );
-// System.out.println( "----------------" );
-// }
- }
-
- public static void main(String[] args) {
- // Initialize manager
- final Manager manager = Manager.init(args);
-
- // Set module initialization proceduer
- // This procedure will be invoked in activateManager() function.
- ${rtcParam.name}Comp init = new ${rtcParam.name}Comp();
- manager.setModuleInitProc(init);
-
- // Activate manager and register to naming service
- manager.activateManager();
-
- // run the manager in blocking mode
- // runManager(false) is the default.
- manager.runManager();
-
- // If you want to run the manager in non-blocking mode, do like this
- // manager.runManager(true);
- }
-
-}
+};
More information about the openrtm-commit
mailing list