QM  6.1.2
Model-Based Design Tool
No Matches
Working with eXit-Point Segments

Working with Submachine StatesCode Engineering

eXit-Point Segment represents a way of transitioning out of a specific substate of a Submachine. The eXit-Point provides an indirection layer to exiting a specific substate without exposing this substate or any other internal parts of the Submachine.

An eXit-Point Segment is like a transition, except it does not have a trigger. Also, similarly to a state transition, an eXit-Point might not target any state, in which case it behaves as an internal transition.
eXit-Point Segments

Adding an eXit-Point Segment

In order to add a transition, you first need to open a state diagram, which needs to have at least one state. Also, the State Machine diagram must be unlocked ( ).

Make sure that the State Machine subwindow is active. In the State Machine Toolbox click on the eXit-Point Segment tool and release the mouse button (don't drag the tool off the toolbar). At this point, when you hover the mouse over an eligible eXit-Point of a Submachine State, the mouse pointer changes to the eXit-Point Segment tool with the anchor (). To add the eXit-Point Segment at this source state, press the mouse button and drag the transition end out. As you drag the connector, the mouse pointer changes to a hand and the transition end takes the shape of a square ().

eXit-Point Segment with Choices

An eXit-Point Segment, just like a state transition, might have choice segments attached to its end. However, an important limitation for eXit-Point Segments is that the choices must be complementary, meaning that you must use the else guard to complement any other choices attached to the end of an eXit-Point Segment. For example, the screen shot below shows an eXit-Point Segment with complementary choice segments:

eXit-Point Segment with complementary choice segments
The failure to use complementary guards at the end of a eXit-Point Segment results in a code-generation ERROR C113 "exit-point with non-complementary guards."
eXit-Point Segment with non-complementary choice segments

eXit-Point Property Sheet

eXit-Point Segment item can be configured by the eXit-Point Segment Property Sheet.

eXit-Point Segment Property Sheet

The eXit-Point Segment property sheet contains the following properties:

Associated eXit-Point

The eXit-Point property is not editable directly, but rather it is determined geometrically by the eXit-Point at which the given eXit-Point Segment originates.

eXit-Point Segment Target

The target property is not editable directly, but rather it is determined geometrically by the end-point of the transition. For state-to-state transitions, the target property lists the target state at which the end-point () terminates. For internal transitions with the square end-point (), the target property shows internal.

eXit-Point Segment with Choice Segments

eXit-Point Segment Action

An eXit-Point Segment can have an optional action property, which consists of two entries: pseudocode and code (see Transition Property Sheet). Only the code part of the action property is relevant for the code generation. The pseudocode field is designed only to be displayed in the diagram to avoid clutter by minimizing the amount of text to display next to the transition shape.

The Pseudocode entry of the action property is intended only for displaying in the diagram and has no implications for code generation. Only the Code entry of the action property matters for code generation.
See also
Refer to the documentation for State Transition for information on how to route the eXit-Point Segment, change its type (state-to-state vs. internal), and how to move and resize its action Text Box.

Working with Submachine StatesCode Engineering