[openrtm-commit:02242] r905 - in trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples: . StaticFsm
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 1月 17日 (火) 19:52:51 JST
Author: win-ei
Date: 2017-01-17 19:52:51 +0900 (Tue, 17 Jan 2017)
New Revision: 905
Added:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/.classpath
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/.project
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/CameraProtocol.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Configuring.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Idle.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/NotShooting.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Off.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Focused.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Focusing.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Shooting.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Storing.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.bat
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.conf
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.sh
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsmComp.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsmImpl.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Top.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/rtc.conf
Log:
[FSM4RTC]Added FSM RTC samples. refs #3775
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/.classpath
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/.classpath (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/.classpath 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
\ No newline at end of file
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/.project
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/.project (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/.project 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>StaticFsm</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/CameraProtocol.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/CameraProtocol.java (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/CameraProtocol.java 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,20 @@
+package RTMExamples.StaticFsm;
+
+import RTC.TimedLong;
+/**
+ *
+ */
+public interface CameraProtocol {
+
+ void on_do();
+
+ void EvOn(TimedLong param);
+ void EvOff(TimedLong param);
+ void EvConfig(TimedLong param);
+ void EvInFocus(TimedLong param);
+ void EvShutterHalf(TimedLong param);
+ void EvShutterFull(TimedLong param);
+ void EvShutterReleased(TimedLong param);
+
+}
+
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Configuring.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Configuring.java (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Configuring.java 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,26 @@
+package RTMExamples.StaticFsm;
+
+import jp.go.aist.rtm.RTC.jfsm.DeepHistory;
+import jp.go.aist.rtm.RTC.jfsm.State;
+
+import RTC.TimedLong;
+/**
+ *
+ */
+ at DeepHistory
+public class Configuring extends NotShooting {
+
+ @Override
+ public void onInit() {
+ }
+
+ @Override
+ public void on_do() {
+ }
+
+ @Override
+ public void EvConfig(TimedLong param){
+ }
+
+}
+
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Idle.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Idle.java (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Idle.java 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,27 @@
+package RTMExamples.StaticFsm;
+
+import jp.go.aist.rtm.RTC.jfsm.DeepHistory;
+import jp.go.aist.rtm.RTC.jfsm.State;
+
+import RTC.TimedLong;
+/**
+ *
+ */
+ at DeepHistory
+public class Idle extends NotShooting {
+
+ @Override
+ public void onInit() {
+ }
+
+ @Override
+ public void on_do() {
+ }
+
+ @Override
+ public void EvConfig(TimedLong param){
+ }
+
+}
+
+
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/NotShooting.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/NotShooting.java (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/NotShooting.java 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,30 @@
+package RTMExamples.StaticFsm;
+
+import jp.go.aist.rtm.RTC.jfsm.DeepHistory;
+import jp.go.aist.rtm.RTC.jfsm.State;
+
+import RTC.TimedLong;
+/**
+ *
+ */
+ at DeepHistory
+public class NotShooting extends Top {
+
+ @Override
+ public void onInit() {
+ }
+
+ @Override
+ public void on_do() {
+ }
+
+ @Override
+ public void EvOff(TimedLong param){
+ }
+
+ @Override
+ public void EvShutterHalf(TimedLong param){
+ }
+}
+
+
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Off.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Off.java (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Off.java 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,25 @@
+package RTMExamples.StaticFsm;
+
+import jp.go.aist.rtm.RTC.jfsm.DeepHistory;
+import jp.go.aist.rtm.RTC.jfsm.State;
+
+import RTC.TimedLong;
+/**
+ *
+ */
+ at DeepHistory
+public class Off extends Top {
+
+ @Override
+ public void onInit() {
+ }
+
+ @Override
+ public void on_do() {
+ }
+
+ @Override
+ public void EvOn(TimedLong param){
+ }
+}
+
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera.java (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera.java 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,27 @@
+package RTMExamples.StaticFsm;
+
+import jp.go.aist.rtm.RTC.jfsm.DeepHistory;
+import jp.go.aist.rtm.RTC.jfsm.State;
+
+import RTC.TimedLong;
+/**
+ *
+ */
+ at DeepHistory
+public class ShootingCamera extends Top {
+
+ @Override
+ public void onInit() {
+ }
+
+ @Override
+ public void on_do() {
+ }
+
+ @Override
+ public void EvShutterReleased(TimedLong param){
+ }
+
+}
+
+
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Focused.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Focused.java (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Focused.java 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,26 @@
+package RTMExamples.StaticFsm;
+
+import jp.go.aist.rtm.RTC.jfsm.DeepHistory;
+import jp.go.aist.rtm.RTC.jfsm.State;
+
+import RTC.TimedLong;
+/**
+ *
+ */
+ at DeepHistory
+public class ShootingCamera_Focused extends ShootingCamera_Shooting {
+
+ @Override
+ public void onInit() {
+ }
+
+ @Override
+ public void on_do() {
+ }
+
+
+ @Override
+ public void EvShutterFull(TimedLong param){
+ }
+}
+
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Focusing.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Focusing.java (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Focusing.java 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,33 @@
+package RTMExamples.StaticFsm;
+
+import jp.go.aist.rtm.RTC.jfsm.DeepHistory;
+import jp.go.aist.rtm.RTC.jfsm.State;
+
+import RTC.TimedLong;
+/**
+ *
+ */
+ at DeepHistory
+public class ShootingCamera_Focusing extends ShootingCamera_Shooting {
+
+ @Override
+ public void onInit() {
+ }
+
+ @Override
+ public void on_do() {
+ }
+
+
+ @Override
+ public void EvInFocus(TimedLong param){
+ }
+
+ @Override
+ public void EvShutterFull(TimedLong param){
+ }
+}
+
+
+
+
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Shooting.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Shooting.java (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Shooting.java 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,24 @@
+package RTMExamples.StaticFsm;
+
+import jp.go.aist.rtm.RTC.jfsm.DeepHistory;
+import jp.go.aist.rtm.RTC.jfsm.State;
+
+import RTC.TimedLong;
+/**
+ *
+ */
+ at DeepHistory
+public class ShootingCamera_Shooting extends ShootingCamera {
+
+ @Override
+ public void onInit() {
+ }
+
+ @Override
+ public void on_do() {
+ }
+
+}
+
+
+
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Storing.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Storing.java (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/ShootingCamera_Storing.java 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,23 @@
+package RTMExamples.StaticFsm;
+
+import jp.go.aist.rtm.RTC.jfsm.DeepHistory;
+import jp.go.aist.rtm.RTC.jfsm.State;
+
+import RTC.TimedLong;
+/**
+ *
+ */
+ at DeepHistory
+public class ShootingCamera_Storing extends ShootingCamera_Shooting {
+
+ @Override
+ public void onInit() {
+ }
+
+ @Override
+ public void on_do() {
+ }
+
+}
+
+
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.bat
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.bat (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.bat 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,3 @@
+ at call set_classpath.bat
+java StaticFsmComp -f RTMExamples\StaticFsm\rtc.conf %*
+pause;
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.conf
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.conf (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.conf 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,140 @@
+# -*- sh -*-
+#------------------------------------------------------------
+# Configuration file for StaticFsm
+#
+# This configuration file name should be specified in rtc.conf (or other
+# configuration file specified by -f option) by "config_file" property.
+#
+# example.StaticFsm.config_file: StaticFsm.conf
+# or
+# example.StaticFsm0.config_file: StaticFsm0.conf
+# example.StaticFsm1.config_file: StaticFsm1.conf
+# example.StaticFsm2.config_file: StaticFsm2.conf
+#
+# ------------------------------------------------------------
+# An example configuration file for StaticFsm
+#
+# See details in the following reference manual
+#
+
+# Execution context configuration
+# exec_cxt.periodic.type: PeriodicExecutionContext
+# exec_cxt.periodic.rate: 1000
+#
+#
+# configuration.active_config: mode0
+
+# Additional configuration-set example named "mode0"
+#
+# conf.mode0.int_param0: 0
+# conf.mode0.int_param1: 1
+# conf.mode0.double_param0: 0.99
+# conf.mode0.double_param1: -0.99
+# conf.mode0.str_param0: default
+# conf.mode0.str_param1: default set in conf file
+# conf.mode0.vector_param0: 0.0,0.1,0.2,0.3,0.4,0.5,0.6
+#
+# Other configuration set named "mode1"
+#
+# conf.mode1.int_param0: 0
+# conf.mode1.int_param1: 1
+# conf.mode1.double_param0: 0.99
+# conf.mode1.double_param1: -0.99
+# conf.mode1.str_param0: default
+# conf.mode1.str_param1: default set in conf file
+# conf.mode1.vector_param0: 0.0,0.1,0.2,0.3,0.4,0.5,0.6
+
+
+
+
+
+##============================================================
+## Component configuration reference
+##
+
+##============================================================
+## Active configuration-set
+##============================================================
+##
+## Initial active configuration-set. The following "mode0" is a
+## configuration-set name. A configuration-set named "mode0" should be
+## appear in this configuration file as follows.
+##
+## configuration.active_config: mode0
+##
+# conf.mode0.param0: hoge
+# conf.mode0.param1: fuga
+# conf.mode0.param2: munya
+
+##============================================================
+## GUI control option for RTSystemEditor
+##============================================================
+## Available GUI control options [__widget__]:
+##
+## - text: text box [default].
+## - slider.<step>: Horizontal slider. <step> is step for the slider.
+## A range constraints option is required.
+## - spin: Spin button. A range constraitns option is required.
+## - radio: Radio button. An enumeration constraints is required.
+## - checkbox: Checkbox control. An enumeration constraints is
+## required. The parameter has to be able to accept a
+## comma separated list.
+## - orderd_list: Orderd list control. An enumeration constraint is
+## required. The parameter has to be able to accept a
+## comma separated list. In this control, Enumerated
+## elements can appear one or more times in the given list.
+##
+## Available GUI control constraint options [__constraints__]:
+##
+## - none: blank
+## - direct value: 100 (constant value)
+## - range: <, >, <=, >= can be used.
+## - enumeration: (enum0, enum1, ...)
+## - array: <constraints0>, ,constraints1>, ... for only array value
+## - hash: {key0: value0, key1:, value0, ...}
+##
+## examples:
+# conf.__widget__.int_param0: slider.10
+# conf.__widget__.int_param1: spin
+# conf.__widget__.double_param0: slider.10
+# conf.__widget__.double_param1: text
+# conf.__widget__.str_param0: radio
+# conf.__widget__.vector_param0: checkbox
+# conf.__widget__.vector_param1: orderd_list
+
+
+# conf.__constraints__.int_param0: 0<=x<=150
+# conf.__constraints__.int_param1: 0<=x<=1000
+# conf.__constraints__.double_param0: 0<=x<=100
+# conf.__constraints__.double_param1:
+# conf.__constraints__.str_param0: (default,mode0,mode1)
+# conf.__constraints__.vector_param0: (dog,monky,pheasant,cat)
+# conf.__constraints__.vector_param1: (pita,gora,switch)
+
+
+##============================================================
+## Execution context settings
+##============================================================
+##
+## Periodic type ExecutionContext
+##
+## Other availabilities in OpenRTM-aist
+##
+## - ExtTrigExecutionContext: External triggered EC. It is embedded in
+## OpenRTM library.
+## - OpenHRPExecutionContext: External triggred paralell execution
+## EC. It is embedded in OpenRTM
+## library. This is usually used with
+## OpenHRP3.
+## - RTPreemptEC: Real-time execution context for Linux
+## RT-preemptive pathed kernel.
+## - ArtExecutionContext: Real-time execution context for ARTLinux
+## (http://sourceforge.net/projects/art-linux/)
+##
+# exec_cxt.periodic.type: PeriodicExecutionContext
+
+##
+## The execution cycle of ExecutionContext
+##
+exec_cxt.periodic.rate:1000.0
+
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.java (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.java 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,53 @@
+package RTMExamples.StaticFsm;
+/**
+ * {@.ja StaticFsm}
+ * {@.en StaticFsm}
+ *
+ */
+
+import jp.go.aist.rtm.RTC.Manager;
+import jp.go.aist.rtm.RTC.RTObject_impl;
+import jp.go.aist.rtm.RTC.RtcDeleteFunc;
+import jp.go.aist.rtm.RTC.RtcNewFunc;
+import jp.go.aist.rtm.RTC.RegisterModuleFunc;
+import jp.go.aist.rtm.RTC.util.Properties;
+
+/**
+ * {@.ja Definition class}
+ * {@.en Definition class}
+ * <p>
+ * {@.ja The class where ComponentProfile(etc) was defined.}
+ * {@.en The class where ComponentProfile(etc) was defined.}
+ */
+public class StaticFsm implements RtcNewFunc, RtcDeleteFunc, RegisterModuleFunc {
+
+// Module specification
+// <rtc-template block="module_spec">
+ public static String component_conf[] = {
+ "implementation_id", "StaticFsm",
+ "type_name", "StaticFsm",
+ "description", "StaticFsm",
+ "version", "1.0.0",
+ "vendor", "Noriaki Ando, AIST",
+ "category", "example",
+ "activity_type", "STATIC",
+ "max_instance", "1",
+ "language", "Java",
+ "lang_type", "compile",
+ ""
+ };
+// </rtc-template>
+
+ public RTObject_impl createRtc(Manager mgr) {
+ return new StaticFsmImpl(mgr);
+ }
+
+ public void deleteRtc(RTObject_impl rtcBase) {
+ rtcBase = null;
+ }
+ public void registerModule() {
+ Properties prop = new Properties(component_conf);
+ final Manager manager = Manager.instance();
+ manager.registerFactory(prop, new StaticFsm(), new StaticFsm());
+ }
+}
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.sh
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.sh (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsm.sh 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if test "x$RTM_JAVA_ROOT" = "x" ; then
+ echo "Environment variable RTM_JAVA_ROOT is not set."
+ echo "Please specify the OpenRTM-aist installation directory."
+ echo "Abort."
+ exit 1
+fi
+
+. ./search_classpath.func
+export CLASSPATH=`get_classpath`
+java RTMExamples.StaticFsm.StaticFsmComp -f RTMExamples/StaticFsm/rtc.conf ${1+"$@"}
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsmComp.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsmComp.java (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsmComp.java 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,122 @@
+package RTMExamples.StaticFsm;
+/**
+ *
+ * {@.ja Standalone component}
+ * {@.en Standalone component}
+ *
+ */
+
+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.NVUtil;
+import jp.go.aist.rtm.RTC.util.Properties;
+
+import RTC.ComponentProfile;
+import RTC.PortService;
+import RTC.PortServiceListHolder;
+import RTC.PortInterfacePolarity;
+import RTC.PortInterfaceProfileListHolder;
+import RTC.RTObject;
+import RTC.RTObjectHelper;
+
+import _SDOPackage.NVListHolder;
+/**
+ * {@.ja Sample component of static FSM}
+ * {@.en Sample component of static FSM}
+ *
+ */
+public class StaticFsmComp implements ModuleInitProc {
+
+ public void myModuleInit(Manager mgr) {
+ Properties prop = new Properties(StaticFsm.component_conf);
+ mgr.registerFactory(prop, new StaticFsm(), new StaticFsm());
+
+ // Create a component
+ System.out.println("Creating a component: \"ConsoleOut\"....");
+ RTObject_impl comp = mgr.createComponent("StaticFsm");
+ if( comp==null ) {
+ System.err.println("Component create failed.");
+ System.exit(0);
+ }
+ System.out.println("succeed.");
+
+ ComponentProfile prof = comp.get_component_profile();
+ System.out.println( "=================================================" );
+ System.out.println( " Component Profile" );
+ System.out.println( "-------------------------------------------------" );
+ System.out.println( "InstanceID: " + prof.instance_name );
+ System.out.println( "Implementation: " + prof.type_name );
+ System.out.println( "Description: " + prof.description );
+ System.out.println( "Version: " + prof.version );
+ System.out.println( "Maker: " + prof.vendor );
+ System.out.println( "Category: " + prof.category );
+ System.out.println( " Other properties " );
+ NVUtil.dump(new NVListHolder(prof.properties));
+ System.out.println( "=================================================" );
+ // 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 (Exception e) {
+ e.printStackTrace();
+ }
+
+ // Get the port list of the component
+ PortServiceListHolder ports = new PortServiceListHolder();
+ ports.value = rtobj.get_ports();
+
+ // getting port profiles
+ System.out.println( "Number of Ports: " );
+ System.out.println( ports.value.length );
+ for( int intIdx=0;intIdx<ports.value.length;++intIdx ) {
+ PortService port = ports.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.
+ StaticFsmComp init = new StaticFsmComp();
+ 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);
+ }
+
+}
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsmImpl.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsmImpl.java (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsmImpl.java 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,447 @@
+package RTMExamples.StaticFsm;
+/**
+ * {@.ja StaticFsmImpl}
+ * {@.en StaticFsmImpl}
+ */
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import jp.go.aist.rtm.RTC.DataFlowComponentBase;
+import jp.go.aist.rtm.RTC.Manager;
+import jp.go.aist.rtm.RTC.jfsm.Machine;
+import jp.go.aist.rtm.RTC.port.ConnectorBase;
+import jp.go.aist.rtm.RTC.port.InPort;
+import jp.go.aist.rtm.RTC.port.OutPort;
+import jp.go.aist.rtm.RTC.port.ConnectorDataListenerT;
+import jp.go.aist.rtm.RTC.port.ConnectorDataListenerType;
+import jp.go.aist.rtm.RTC.util.DataRef;
+
+import RTC.TimedLong;
+import RTC.ReturnCode_t;
+
+/**
+ * {@.ja Implemented class of a sample component of static FSM}
+ * {@.en Implemented class of a sample component of static FSM}
+ *
+ */
+public class StaticFsmImpl extends DataFlowComponentBase {
+
+ /**
+ * {@.ja constructor}
+ * {@.en constructor}
+ * @param manager
+ * {@.ja Maneger Object}
+ * {@.en Maneger Object}
+ */
+ public StaticFsmImpl(Manager manager) {
+ super(manager);
+ // <rtc-template block="initializer">
+ m_EvConfig_val = new TimedLong();
+ initializeParam(m_EvConfig_val);
+ m_EvConfig = new DataRef<TimedLong>(m_EvConfig_val);
+ m_EvConfigIn = new InPort<TimedLong>("EvConfig", m_EvConfig);
+ m_EvInFocus_val = new TimedLong();
+ initializeParam(m_EvInFocus_val);
+ m_EvInFocus = new DataRef<TimedLong>(m_EvInFocus_val);
+ m_EvInFocusIn = new InPort<TimedLong>("EvInFocus", m_EvInFocus);
+ m_EvOff_val = new TimedLong();
+ initializeParam(m_EvOff_val);
+ m_EvOff = new DataRef<TimedLong>(m_EvOff_val);
+ m_EvOffIn = new InPort<TimedLong>("EvOff", m_EvOff);
+ m_EvOn_val = new TimedLong();
+ initializeParam(m_EvOn_val);
+ m_EvOn = new DataRef<TimedLong>(m_EvOn_val);
+ m_EvOnIn = new InPort<TimedLong>("EvOn", m_EvOn);
+ m_EvShutterFull_val = new TimedLong();
+ initializeParam(m_EvShutterFull_val);
+ m_EvShutterFull = new DataRef<TimedLong>(m_EvShutterFull_val);
+ m_EvShutterFullIn = new InPort<TimedLong>("EvShutterFull", m_EvShutterFull);
+ m_EvShutterHalf_val = new TimedLong();
+ initializeParam(m_EvShutterHalf_val);
+ m_EvShutterHalf = new DataRef<TimedLong>(m_EvShutterHalf_val);
+ m_EvShutterHalfIn = new InPort<TimedLong>("EvShutterHalf", m_EvShutterHalf);
+ m_EvShutterReleased_val = new TimedLong();
+ initializeParam(m_EvShutterReleased_val);
+ m_EvShutterReleased = new DataRef<TimedLong>(m_EvShutterReleased_val);
+ m_EvShutterReleasedIn = new InPort<TimedLong>("EvShutterReleased", m_EvShutterReleased);
+ m_out_val = new TimedLong();
+ m_out = new DataRef<TimedLong>(m_out_val);
+ m_outOut = new OutPort<TimedLong>("out", m_out);
+ // </rtc-template>
+
+ }
+
+ /**
+ *
+ * The initialize action (on CREATED->ALIVE transition)
+ * formaer rtc_init_entry()
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ @Override
+ protected ReturnCode_t onInitialize() {
+ // Registration: InPort/OutPort/Service
+ // <rtc-template block="registration">
+ // Set InPort buffers
+ addInPort("EvConfig", m_EvConfigIn);
+ addInPort("EvInFocus", m_EvInFocusIn);
+ addInPort("EvOff", m_EvOffIn);
+ addInPort("EvOn", m_EvOnIn);
+ addInPort("EvShutterFull", m_EvShutterFullIn);
+ addInPort("EvShutterHalf", m_EvShutterHalfIn);
+ addInPort("EvShutterReleased", m_EvShutterReleasedIn);
+
+ m_EvConfigIn.addConnectorDataListener(
+ ConnectorDataListenerType.ON_RECEIVED,
+ new DataListener("ON_RECEIVED"));
+ m_EvInFocusIn.addConnectorDataListener(
+ ConnectorDataListenerType.ON_RECEIVED,
+ new DataListener("ON_RECEIVED"));
+ m_EvOffIn.addConnectorDataListener(
+ ConnectorDataListenerType.ON_RECEIVED,
+ new DataListener("ON_RECEIVED"));
+ m_EvOnIn.addConnectorDataListener(
+ ConnectorDataListenerType.ON_RECEIVED,
+ new DataListener("ON_RECEIVED"));
+ m_EvShutterFullIn.addConnectorDataListener(
+ ConnectorDataListenerType.ON_RECEIVED,
+ new DataListener("ON_RECEIVED"));
+ m_EvShutterHalfIn.addConnectorDataListener(
+ ConnectorDataListenerType.ON_RECEIVED,
+ new DataListener("ON_RECEIVED"));
+ m_EvShutterReleasedIn.addConnectorDataListener(
+ ConnectorDataListenerType.ON_RECEIVED,
+ new DataListener("ON_RECEIVED"));
+
+ // Set OutPort buffer
+ addOutPort("out", m_outOut);
+ // </rtc-template>
+
+ machine_ = new Machine<>(Top.class, CameraProtocol.class, null);
+ return super.onInitialize();
+ }
+
+ /***
+ *
+ * The finalize action (on ALIVE->END transition)
+ * formaer rtc_exiting_entry()
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+// @Override
+// protected ReturnCode_t onFinalize() {
+// return super.onFinalize();
+// }
+
+ /***
+ *
+ * The startup action when ExecutionContext startup
+ * former rtc_starting_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+// @Override
+// protected ReturnCode_t onStartup(int ec_id) {
+// return super.onStartup(ec_id);
+// }
+
+ /***
+ *
+ * The shutdown action when ExecutionContext stop
+ * former rtc_stopping_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+// @Override
+// protected ReturnCode_t onShutdown(int ec_id) {
+// return super.onShutdown(ec_id);
+// }
+
+ /***
+ *
+ * The activated action (Active state entry action)
+ * former rtc_active_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+// @Override
+// protected ReturnCode_t onActivated(int ec_id) {
+// return super.onActivated(ec_id);
+// }
+
+ /***
+ *
+ * The deactivated action (Active state exit action)
+ * former rtc_active_exit()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+// @Override
+// protected ReturnCode_t onDeactivated(int ec_id) {
+// return super.onDeactivated(ec_id);
+// }
+
+ /**
+ *
+ * The execution action that is invoked periodically
+ * former rtc_active_do()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ @Override
+ protected ReturnCode_t onExecute(int ec_id) {
+ return super.onExecute(ec_id);
+ }
+
+ /***
+ *
+ * The aborting action when main logic error occurred.
+ * former rtc_aborting_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+// @Override
+// public ReturnCode_t onAborting(int ec_id) {
+// return super.onAborting(ec_id);
+// }
+
+ /***
+ *
+ * The error action in ERROR state
+ * former rtc_error_do()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+// @Override
+// public ReturnCode_t onError(int ec_id) {
+// return super.onError(ec_id);
+// }
+
+ /***
+ *
+ * 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
+ *
+ *
+ */
+// @Override
+// protected ReturnCode_t onReset(int ec_id) {
+// return super.onReset(ec_id);
+// }
+
+ /***
+ *
+ * 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
+ *
+ *
+ */
+// @Override
+// protected ReturnCode_t onStateUpdate(int ec_id) {
+// return super.onStateUpdate(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
+ *
+ *
+ */
+// @Override
+// protected ReturnCode_t onRateChanged(int ec_id) {
+// return super.onRateChanged(ec_id);
+// }
+//
+ // DataInPort declaration
+ // <rtc-template block="inport_declare">
+ protected TimedLong m_EvConfig_val;
+ protected DataRef<TimedLong> m_EvConfig;
+ /*!
+ */
+ protected InPort<TimedLong> m_EvConfigIn;
+
+ protected TimedLong m_EvInFocus_val;
+ protected DataRef<TimedLong> m_EvInFocus;
+ /*!
+ */
+ protected InPort<TimedLong> m_EvInFocusIn;
+
+ protected TimedLong m_EvOff_val;
+ protected DataRef<TimedLong> m_EvOff;
+ /*!
+ */
+ protected InPort<TimedLong> m_EvOffIn;
+
+ protected TimedLong m_EvOn_val;
+ protected DataRef<TimedLong> m_EvOn;
+ /*!
+ */
+ protected InPort<TimedLong> m_EvOnIn;
+
+ protected TimedLong m_EvShutterFull_val;
+ protected DataRef<TimedLong> m_EvShutterFull;
+ /*!
+ */
+ protected InPort<TimedLong> m_EvShutterFullIn;
+
+ protected TimedLong m_EvShutterHalf_val;
+ protected DataRef<TimedLong> m_EvShutterHalf;
+ /*!
+ */
+ protected InPort<TimedLong> m_EvShutterHalfIn;
+
+ protected TimedLong m_EvShutterReleased_val;
+ protected DataRef<TimedLong> m_EvShutterReleased;
+ /*!
+ */
+ protected InPort<TimedLong> m_EvShutterReleasedIn;
+
+
+ // </rtc-template>
+
+ // DataOutPort declaration
+ // <rtc-template block="outport_declare">
+ protected TimedLong m_out_val;
+ protected DataRef<TimedLong> m_out;
+ /*!
+ */
+ protected OutPort<TimedLong> m_outOut;
+
+ Machine<Top, CameraProtocol> machine_;
+
+ // </rtc-template>
+
+ // CORBA Port declaration
+ // <rtc-template block="corbaport_declare">
+
+ // </rtc-template>
+
+ // Service declaration
+ // <rtc-template block="service_declare">
+
+ // </rtc-template>
+
+ // Consumer declaration
+ // <rtc-template block="consumer_declare">
+
+ // </rtc-template>
+
+
+ private void initializeParam(Object target) {
+ Class<?> targetClass = target.getClass();
+ ClassLoader loader = target.getClass().getClassLoader();
+ //
+ Field[] fields = targetClass.getFields();
+ for(Field field : fields) {
+ if(field.getType().isPrimitive()) continue;
+
+ try {
+ if(field.getType().isArray()) {
+ Object arrayValue = null;
+ Class<?> clazz = null;
+ if(field.getType().getComponentType().isPrimitive()) {
+ clazz = field.getType().getComponentType();
+ } else {
+ clazz = loader.loadClass(field.getType().getComponentType().getName());
+ }
+ arrayValue = Array.newInstance(clazz, 0);
+ field.set(target, arrayValue);
+
+ } else {
+ Constructor<?>[] constList = field.getType().getConstructors();
+ if(constList.length==0) {
+ Method[] methodList = field.getType().getMethods();
+ for(Method method : methodList) {
+ if(method.getName().equals("from_int")==false) continue;
+ Object objFld = method.invoke(target, new Object[]{ new Integer(0) });
+ field.set(target, objFld);
+ break;
+ }
+ } else {
+ Class<?> classFld = Class.forName(field.getType().getName(), true, loader);
+ Object objFld = classFld.newInstance();
+ initializeParam(objFld);
+ field.set(target, objFld);
+ }
+ }
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ } catch (InstantiationException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ class DataListener extends ConnectorDataListenerT<TimedLong>{
+ public DataListener(final String name){
+ super(TimedLong.class);
+ m_name = name;
+ }
+
+ public void operator(final ConnectorBase.ConnectorInfo arg,
+ final TimedLong data) {
+ ConnectorBase.ConnectorInfo info =(ConnectorBase.ConnectorInfo)arg;
+ System.out.println("------------------------------");
+ System.out.println("Listener: "+m_name);
+ System.out.println("Profile::name: "+info.name);
+ System.out.println("Profile::id: "+info.id);
+ System.out.println("Data: "+data.data);
+ System.out.println("------------------------------");
+ }
+ public String m_name;
+ }
+}
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Top.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Top.java (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/Top.java 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,131 @@
+package RTMExamples.StaticFsm;
+
+import jp.go.aist.rtm.RTC.jfsm.DataType;
+import jp.go.aist.rtm.RTC.jfsm.State;
+import jp.go.aist.rtm.RTC.jfsm.StateDef;
+
+import RTC.TimedLong;
+/**
+ *
+ */
+//@DataType(Top.Data.class)
+public class Top extends StateDef implements CameraProtocol {
+
+ //private static final Logger LOGGER = LoggerFactory.getLogger(Top.class);
+/*
+ public static class Data {
+
+ private int myCookingTime;
+// pyfsm/test/api_test.py:10
+// class Data(object):
+// def __init__(self):
+// self.my_cooking_time = 0
+//
+// def print_timer(self):
+// pyfsm_logger.debug(" Timer set to {0} minutes".format(self.my_cooking_time))
+//
+// def increment_timer(self):
+// self.my_cooking_time += 1
+//
+// def decrement_timer(self):
+// self.my_cooking_time -= 1
+//
+// def reset_timer(self):
+// self.my_cooking_time = 0
+//
+// def get_remaining_time(self):
+// return self.my_cooking_time
+
+ public Data() {
+ myCookingTime = 0;
+ }
+
+ public void printTimer() {
+ LOGGER.debug(" Timer set to {} minutes", myCookingTime);
+ }
+
+ public void incrementTimer() {
+ myCookingTime += 1;
+ }
+
+ public void decrementTimer() {
+ myCookingTime -= 1;
+ }
+
+ public void resetTimer() {
+ myCookingTime = 0;
+ }
+
+ public int getRemainingTime() {
+ return myCookingTime;
+ }
+ }
+*/
+
+ @Override
+ public void onEntry() {
+ System.out.println("Top::on_entry");
+ }
+
+ @Override
+ public void onInit() {
+ //setState(new State(Operational.class));
+ }
+
+ @Override
+ public void on_do() {
+ }
+
+ @Override
+ public void EvOn(TimedLong param){
+ }
+ @Override
+ public void EvOff(TimedLong param){
+ }
+ @Override
+ public void EvConfig(TimedLong param){
+ }
+ @Override
+ public void EvInFocus(TimedLong param){
+ }
+ @Override
+ public void EvShutterHalf(TimedLong param){
+ }
+ @Override
+ public void EvShutterFull(TimedLong param){
+ }
+ @Override
+ public void EvShutterReleased(TimedLong param){
+ }
+/*
+ public void open() {
+ // do nothing
+ }
+
+ @Override
+ public void close() {
+ // do nothing
+ }
+
+ @Override
+ public void minute() {
+ // do nothing
+ }
+
+ @Override
+ public void start() {
+ // do nothing
+ }
+
+ @Override
+ public void stop() {
+ // do nothing
+ }
+
+ @Override
+ public void tick() {
+ // do nothing
+ }
+*/
+}
+
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/rtc.conf
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/rtc.conf (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/rtc.conf 2017-01-17 10:52:51 UTC (rev 905)
@@ -0,0 +1,437 @@
+#------------------------------------------------------------
+# RT-Component manager configuration
+#
+# See details in the following reference manual or web page.
+# http://www.openrtm.org/openrtm/en/content/configuration
+# http://www.openrtm.org/openrtm/ja/content/rtcconf%E8%A8%AD%E5%AE%9A%E9%A0%85%E7%9B%AE%E4%B8%80%E8%A6%A7
+# http://www.openrtm.org/openrtm/ko/content/rtcconf-%EC%84%A4%EC%A0%95-%ED%95%AD%EB%AA%A9-%EC%9D%BC%EB%9E%8C
+#
+
+#------------------------------------------------------------
+# Typically used configuration parameters
+#
+# corba.name_servers: localhost, 192.168.0.1
+# corba.endpoints: <interface addess>, <interface addess>
+# logger.enable: YES
+# logger.file_name: ./rtc%p.log
+# logger.log_level: NORMAL
+#
+# The following properties should be specified in component specific
+# configuration files.
+# exec_cxt.periodic.type: PeriodicExecutionContext
+# exec_cxt.periodic.rate: 1000
+
+# Component specific configruation files:
+# If you want to load component specific configuration file, please
+# uncomment the following line.
+#
+# example.StaticFsm.config_file: StaticFsm.conf
+# or
+# example.StaticFsm0.config_file: StaticFsm0.conf
+# example.StaticFsm1.config_file: StaticFsm1.conf
+# example.StaticFsm2.config_file: StaticFsm2.conf
+#
+#------------------------------------------------------------
+
+example.StaticFsm.config_file: StaticFsm.conf
+
+#
+# Please delete the following part if you are familiar with OpenRTM's
+# configuration parameters.
+#
+##----------------------------------------------------------------------
+##
+## RT-Component manager configurations
+##
+##----------------------------------------------------------------------
+
+##------------------------------------------------------------
+## Configuration version (optional)
+##
+# config.version: 1.0
+
+##------------------------------------------------------------
+## OpenRTM-aist version (optional)
+##
+# openrtm.version: 1.0.0
+
+##------------------------------------------------------------
+## The name of manager (default = manager)
+##
+# manager.name: manager
+
+##------------------------------------------------------------
+## Master manager
+## - manager.is_master: YES/NO, This process made a master or not.
+## - manager.corba_servant: YES/NO, create manager's corba service or not
+## - corba.master_manager: <host_name>:<port>, master manager's location
+# manager.is_master: YES
+# manager.corba_servant: YES
+# corba.master_manager: localhost:2810
+
+##------------------------------------------------------------
+## Manager auto shutdown options
+## - manager.shutdown_on_nortcs: YES/NO,
+## process will be shutdown in case no rtc exists when rtc is deleted.
+## - manager.shutdown_auto:
+## process will be shutdown in case no rtc exists on periodic check.
+# manager.shutdown_on_nortcs: YES
+# manager.shutdown_auto: YES
+# manager.auto_shutdown_duration: 10.0
+
+##============================================================
+## CORBA configuration
+##============================================================
+##
+## CORBA ORB's arguments
+##
+## ORB specific command line options given to ORB_init().
+## See your ORB documentation.
+##
+## Example:
+## corba.args: -ORBInitialHost myhost -ORBInitialPort 8888
+##
+##
+# corba.args:
+
+##
+## ORB endpoint
+##
+## If you have two or more network interfaces, ORB endpoint address and/or
+## port have to be specified. If hostname or port number is abbreviated,
+## default interface or port number is used. At least one colon ':'
+## is needed when you specify this option.
+##
+## Examples:
+## corba.endpoint: myhost: (use myhost and default port)
+## corba.endpoint: :9876 (use default addr and port 9876)
+## corba.endpoint: myhost:9876 (use myhost and port 9876)
+##
+# corba.endpoint:
+
+##
+## Multiple endpoint options (experimental)
+##
+## Multiple endpoint addresses and ports can be specified using this option.
+##
+## Example:
+## corba.endpoints: 192.168.1.10:1111, 192.168.10.11:2222
+## corba.endpoints: 192.168.1.10, 192.168.10.11
+## corba.endpoints: all
+##
+# corba.endpoints:
+
+
+##
+## CORBA name server setting
+##
+## Multiple name servers can be specified separating by comma.
+## If port number is abbreviated, default port number is used.
+## The default port number is depend on ORB implementation.
+##
+## Examples:
+## corba.nameservers: openrtm.aist.go.jp:9876
+## corba.nameservers: rtm0.aist.go.jp, rtm1.aist.go.jp, rtm2.aist.go.jp
+##
+# corba.nameservers: localhost
+
+##
+## IOR host address replacement by guessed endpoint from routing (experimental)
+##
+## This option replaces a host address with an endpoint that is guessed
+## by route information to nameserver's address. This option may be
+## effective for CORBA implementation that does not supports IOR's
+## multiple profile or alternate IIOP address. However, since other
+## object references that are obtained from RT-Components or other are
+## not modified by this rule, other RTCs that are connected to this RTC
+## have to also support IOR multiple profile feature. When this option
+## is used, corba.endpoints option should also be specified with
+## multiple endpoints.
+##
+# corba.nameservice.replace_endpoint: NO
+
+##
+## IOR alternate IIOP addresses
+##
+## This option adds alternate IIOP addresses into the IOR Profiles.
+## IOR can include additional endpoints for a servant. It is almost
+## same as "corba.endpoints" option, but this option does not create
+## actual endpoint on the ORB. (corba.endpoints try to create actual
+## endpoint, and if it cannot be created, error will be returned.)
+## This option just add alternate IIOP endpoint address information to
+## an IOR.
+##
+## This option can be used when RTCs are located inside of NAT or
+## router. Generally speaking, RTCs in a private network cannot
+## connect to RTCs in the global network, because global client cannot
+## reach to private servants. However, if route (or NAT) is properly
+## configured for port forwarding, global RTCs can reach to RTCs in
+## private network.
+##
+## A setting example is as follows.
+## 1) Configure your router properly for port-forwarding.
+## ex. global 2810 port is forwarded to private 2810
+## 2) Set the following options in rtc.conf
+## corba.nameservers: my.global.nameserver.com <- name server in global network
+## corba.endpoints: :2810 <- actual port number
+## corba.additional_ior_addresses: w.x.y.z:2810 <- routers global IP addr/port
+## 3) Launch global RTCs and private RTC, and connect them.
+##
+# corba.alternate_iiop_addresses: addr:port
+
+##============================================================
+## Naming configurations
+##============================================================
+##
+## Enable/Disable naming functions
+##
+# naming.enable: YES
+
+##
+## Naming Types
+##
+## Now only "corba" is supported.
+##
+# naming.type: corba
+
+##
+## Naming format
+##
+## The name format of components that is bound to naming services.
+## The delimiter between names is "/".
+## The delimiter between name and kind is ".".
+##
+## example: (OpenRTM-aist-0.2.0 style)
+## %h.host_cxt/%M.mgr_cxt/%c.cat_cxt/%m.mod_cxt/%n.rtc
+## This is formatted according to the following replacement rules.
+##
+## %n: The instance name of the component.
+## %t: The type name of the component.
+## %m: The module name of the component.
+## %v: The version of the component.
+## %V: The component vendor.
+## %c: The category of the component.
+## %h: The hostname.
+## %M: The manager name.
+## %p: PID of the manager.
+##
+# naming.formats: %h.host/%n.rtc
+
+##
+## Auto update to Naming Server
+##
+# naming.update.enable: YES
+##
+## Update interval [s] for auto update
+##
+# naming.update.interval: 10.0
+##
+## Rebind references in auto update
+##
+# naming.update.rebind: NO
+
+## End of Naming configuration section
+##------------------------------------------------------------
+
+##============================================================
+## Module management
+##============================================================
+##
+## Loadable module search path list
+##
+## Manager searches loadable modules from the specified search path list.
+## Path list elements should be separated by comma.
+## Path delimiter is '/' on UNIX, and '\\' on Windows
+## Valid path examples:
+## manager.modules.load_path: C:/Program Files/OpenRTM-aist, \
+## C:\\Program Files\\OpenRTM-aist
+## manager.modules.load_path: /usr/lib, /usr/local/lib, \
+## /usr/local/lib/OpenRTM-aist/libs
+##
+# manager.modules.load_path: ./
+
+##
+## Preload module list
+##
+## Manager can load loadable modules before starting up.
+## Loadable modules, which is specified only as its file name, is searched
+## in each module load path specified in the "manager.modules.load_path".
+## If the "manager.modules.abs_path_allowed" option is YES, loadable file
+## can be specified as full-path name,
+##
+## Valid settings:
+## manager.modules.preload: ConsoleIn.dll, ConsoleOut.dll
+## manager.modules.preload: ConsoleIn.so, ConsoleOut.so
+## manager.modules.abs_path_allowed: YES
+## manager.modules.preload: /usr/lib/OpenRTM-aist/ConsoleIn.so
+##
+# manager.modules.preload:
+
+##
+## Permission flag of absolute module path
+##
+## If this option is "YES", absolute path specification for module is allowed.
+##
+# manager.modules.abs_path_allowed: YES
+
+##
+## The following options are not implemented yet.
+##
+## manager.modules.config_ext:
+## manager.modules.config_path:
+## manager.modules.detect_loadable:
+## manager.modules.init_func_suffix:
+## manager.modules.init_func_prefix:
+## manager.modules.download_allowed:
+## manager.modules.download_dir:
+## manager.modules.download_cleanup:
+##
+
+##
+## Advance component creation
+##
+## This option specifies components' names (module name) creating in advance
+## before starting the manager's event-loop. The components' factories should
+## be registered by manager.module.preload option or statically linked to the
+## manager.
+##
+## Example:
+## manager.components.precreate: ConsoleIn, ConsoleOut, SeqIn, SeqOut
+##
+# manager.components.precreate:
+
+
+##============================================================
+## Logger configurations
+##============================================================
+##
+## Enable/Disable logger [YES/NO]
+# logger.enable: YES
+
+##
+## Log file name (default = ./rtc%p.log)
+##
+## %p: PID
+##
+# logger.file_name: ./rtc%p.log
+
+##
+## Log date format (default = %b %d %H:%M:%S)
+##
+## The following strftime(3) like format expression is available.
+## If no prefix is needed, use "No" or "Disable".
+##
+## %a abbreviated weekday name
+## %A full weekday name
+## %b abbreviated month name
+## %B full month name
+## %c the standard date and time string
+## %d day of the month, as a number (1-31)
+## %H hour, 24 hour format (0-23)
+## %I hour, 12 hour format (1-12)
+## %j day of the year, as a number (1-366)
+## %m month as a number (1-12).
+## Note: some versions of Microsoft Visual C++ may use values that range
+## from 0-11.
+## %M minute as a number (0-59)
+## %p locale's equivalent of AM or PM
+## %Q millisecond as a number (0-999) from ver 1.1
+## %q microsecond as a number (0-999) from ver 1.1
+## %S second as a number (0-59)
+## %U week of the year, sunday as the first day
+## %w weekday as a decimal (0-6, sunday=0)
+## %W week of the year, monday as the first day
+## %x standard date string
+## %X standard time string
+## %y year in decimal, without the century (0-99)
+## %Y year in decimal, with the century
+## %Z time zone name
+## %% a percent sign
+##
+##
+## logger.date_format: No
+## logger.date_format: Disable
+## logger.date_format: [%Y-%m-%dT%H.%M.%S%Z] // W3C standard format
+## logger.date_format: [%b %d %H:%M:%S] // Syslog format
+## logger.date_format: [%a %b %d %Y %H:%M:%S %Z] // RFC2822 format
+## logger.date_format: [%a %b %d %H:%M:%S %Z %Y] // data command format
+## logger.date_format: [%Y-%m-%d %H.%M.%S]
+##
+# logger.date_format: %b %d %H:%M:%S
+
+##
+## Log level (default = NORMAL)
+##
+## The following LogLevels are allowed.
+## SILENT, ERROR, WARN, NORMAL, INFO, DEBUG, TRACE, VERBOSE, PARANOID
+##
+##
+## SILENT : completely silent
+## ERROR : includes (ERROR)
+## WARN : includes (ERROR, WARN)
+## INFO : includes (ERROR, WARN, INFO)
+## NORMAL : includes (ERROR, WARN, INFO, NORMAL)
+## DEBUG : includes (ERROR, WARN, INFO, NORMAL, DEBUG)
+## TRACE : includes (ERROR, WARN, INFO, NORMAL, DEBUG, TRACE)
+## VERBOSE : includes (ERROR, WARN, INFO, NORMAL, DEBUG, TRACE, VERBOSE)
+## PARANOID: includes (ERROR, WARN, INFO, NORMAL, DEBUG, TRACE, VERBOSE, PARA)
+##
+## Warning!!!
+## "TRACE", "VERBOSE", "PARANOID" logging level will create a huge log file!!
+## "PARANOID" log level will tangle the log file.
+##
+# logger.log_level: NORMAL
+
+##============================================================
+## Timer configuration
+##============================================================
+##
+## Enable/disable timer function
+##
+# timer.enable: YES
+
+##
+## Timer clock tick setting [s]
+##
+# timer.tick: 0.1
+
+##============================================================
+## Execution context settings
+##============================================================
+##
+## Periodic type ExecutionContext
+##
+## Other availabilities in OpenRTM-aist
+##
+## - ExtTrigExecutionContext: External triggered EC. It is embedded in
+## OpenRTM library.
+## - OpenHRPExecutionContext: External triggred paralell execution
+## EC. It is embedded in OpenRTM
+## library. This is usually used with
+## OpenHRP3.
+## - RTPreemptEC: Real-time execution context for Linux
+## RT-preemptive pathed kernel.
+## - ArtExecutionContext: Real-time execution context for ARTLinux
+## (http://sourceforge.net/projects/art-linux/)
+##
+# exec_cxt.periodic.type: PeriodicExecutionContext
+
+##
+## The execution cycle of ExecutionContext
+##
+# exec_cxt.periodic.rate: 1000
+
+##============================================================
+## SDO service settings
+##============================================================
+##
+## SDO service provider settings
+##
+# sdo.service.provider.available_services: [read only]
+# sdo.service.provider.enabled_services: ALL
+# sdo.service.provider.providing_services: [read only]
+##
+## SDO service consumer settings
+##
+# sdo.service.consumer.available_services: [read only]
+# sdo.service.consumer.enabled_services: ALL
More information about the openrtm-commit
mailing list