Main Content

addServiceInterface

Add service interface to Architectural Data section of Simulink data dictionary

Since R2023b

    Description

    serviceInterfaceObj = addServiceInterface(archDataObj,serviceInterfaceName) adds a service interface specified by serviceInterfaceName to archDataObj, the Architectural Data section of a data dictionary, and returns the Simulink.dictionary.archdata.ServiceInterface object that represents this interface.

    example

    Examples

    collapse all

    To add a service interface with a specified name to a native (unmapped) data dictionary, use the addServiceInterface 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.

    dictName = "MyInterfaces.sldd";
    archDataObj = Simulink.dictionary.archdata.open(dictName);
    
    serviceInterfObj = addServiceInterface(archDataObj,"ServiceInterface1")
    	
    serviceInterfObj = 
    
      ServiceInterface with properties:
    
               Name: 'ServiceInterface1'
        Description: ''
           Elements: [0×0 Simulink.dictionary.archdata.FunctionElement]
              Owner: [1×1 Simulink.dictionary.ArchitecturalData]

    Input Arguments

    collapse all

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

    Service interface name in the Interfaces property array of archDataObj, specified as a character vector or a string scalar.

    Example: "ServiceInterface1"

    Output Arguments

    collapse all

    Service interface object, returned as a Simulink.dictionary.archdata.ServiceInterface object.

    Version History

    Introduced in R2023b