Main Content

getElement

Get object for signal interface element

Description

example

element = getElement(interface,elementName) gets the object for an element in a signal interface.

Examples

collapse all

Add an interface newsignal to the interface dictionary of the model, and add an element newelement with type double. Then get the object for the element.

arch = systemcomposer.createModel('newmodel',0);
interface = addInterface(arch.InterfaceDictionary,'newsignal');
addElement(interface,'newelement','Type','double');
element = getElement(interface,'newelement')
element = 
  SignalElement with properties:

      Interface: [1×1 systemcomposer.interface.SignalInterface]
           Name: 'newelement'
           Type: 'double'
     Dimensions: '1'
          Units: ''
     Complexity: 'real'
        Minimum: '[]'
        Maximum: '[]'
    Description: ''
           UUID: 'f42c8166-e4ad-4488-926a-293050016e1a'
    ExternalUID: ''

Input Arguments

collapse all

Interface object containing elements to be identified, specified as a systemcomposer.interface.SignalInterface object.

Name of element to be identified, specified as a character vector.

Data Types: char

Output Arguments

collapse all

New signal element object in an interface, returned as a systemcomposer.interface.SignalElement object.

Introduced in R2019a