Main Content

systemcomposer.interface.FunctionArgument

Function argument in function element in client-server interface

    Description

    A FunctionArgument object describes the attributes of an argument in a function element systemcomposer.interface.FunctionElement.

    Creation

    Set a function prototype using the setFunctionPrototype function and then get a function argument using the getFunctionArgument function.

    setFunctionPrototype(element,"y=f0(u)")
    argument = getFunctionArgument(functionElement,"y")

    Properties

    expand all

    Parent service interface of function argument, specified as a systemcomposer.interface.ServiceInterface object.

    Function argument name, specified as a character vector or string.

    Example: "y"

    Data Types: char | string

    Type of function argument, specified as a systemcomposer.ValueType object.

    Dimensions of function argument, specified as a character vector or string.

    Data Types: char | string

    Description of function argument, specified as a character vector or string.

    Data Types: char | string

    Universal unique identifier for function argument, specified as a character vector.

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

    Data Types: char

    Unique external identifier, specified as a character vector. The external ID is preserved over the lifespan of the function argument and through all operations that preserve the UUID.

    Data Types: char

    Object Functions

    setNameSet name for value type, function argument, interface, or element
    setTypeSet shared type on data element or function argument
    setDimensionsSet dimensions for value type
    setUnitsSet units for value type
    setComplexitySet complexity for value type
    setMinimumSet minimum for value type
    setMaximumSet maximum for value type
    setDescriptionSet description for value type
    createOwnedTypeCreate owned value type on data element or function argument
    destroyRemove model element

    Examples

    collapse all

    Create a new model.

    model = systemcomposer.createModel("archModel","SoftwareArchitecture",true)

    Create a service interface.

    interface = addServiceInterface(model.InterfaceDictionary,"newServiceInterface")

    Create a function element.

    element = addElement(interface,"newFunctionElement")

    Set a function prototype to add function arguments.

    setFunctionPrototype(element,"y=f0(u)")

    Get a function argument.

    argument = getFunctionArgument(element,"y")
    argument = 
    
      FunctionArgument with properties:
    
          Interface: [1×1 systemcomposer.interface.ServiceInterface]
            Element: [1×1 systemcomposer.interface.FunctionElement]
               Name: 'y'
               Type: [1×1 systemcomposer.ValueType]
         Dimensions: '1'
        Description: ''
               UUID: '018b4e55-fa8f-4250-ac2b-df72bf620feb'
        ExternalUID: ''

    More About

    expand all

    Version History

    Introduced in R2022a