Functions Editor - Visualize and author component functions in software architectures - MATLAB (original) (raw)

Visualize and author component functions in software architectures

Since R2021b

Description

The Functions Editor allows you to author functions in the architecture level for inline components and schedule component initialization for reference components. You can then implement Simulink® behaviors for your authored functions.

Use the Functions Editor to:

Functions Editor Tool

Open the Functions Editor

Examples

Parameters

expand all

Add a function to a software component by clicking add function.

Remove a function from a software component by clicking remove function.

Increase the execution order of a function by clicking increase execution order.

This option is only available if Order functions by dependency is unchecked.

Decrease the execution order of a function by clicking decrease execution order.

This option is only available if Order functions by dependency is unchecked.

Update the software architecture diagram to refresh the functions in theFunctions Editor by clicking update diagram.

Select this check box to order functions in the Functions Editor by dependency.

You can order functions automatically based on their data dependencies. This functionality is available for functions from behavior models. To enable automatic sorting, select the Order functions by dependency check box or enable OrderFunctionsByDependency on the architecture model.

Programmatic Use

More About

expand all

A software architecture is a specialization of an architecture for software-based systems, including the description of software compositions, component functions, and their scheduling.

Use software architectures in System Composer to author software architecture models composed of software components, ports, and interfaces. Design your software architecture model, define the execution order of your component functions, simulate your design in the architecture level, and generate code.

A software component is a specialization of a component for software entities, including its interfaces.

Implement a Simulink export-function, rate-based, or JMAAB model as a software component, simulate the software architecture model, and generate code.

A software composition is a diagram of software components and connectors that represents a composite software entity, such as a module or application.

Encapsulate functionality by aggregating or nesting multiple software components or compositions.

A function is an entry point where a transfer of program control occurs and can be defined in a software component.

You can apply stereotypes to functions in software architectures, edit sample times, and specify the function period using the Functions Editor.

A service interface defines the functional interface between client and server components. Each service interface consists of one or more function elements.

Once you have defined a service interface in the Interface Editor, you can assign it to client and server ports using the Property Inspector. You can also use the Property Inspector to assign stereotypes to service interfaces.

A function element describes the attributes of a function in a client-server interface.

Edit the function prototype on a function element to change the number and names of inputs and outputs of the function. Edit function element properties as you would edit other interface element properties. Function argument types can include built-in types as well as bus objects. You can specify function elements to support:

A function argument describes the attributes of an input or output argument in a function element.

You can set the properties of a function argument in the Interface Editor just as you would other value types: Type,Dimensions, Units, Complexity,Minimum, Maximum, andDescription.

Version History

Introduced in R2021b

expand all

Starting in R2024b, you can schedule the order of component initialization for reference components in software architectures from the Initialize tab of theFunctions Editor.

Starting in R2023b, when you select software components in the canvas, the functions related to the selected software component are highlighted in the Functions Editor.

Starting in R2023a, the Functions Editor is enhanced to visualize the differences between message, service, and software functions.

Starting in R2022b, you can author asynchronous client-server interfaces in software architecture models. You can schedule the priority of asynchronous services using theFunctions Editor.