public abstract class PostFsmActionListener
extends java.lang.Object
implements java.util.Observer
PostFsmActionListener class is a base class for the listener objects which realize callback to hook FSM related post-actions. To hook execution just before a FSM action, the callback object should be defined as follows, and set to RTObject through appropriate callback set function.
class MyListener extends PostFsmActionListener {
public String m_name;
public MyListener(final String name) {
m_namei = name;
}
public void operator()(final String state_name, ReturnCode_t ret) {
System.out.println("Listner name: " + m_name);
System.out.println("Current state: " + state_name);
};
};
The listener class defined above is set to RTObject as follows.
protected ReturnCode_t onInitialize() {
addPostFsmActionListener(POST_ON_STATE_CHANGE,
new MyListener("init listener"));
:
};
The first argument "POST_ON_STATE_CHANGE" specifies callback hook
point, and the following values are available. Not all the
callback points are implemented. It depends on the FSM
implementations.
| Constructor and Description |
|---|
PostFsmActionListener() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
operator(java.lang.String exec_handle)
Virtual Callback function
|
void |
update(java.util.Observable o,
java.lang.Object obj) |