systemcomposer.interaction.Message
Description
A Message
object represents a communication between two lifelines
of an interaction. On the sequence diagram representing the interaction, a message is shown as
an arrow. Messages have labels that can describe the communication occurrence either formally
or informally. A message corresponds to a connector connecting ports of two components in an
architecture model.
An informal message label is written in natural language. A
formal message label is in the form of trigger[constraint]
where
trigger
represents the identifying event for this message, and
constraint
represents additional expressions that are expected to be true
when this message occurs.
For signal-based communication, a trigger is also called an edge and can described in the format
direction(signal [+|-] value)
. You can enter a condition that specifies a triggering edge with a direction and an expression. The direction can be:rising — The edge expression is rising from strictly below zero to a value equal to or greater than zero.
falling — The edge expression is falling from strictly above zero.
crossing — The edge expression is either rising or falling past zero.
For message-based communication, a trigger can be described simply by using the name of the input message port, and represents the arrival of a message.
For both signal and message-based communication, a constraint expression in square brackets on the message label is an optional MATLAB® Boolean expression involving the names of the inputs to the destination lifeline.
Creation
Access Message
objects via the RootFragment
property
of the corresponding systemcomposer.interaction.Interaction
object. Iterate over the root fragment to
inspect the systemcomposer.interaction.MessageEvent
objects within the fragments. Access the
Message
property of the message event to inspect the corresponding
Message
object.
Properties
Examples
More About
Version History
Introduced in R2024a
See Also
Tools
Functions
openViews
|sim
|getInteraction
|getInteractions
|open
|next
|current
|reset
Objects
systemcomposer.arch.Model
|systemcomposer.interaction.Interaction
|systemcomposer.interaction.Iterator
|systemcomposer.interaction.Lifeline
|systemcomposer.interaction.MessageEvent
|systemcomposer.interaction.FormalGate
|systemcomposer.interaction.Fragment
|systemcomposer.interaction.RootFragment
|systemcomposer.interaction.AltFragment
|systemcomposer.interaction.OptFragment
|systemcomposer.interaction.LoopFragment
|systemcomposer.interaction.SeqFragment
|systemcomposer.interaction.StrictFragment
|systemcomposer.interaction.ParFragment
|systemcomposer.interaction.Operand
|systemcomposer.interaction.Annotation
|Simulink.SimulationInput
|Simulink.SimulationOutput
Topics
- Describe System Behavior Using Sequence Diagrams
- Pivot Between Lifelines and Components in Views Gallery
- Compose Architectures Visually
- Define Port Interfaces Between Components
- Implement Component Behavior Using Simulink
- Implement Component Behavior Using Stateflow Charts
- Implement Component Behavior Using Simscape