FSM User Interface integration

MLDesigner provides special tool buttons, design objects and dialogs to model finite state machines.

FSM Model Editor

The FSM model editor provides all the functionality needed to create the graphical representation of a finite state machine. Additional icons, specific to the FSM domain, become available on the toolbar when you create a new FSM or open an existing FSM model. Parameter arguments can also be added to an FSM model as elsewhere in MLDesigner.

Add State Add Transition Add History Add Default Entrance

FSM Design Objects

This section introduces all the FSM design objects and their behavior inside the FSM model edit window.

The interface elements of an FSM model are not introduced, since they can be used in context with finite state machines as elsewhere in MLDesigner.

States

States are depicted by a rounded rectangle. If a state is the only selected object, a size grip, located in every corner, is visible. The size grips can be used to change the size of the state view object. Each state must have a unique name, centered at the top of the graphical state object.

Transitions

Transitions between different state objects are depicted by a single line or multiple line segments, like connections between ports in other MLDesigner models. An arrow is located on one end of the transition, pointing to the transition’s target state. The start and the end point of a transition resides on the shape boundary of a state, history or default entrance view object. Self transitions are depicted by a semi ellipse on one side of the associated state.

Default Entrance Transitions

Default entrance transitions are only used to specify either the top level default entrance or the default entrance of a hierarchical state. In this context, a default entrance transition possesses neither a transition label nor any other transition property and is never active while running a finite state machine.

Transition Labels

Associated with each transition (exempted default entrance transitions) is a transition label, which is depicted like any other text label in MLDesigner, but with fixed font, color and size. The transition label is located near its associated transition in the FSM model edit window.

Default Entrances

A default entrance is depicted by a full circle with fixed radius. The radius of the default entrance view object is greater than the radius of transition points and less than the radius of the history view object.

Histories

Histories are depicted by a circle with fix radius and either an H* (for recursive history), or an H (for non-recursive history) placed in the middle of the circle.

FSM Dialogs

Action Dialog

The FSM action dialog is a custom dialog for creating FSM action statements. The major reason for the FSM Built-In Functions and FSM Interface Elements subdialog is, to prevent syntax errors in FSM action statements. These subdialogs can be used to include either an FSM built-in function or the name of an FSM interface element at the current text cursor position.

The FSM action statements can be verified, using the corresponding tool button. If the statements contain syntax errors, the verification output window becomes visible and all errors with their associated line number are listed.

Event Expression Dialog

Like the FSM action dialog, the event expression dialog is another custom dialog, in this case used to create logical event expressions for transitions. The major part is the line edit at the top of the dialog, used to enter an event expression. All the elements below the line edit are helpful for creating an expression. In this context, the 3 combo boxes contain all the names of the input ports, special event arguments, and internal events of the associated FSM model. You can Verify that the expression is valid. If you accept the dialog with OK you are prompted to verify the expression in case it was not already verified.

 

Slave Model Dialog

The slave model dialog is a custom dialog to select a slave process model for leaf states. Since a slave process model must be either another FSM model or an MLDesigner module, only these two specific model types and their associated library models are listed in the tree view of the dialog. If the selected slave process model is the same FSM model as the superordinate finite state machine, an error message occurs and no new slave process model is set for the leaf state.