IntelliWizard© - UML StateWizard

An open source software under LGPL license.


Start Page

Introduction ...
What State Machine
Why State Machine
Running Environment
License Policy

Features


Product Family
API Set
Demo & Manual

Downloads

Installation
Engine Source Code

Users & Partners


User Stories
Forums



The State Tree

The behavior of state machine applications is organized by the flow from one state to another, with different entry actions, exit actions, event handlers, and transitions being performed in each state.

The StateWizard provided in the State Tree is a tool that helps you create and manage the state machines in your program. The StateWizard works with the state machines you create initially. The StateWizard also lets you browse and edit the state machines in your program. You can create state machines, construct state hierarchy, define event handlers and navigate through your files, and more.

A Visual C++ workspace is organized as bellow:

Workspace '<dsw name>' : <prj num> project(s)

|--- <dsp name> application(s)

|----- App1
| |--- Entry: entry action function
| |--- Exit: exit action function
| |--- Event ID 1
| |--- Internal transition
| |--- Action: handler function
| |--- Event ID 2
| |--- Internal transition
| |--- Action: handler function
| |--- ....
| |--- State 1 (Default)
| | |--- Entry: entry action function
| | |--- Exit: exit action function
| | |--- Event ID_1
| | |--- Transit to: State 2
| | |--- Action: handler function
| | |--- Event ID_2
| | |--- Transit to: State 3
| | |--- Action: handler function
| | |--- .....
| | |--- State A (Default)
| | |--- State B
| |--- State 2
| |--- State 3
| |--- ...
| |--- MyApp1.c (Show non-event handlers in source file)
| |--- func_in_src(int i, int j)
| |--- MyApp1.h (Show non-event handlers in source header file)
| |--- func_in_hdr(int i, int j)
|----- App 2
|----- App 3
|----- ...
|----- Non application(s)
| |--- MyOtherSrc1.c
| |--- func1(int i, int j)
| |--- MyOtherSrc2.c
| |--- func2(int i, int j)

Note:

  • There is an ancestor state of all states for an application. It is identified by application name.
  • A route from tree root to leaf will define a state.
  • Tree node is one of the following types: Workspace, Project, App/State, Entry/Exit/Event, Transition type / Action and source /header files.
  • Double click the source file item will open it, including source file and header file. Double click function item will jump to its location, including event handler and non-event handler functions.
  • If function with the type of SME_EVENT_HANDLER_T, it will be an event handler and it will not list in non-event handlers item. Otherwise it is a regular function.
  • Active project item, application items and state items are in bold.
  • While program is running, state tree will track the state transitions. Active applications and their active state path from root to the leaf are highlighted in red.

Restriction:

  • The total maximum state number in an application is 65532.
  • The maximum state tree depth is 16.

For example, the following picture shows the State Tree tab window in coding mode. App project consists of DialogCtrl, MenuCtrl, and PowerUpDown applications. PowerUpDown application is comprised of (PowerUp (Idle, MenuSurf, Function), PowerDown) states.

Figure: State Tree in Coding Mode

The following picture shows the State Tree tab window in debugging mode. It tracks the application state transitions while program is running. The current active application set includes PowerUpDown only, and its active state is (PowerUp, Idle).

Figure: State Tree in Debugging Mode

Top