Documentation

setArgCategory

Class:RTW.ModelCPPArgsClass
Package:RTW

Set argument category for金宝appmodel port in model-specific C++ class interface

Syntax

setArgCategory (obj,portName,category)

Description

setArgCategory (obj,portName,category)sets the category —'Value','Pointer', or'Reference'— of the argument corresponding to a specified Simulink®model inport or outport in a specified model-specific C++ class interface.

Input Arguments

obj

Handle to a model-specific C++ class interface control object, such as a handle previously returned byobj=RTW.ModelCPPArgsClassorobj=RTW.getClassInterfaceSpecification(modelName).

portName

Character vector specifying the unqualified name of an inport or outport in your Simulink model.

category

Character vector specifying the argument category —'Value','Pointer', or'Reference'— to be set for the specified Simulink model port.

Note

If you change the argument category for an outport from'Pointer'to'Value', the change causes the argument to move to the first argument position whenattachToModelorrunValidationis called.

Alternatives

To set argument categories in the Simulink Configuration Parameters graphical user interface, go to theInterfacepane and click theConfigure C++ Class Interfacebutton. This button launches the Configure C++ class interface dialog box, where you can display and configure the step method for your model class. In theI/O arguments step methodview of this dialog box, click theGet Default Configurationbutton to display step method argument categories that you can examine and modify. For more information, seeConfigure Step Method for Your Model Class.