addAnnotation - Create new annotation in interaction - MATLAB (original) (raw)

Main Content

Create new annotation in interaction

Since R2024b

Syntax

Description

[annotation](#mw%5F0a095409-f00f-4d60-9d54-275caa71c40a) = addAnnotation([interaction](#mw%5F534864fb-dc82-471a-a2c4-c9a76687e678%5Fsep%5Fmw%5F91e5b2bb-cf28-4f8d-bb2b-48061211fa8f),[text](#mw%5Fc2c72b6b-6b83-4f8b-a9c9-8ee1f951527b)) creates an annotation in the sequence diagram corresponding to interactioninteraction with text text.

example

Examples

collapse all

Create a model with a component called Component.

model = systemcomposer.createModel("archModel"); systemcomposer.openModel("archModel"); arch = get(model,"Architecture"); comp = addComponent(arch,"Component");

Create a sequence diagram in the model, and then open the sequence diagram.

interaction = model.addInteraction("NewSequenceDiagram"); interaction.open

Add a lifeline to the sequence diagram.

lifeline = interaction.addLifeline(comp);

Add an annotation to the sequence diagram.

annotation = interaction.addAnnotation("This is my sequence diagram.");

Input Arguments

collapse all

Text, specified as a character vector or string.

Example: "This is my sequence diagram."

Data Types: char | string

Output Arguments

More About

collapse all

Term Definition Application More Information
Interaction An interaction specifies how each part of a system should interact as a sequence of message exchanges. Use interactions to describe operational system behaviors. Describe System Behavior Using Sequence Diagrams
Sequence diagram A sequence diagram is a visual representation of an interaction. Use sequence diagrams to visually specify how each part of a system should interact. Describe System Behavior Using Sequence Diagrams
Lifeline A lifeline represents an instance of a component as a participant of an interaction. A lifeline corresponds to a component in an architecture. Describe Interactions with Lifelines and Messages
Message A message represents communication between two lifelines. Messages have labels to specify the expected condition for the message to occur. A message label has a trigger, an optional guard, and an optional constraint where a trigger represents the identifying event for this message, a guard represents an additional condition to determine whether the message occurs, and a constraint is an expression that is expected to be true when this message occurs. Describe Interactions with Lifelines and Messages
Gate A gate represents the root of an architectural hierarchy. A gate allows you to describe the exchange of messages between the architecture and its environment. Describe Interactions with Lifelines and Messages
Annotation An annotation describes the elements of a sequence diagram. Use annotations to provide detailed explanations of elements or workflows captured by sequence diagrams. Annotate Sequence Diagrams with Annotations
Fragment A fragment encloses a group of lifelines and messages within an interaction to allow for the specification of more complex patterns of interaction. A fragment defines the type of ordering logic such as looping and alternatives. Fragments can have one or more operands. Model Complex Interactions with Fragments and Operands
Operand An operand is a region in a fragment, or group of messages. The condition of an operand specifies whether the messages inside the operand execute. The condition of an operand can specify constraints on the input signal of a lifeline as a MATLABĀ® Boolean expression. Model Complex Interactions with Fragments and Operands
Duration constraint A duration constraint defines a constraint on elapsed time between a start and an end occurrence. Use duration constraints to explicitly express a constraint on the duration between a start occurrence and an end occurrence. Specify Timing Constraints Between Message Events with Duration Constraints

Version History

Introduced in R2024b

See Also

Tools

Functions

Objects

Topics