Main Content

systemcomposer.arch.InitializeFunction

Software component initialize function

Since R2024b

    Description

    An InitializeFunction object represents an initialize function in a software architecture model.

    Use the Functions Editor from the toolstrip on a software architecture model to schedule the order of component initialization in your software architecture.

    Creation

    Get initialize functions in a software architecture model with the Initialization property on the systemcomposer.arch.Architecture object.

    model = systemcomposer.openModel('ThrottleControlComposition');
    sim('ThrottleControlComposition');
    initializeFunctions = model.Architecture.Initialization

    Properties

    expand all

    Architecture model where element belongs, specified as a systemcomposer.arch.Model object.

    Component where function is defined, specified as a systemcomposer.arch.Component object.

    Parent architecture of element where function is defined, specified as a systemcomposer.arch.Architecture object.

    Initialization order of components, specified as a row vector of numeric values.

    Example: [model.Architecture.Initialization.Order]

    Data Types: uint64

    Universal unique identifier, specified as a character vector.

    Example: '91d5de2c-b14c-4c76-a5d6-5dd0037c52df'

    Data Types: char

    Object Functions

    decreaseOrderChange component initialization order to earlier
    increaseOrderChange component initialization order to later
    destroyRemove model element

    Examples

    collapse all

    This example shows how to schedule the order of component initialization.

    1. Open and simulate the model to populate it with functions.

      model = systemcomposer.openModel("scServiceInterfaceExample");
      sim("scServiceInterfaceExample");
    2. View the initialize functions sorted by order of component initialization.

      initializeFunctions = {model.Architecture.Initialization.Name}'
    3. Decrease the order of the first function.

      decreaseOrder(model.Architecture.Initialization(1))
      initializeFunctions = {model.Architecture.Initialization.Name}'
    4. Increase the order of the third function.

      increaseOrder(model.Architecture.Initialization(3))
      initializeFunctions = {model.Architecture.Initialization.Name}'

    More About

    expand all

    Version History

    Introduced in R2024b