Main Content

coder.codedescriptor.CodeDescriptor class

Package: coder.codedescriptor

Return information about generated code


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.


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.


expand all

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

Example: 'rtwdemo_comments'

Path of the build folder where the model is built.

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


expand all


collapse all

  1. Build the model.

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

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

    allFunctionInterfaceTypes = getAllFunctionInterfaceTypes(codeDescObj)
        {'Output'    }
        {'Update'    }
        {'Terminate' }
Introduced in R2018a