Main Content

coder.codedescriptor.CodeDescriptor Class

Namespace: coder.codedescriptor

Return information about generated code

Description

Create a coder.codedescriptor.CodeDescriptor object to access all the methods defined within the code descriptor API. The coder.codedescriptor.CodeDescriptor object describes the data interfaces, function interfaces, global data stores, local and global parameters in the generated code.

Creation

codeDescObj = coder.getCodeDescriptor(model) creates a coder.codedescriptor.CodeDescriptor object for the specified model.

codeDescObj = coder.getCodeDescriptor(folder) creates a coder.codedescriptor.CodeDescriptor object for the model in the build folder specified in folder.

Properties

expand all

Name of the model for which the code descriptor object is invoked.

Example: 'CustomCodeComments'

Attributes:

GetAccess
public

Path of the build folder where the model is built.

Example: 'C:\Users\Desktop\Work\CustomCodeComments_ert_rtw'

Attributes:

GetAccess
public

Methods

expand all

Examples

collapse all

  1. Open the model.

    openExample(‘CustomCodeComments’)
  2. Build the model.

    slbuild('CustomCodeComments')

  3. Create a coder.codedescriptor.CodeDescriptor object for the required model.

    codeDescObj = coder.getCodeDescriptor('CustomCodeComments')
    
        ModelName: 'CustomCodeComments'
         BuildDir: 'C:\Users\Desktop\Work\CustomCodeComments_ert_rtw'
  4. Return a list of all available function interface types.

    allFunctionInterfaceTypes = getAllFunctionInterfaceTypes(codeDescObj)
        {'Initialize'}
        {'Output'    }
        {'Update'    }
        {'Terminate' }

Version History

Introduced in R2018a