Stateflow | ![]() ![]() |
Connective Junctions
Connective junctions are decision points in the system. A connective junction is a graphical object that simplifies Stateflow diagram representations and facilitates generation of efficient code. Connective junctions provide alternative ways to represent desired system behavior. In the diagram on page 2-10, the connective junction is used as a decision point for two transition segments that complete at StateA1c
.
Transitions connected to junctions are called transition segments. Transitions, apart from default transitions, must go state to state. However, once the transition segments taken complete a state to state transition, the accumulation of the transition segments taken forms a complete transition.
The following example shows how connective junctions (displayed as small circles) are used to represent the flow of an if-else
code structure shown in accompanying pseudocode.
This example executes as follows:
[c1]
is true, condition action a1
is executed and the default transition to the top junction is taken.
[c2]
is considered first.
c2]
is true, action a2
is executed and the transition segment to the bottom junction is taken. Because there are no outgoing transition segments from the bottom junction, the diagram is finished executing.
[c2]
is false, the empty transition segment on the right is taken (because it has no condition at all).
[c3]
is true, condition action a3
is executed and the transition segment from the middle to the bottom junction is taken. Because there are no outgoing transition segments from the bottom junction, the diagram is finished executing.
[c3]
is false, execution is finished at the middle junction.
The above steps describe the execution of the example diagram for connective junctions with Stateflow semantics. Stateflow semantics describe how objects in diagrams relate to each other during execution. See Stateflow Semantics.
![]() | Actions | Stateflow Hierarchy of Objects | ![]() |