StateMachine

Chair for Computer Aided Medical Procedures & Augmented Reality
Lehrstuhl für Informatikanwendungen in der Medizin & Augmented Reality

-- FelixLoew - 13 Jan 2004

StateMachine

The StateMachine is responsible for matching marker events to a context change. This means if a marker with a certain ID is detected, the StateMachine has to checked which transition it has to trigger out of the current state.

Example: User is in the kitchen and detects marker with ID 5. Now the StateMachine receives an event with markerID 5 and now looks into a map showing with ID 5 you will get to the main hall. The transition is triggered and now the StateMachine must configure itself with the new map.

The configuration of this map is done in a certain way. If a context change occurs, the StateMachine is shut down (instead of getting reconfigured). A new StateMachine is started that now carries the wished configuration. This is done while interacting with the MarkerConfiguration (DWARF: startOnDemand and stopOnNoUse).

If a transition is triggered by the StateMachine the new context is set in the MarkerConfiguration. The MarkerConfiguration now knows that it has to configure the MarkerDetection again and that the old StateMachine is of no use anymore. Please look into my thesis for further information (sequence diagrams, etc).

Needs & Abilities

As stated in the StateMachine.xml file, the service has the following Needs and Abilities.

  • Ability: name="Room" type="RoomInfo"
This is needed to have a reference on the MarkerConfiguration to set the new global context. Please not that we use a special DWARF mechanism here: the *-attributes. This is done to have only the requested StateMachine to be initialized.

  • Need: name="MarkerEvent" type="MarkerID"
It shows the need for marker events. It receives events in order to trigger a context change.

  • Need: name="SMConfig" type="Configuration"
Here the StateMachine pulls its configuartion (the hash-map of the current state) from the Configuration Service. The Configuration has implemented by Marcus Toennis.

Please look at Asa´s paper "Decentralized Coordination of Distributed Interdependent Services" and my thesis available in the dwarfdoc cvs where the *-stuff is explained.

Interaction with other Services

If a context change occurs the new context is set in the MarkerConfiguration. MarkerEvents? are recieved by the MarkerDetection. Configuration of the current state is done while interaction with the Configuration

More Documentation

How-To

Usage

Note that the using of the StateMachine is only useful if you want to set up the whole system (with VideoGrabber, MarkerDetection, MarkerConfiguration, Configuration)

Example: StateMachine

Testing

Set up the whole system. Otherwise you have to hardcode the map and test it with the MarkerDetection and the VideoGrabber.

Configuration

Configuration is done by the Configuration service. If you want to configure it all to a new environment you will first have to model a set of rooms as a state machine. The you have to partition each room with its transitions (accepted markerID´s) and put it in the Configuration database.

-- FelixLoew - 3 Feb 2004


Edit | Attach | Refresh | Diffs | More | Revision r1.5 - 15 Jul 2005 - 13:11 - MarcusToennis

Lehrstuhl für Computer Aided Medical Procedures & Augmented Reality    rss.gif