|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.fhg.igd.jhsm.AbstractComponent
de.fhg.igd.jhsm.HSMState
de.fhg.igd.jhsm.HSM
A generic hierarchical state machine. This can be either a complete state machine or just some substate (submachine) of an enclosing hsm.
| Field Summary | |
private InitialState |
initialState_
The initial state of this state machine. |
private Logger |
LOG
|
private Set |
states_
The set of states that have been added to this machine. |
| Fields inherited from class de.fhg.igd.jhsm.HSMState |
|
| Fields inherited from class de.fhg.igd.jhsm.AbstractComponent |
|
| Constructor Summary | |
HSM()
The default constructor. |
|
HSM(InitialState start)
|
|
| Method Summary | |
void |
action()
|
void |
addState(State state)
Adds a substate to this state. |
boolean |
contains(State state)
Checks (recursively) wether the composite state or one of it's substates does have state as a substate. |
void |
entry(Context context)
Executes the entry action of the state. |
void |
exit(Context context)
Executes the exit action of the state. |
InitialState |
getInitialState()
Returns the initial substate of the composite state. |
Set |
getStates()
Returns all substates of the composite state. |
void |
removeState(State state)
Removes a substate from this state. |
void |
setInitialState(InitialState initial)
Sets the initial substate of the composite state. |
| Methods inherited from class de.fhg.igd.jhsm.HSMState |
action, addDeferred, addTransition, defers, getDeferred, getTransitions, removeDeferred, removeTransition, setEntry, setExit |
| Methods inherited from class de.fhg.igd.jhsm.AbstractComponent |
getAction, getName, getParent, setAction, setName, setParent, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.fhg.igd.jhsm.State |
addDeferred, addTransition, defers, getDeferred, getTransitions, removeDeferred, removeTransition, setEntry, setExit |
| Methods inherited from interface de.fhg.igd.jhsm.Component |
action, getAction, getName, getParent, setAction, setName, setParent |
| Field Detail |
private final Logger LOG
private InitialState initialState_
private Set states_
| Constructor Detail |
public HSM()
public HSM(InitialState start)
| Method Detail |
public void addState(State state)
CompositeState
addState in interface CompositeStatestate - The state that should be nested.public void removeState(State state)
CompositeState
removeState in interface CompositeStatestate - The state that should be removed.public void action()
public void entry(Context context)
State
entry in interface Stateentry in class HSMStatepublic void exit(Context context)
State
exit in interface Stateexit in class HSMStatepublic Set getStates()
CompositeState
getStates in interface CompositeStatepublic InitialState getInitialState()
CompositeState
getInitialState in interface CompositeStatepublic void setInitialState(InitialState initial)
CompositeState
setInitialState in interface CompositeStatepublic boolean contains(State state)
CompositeStatestate as a substate.
contains in interface CompositeStatestate - The state that is the substate in question.
true if the given state is contained in the
composite state, false else.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||