public abstract class PreFsmActionListener
extends java.lang.Object
implements java.util.Observer
PreFsmActionListener class is a base class for the listener objects which realize callback to hook FSM related pre-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 PreFsmActionListener {
public String m_name;
public MyListener(final String name) {
m_namei = name;
}
public void operator()(final String state_name)
{
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() {
addPreFsmActionListener(PRE_ON_STATE_CHANGE,
new MyListener("init listener"));
:
:
:
};
The first argument "PRE_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 |
|---|
PreFsmActionListener() |
| 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) |