Talk:State machine design

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(New page: There are a few things wrong with the following diagram: Image:StateMachine.png * The setCurrentState() method should be defined in FSM, and implmented in both subclasses. This will...)
 
Line 6: Line 6:
 
* Similarly, the step() method should be defined in State, and implemented in both subclasses.  This method should take an FSM, not a concrete machine class.
 
* Similarly, the step() method should be defined in State, and implemented in both subclasses.  This method should take an FSM, not a concrete machine class.
 
* State should not have the field transitions.  This will have to be defined in the subclasses to allow NondeterministicState to have multiple transitions on a single state and input.
 
* State should not have the field transitions.  This will have to be defined in the subclasses to allow NondeterministicState to have multiple transitions on a single state and input.
 +
* FSM.run() should take a List not a Collection since order of input is very important.
 
--[[User:Aidan Bebbington|Aidan]] 00:28, 15 August 2009 (UTC)
 
--[[User:Aidan Bebbington|Aidan]] 00:28, 15 August 2009 (UTC)

Revision as of 00:29, 15 August 2009

There are a few things wrong with the following diagram:

StateMachine.png

  • The setCurrentState() method should be defined in FSM, and implmented in both subclasses. This will replace DeterministicFSM.setCurrentState() and NondeterministicFSM.setCurrentStates(). To allow this NondeterminsticFSM will allow it to be called several times to allow multiple states to be activated.
  • Similarly, the step() method should be defined in State, and implemented in both subclasses. This method should take an FSM, not a concrete machine class.
  • State should not have the field transitions. This will have to be defined in the subclasses to allow NondeterministicState to have multiple transitions on a single state and input.
  • FSM.run() should take a List not a Collection since order of input is very important.

--Aidan 00:28, 15 August 2009 (UTC)

Personal tools