Main Content

Functions Editor

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:

  • Author and visualize functions.

    • Add and delete functions.

    • Change the execution order of the functions.

    • Change the name of a function.

    • Change the period of a function.

  • Implement behaviors for functions.

  • Add custom properties to functions using stereotypes.

  • Order component initialization.

Functions Editor Tool

Open the Functions Editor

  • System Composer™ toolstrip: Navigate to Modeling > Functions Editor.

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 the Functions 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

expand all

Use the addFunction function to author functions. Use the createSimulinkBehavior function to create new Simulink rate-based or export-function behaviors and link the software component to the new model.

More About

expand all

Version History

Introduced in R2021b