Types Editor - Create custom data types - MATLAB (original) (raw)

Create custom data types

Since R2024a

Description

The Types Editor allows you to define custom data types. You can then use the types created in the Types Editor to define data types of tokens that flow through pins of an action node.

The kinds of data types that you can define in the Types Editor include:

Types Editor

Open the Types Editor

Parameters

expand all

Add a new composite data type by clicking Add composite type or select one of these options from the drop-down list.

Add a new bus element to the selected composite type by clicking Add element to selected composite type.

Delete the selected type or element.

Import interfaces from these locations:

Save types in the current data dictionary or attach an existing data dictionary to your model. Select a specific option from the list:

Choose a profile XML file to import into the currently selected data dictionary. You can also remove an existing profile from the selected data dictionary.

Show and hide columns on the Types Editor by checking the corresponding boxes:

Choose a view for the Types Editor to display interfaces:

More About

expand all

An activity diagram describes system behavior that models the flow of tokens from inputs to outputs through a controlled sequence of actions. An activity diagram contains action nodes with pins connected by flow lines.

Use activity diagrams to conceptualize a system, visualize functional flow through actions or decisions, and understand how system components interact with one another.

Tokens are objects that flow in the activity diagram. A token can represent data such as structures and integers, or a token can simply pass on the control.

These are the types of tokens:

An action node is a key building block in an activity diagram. An action node represents an action to be executed. Action nodes consume input tokens and produce output tokens on pins.

Use a MATLAB® function or a nested activity diagram to describe the behavior of an action node.

A control node routes a logical flow of tokens through the system.

Use control nodes and flows to route tokens. Control nodes can be used to initialize, split, merge, and terminate token flows.

A pin acts as a buffer for object tokens and directs tokens into or out of an action node. The directionality of the pin represents input or output. You can connect pins by object flows.

Use pins to route an object token to or from an Action Node. Pins are also used to store object tokens before or during execution. You can use pins only for object flows.

A parameter node route tokens into or out of a nested activity diagram. When a pin is created, a corresponding parameter node will be created inside the nested activity.

Use parameter node to define how tokens enter or leave a nested activity. There are two types of parameter nodes input and output.

A flow in an activity diagram connects two nodes. A dashed line represents a control flow. A solid line represents an object flow.

These are the types of flows:

A type defines the contents of a token that flows through a pin. A type has dimension, unit, complexity, minimum, maximum and description.

These are three token types in activity diagrams:

Version History

Introduced in R2024a

See Also

Functions

Tools

Blocks

Topics