[openrtm-commit:02285] r913 - trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 1月 20日 (金) 17:04:21 JST
Author: win-ei
Date: 2017-01-20 17:04:21 +0900 (Fri, 20 Jan 2017)
New Revision: 913
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/PostFsmActionListenerArgument.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/PostFsmActionListenerHolder.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/PreFsmActionListenerHolder.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/RTObject_impl.java
Log:
[FSM4RTC,incompat,new funcs] add/remove functions for FSM listeners have been added.
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/PostFsmActionListenerArgument.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/PostFsmActionListenerArgument.java 2017-01-20 07:59:07 UTC (rev 912)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/PostFsmActionListenerArgument.java 2017-01-20 08:04:21 UTC (rev 913)
@@ -13,12 +13,12 @@
* {@.en Constructor}
*
*/
- public PostFsmActionListenerArgument(int handle,
+ public PostFsmActionListenerArgument(String handle,
RTC.ReturnCode_t ret){
m_exec_handle = handle;
m_ret = ret;
}
- public int m_exec_handle;
+ public String m_exec_handle;
public RTC.ReturnCode_t m_ret;
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/PostFsmActionListenerHolder.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/PostFsmActionListenerHolder.java 2017-01-20 07:59:07 UTC (rev 912)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/PostFsmActionListenerHolder.java 2017-01-20 08:04:21 UTC (rev 913)
@@ -14,7 +14,7 @@
*/
public class PostFsmActionListenerHolder extends Observable{
- public void notify(final int ec_id, RTC.ReturnCode_t ret) {
+ public void notify(final String ec_id, RTC.ReturnCode_t ret) {
super.setChanged();
PostFsmActionListenerArgument arg
= new PostFsmActionListenerArgument(ec_id,ret);
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/PreFsmActionListenerHolder.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/PreFsmActionListenerHolder.java 2017-01-20 07:59:07 UTC (rev 912)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/PreFsmActionListenerHolder.java 2017-01-20 08:04:21 UTC (rev 913)
@@ -13,10 +13,9 @@
*
*/
public class PreFsmActionListenerHolder extends Observable{
- public void notify(final int exec_handle) {
+ public void notify(final String state) {
super.setChanged();
- Integer arg = new Integer(exec_handle);
- super.notifyObservers(arg);
+ super.notifyObservers(state);
super.clearChanged();
}
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/RTObject_impl.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/RTObject_impl.java 2017-01-20 07:59:07 UTC (rev 912)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/RTObject_impl.java 2017-01-20 08:04:21 UTC (rev 913)
@@ -6356,6 +6356,54 @@
{
m_actionListeners.ecaction_[ExecutionContextActionListenerType.EC_DETACHED].notify(ec_id);
}
+
+
+ /**
+ * FSM related listeners
+ */
+ protected void preOnFsmInit(final String state)
+ {
+ m_fsmActionListeners.preaction_[PreFsmActionListenerType.PRE_ON_INIT].notify(state);
+ }
+ protected void preOnFsmEntry(final String state)
+ {
+ m_fsmActionListeners.preaction_[PreFsmActionListenerType.PRE_ON_ENTRY].notify(state);
+ }
+ protected void preOnFsmDo(final String state)
+ {
+ m_fsmActionListeners.preaction_[PreFsmActionListenerType.PRE_ON_DO].notify(state);
+ }
+ protected void preOnFsmExit(final String state)
+ {
+ m_fsmActionListeners.preaction_[PreFsmActionListenerType.PRE_ON_EXIT].notify(state);
+ }
+ protected void preOnFsmStateChange(final String state)
+ {
+ m_fsmActionListeners.preaction_[PreFsmActionListenerType.PRE_ON_STATE_CHANGE].notify(state);
+ }
+ /**
+ * FSM related listeners
+ */
+ protected void postOnFsmInit(final String state, ReturnCode_t ret)
+ {
+ m_fsmActionListeners.postaction_[PostFsmActionListenerType.POST_ON_INIT].notify(state, ret);
+ }
+ protected void postOnFsmEntry(final String state, ReturnCode_t ret)
+ {
+ m_fsmActionListeners.postaction_[PostFsmActionListenerType.POST_ON_ENTRY].notify(state, ret);
+ }
+ protected void postOnFsmDo(final String state, ReturnCode_t ret)
+ {
+ m_fsmActionListeners.postaction_[PostFsmActionListenerType.POST_ON_DO].notify(state, ret);
+ }
+ protected void postOnFsmExit(final String state, ReturnCode_t ret)
+ {
+ m_fsmActionListeners.postaction_[PostFsmActionListenerType.POST_ON_EXIT].notify(state, ret);
+ }
+ protected void postOnFsmStateChange(final String state, ReturnCode_t ret)
+ {
+ m_fsmActionListeners.postaction_[PostFsmActionListenerType.POST_ON_STATE_CHANGE].notify(state, ret);
+ }
protected ReturnCode_t getInheritedECOptions(Properties default_opts){
final String inherited_opts[] =
More information about the openrtm-commit
mailing list