Main Content

addPhysicalInterface

Add physical interface to Architectural Data section of Simulink data dictionary

Since R2023b

    Description

    example

    interfaceObj = addPhysicalInterface(archDataObj,interfaceName) adds a physical interface specified by interfaceName to archDataObj, the Architectural Data section of the data dictionary and returns an interface object that represents the physical interface.

    Examples

    collapse all

    To add a physical interface with a specified name to the Architectural Data section of a data dictionary, use the addPhysicalInterface function. For an example that shows more of the workflow for related functions, see Create Architectural Data Object and Use It to Configure Architectural Data.

    Add a physical interface to the data dictionary.

    physInterface1 = addPhysicalInterface(archDataObj,"PhysicalInterface")
    physInterface1 = 
    
      PhysicalInterface with properties:
    
               Name: 'PhysicalInterface'
        Description: ''
           Elements: [0×0 Simulink.dictionary.archdata.PhysicalElement]
              Owner: [1×1 Simulink.dictionary.ArchitecturalData]

    Add a data element to the physical interface and configure its properties.

    element = addElement(physInterface1,'PhysDE');
    element.Description = 'I am an element of a physical interface.'
    element = 
    
      PhysicalElement with properties:
    
               Name: 'PhysDE'
               Type: ''
        Description: 'I am an element of a physical interface.'
              Owner: [1×1 Simulink.dictionary.archdata.PhysicalInterface]

    Input Arguments

    collapse all

    Architectural Data object, specified as a Simulink.dictionary.ArchitecturalData object.

    Name of the physical interface, specified as a character vector or string scalar.

    Example: "PhysInterface"

    Output Arguments

    collapse all

    Physical interface object, returned as a Simulink.dictionary.archdata.PhysicalInterface object.

    Version History

    Introduced in R2023b