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 to schedule the order of component initialization in your software architecture.

    Creation

    Get initialize functions in a software architecture model by using 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

    decreaseOrderDecrease component initialization order by 1
    increaseOrderIncrease component initialization order by 1
    destroyRemove model element

    Examples

    collapse all

    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