RTW.ModelSpecificCPrototype class - Package: RTW
Describe signatures of functions for model
Description
A ModelSpecificCPrototype object describes
the signatures of the step and initialization functions for a model.
You must use this in conjunction with the attachToModel method.
Construction
Methods
| addArgConf | Add argument configuration information for Simulink model
port to model-specific C function prototype |
| attachToModel | Attach model-specific C function prototype to loaded ERT-based Simulink model |
| getArgCategory | Get argument category for Simulink model port from
model-specific C function prototype |
| getArgName | Get argument name for Simulink model port from model-specific
C function prototype |
| getArgPosition | Get argument position for Simulink model port from
model-specific C function prototype |
| getArgQualifier | Get argument type qualifier for Simulink model port
from model-specific C function prototype |
| getDefaultConf | Get default configuration information for model-specific
C function prototype from Simulink model |
| getFunctionName | Get function name from model-specific C function prototype |
| getNumArgs | Get number of function arguments from model-specific C
function prototype |
| getPreview | Get model-specific C function prototype code preview |
| runValidation | Validate model-specific C function prototype against Simulink model |
| setArgCategory | Set argument category for Simulink model port in
model-specific C function prototype |
| setArgName | Set argument name for Simulink model port in model-specific
C function prototype |
| setArgPosition | Set argument position for Simulink model port in
model-specific C function prototype |
| setArgQualifier | Set argument type qualifier for Simulink model port
in model-specific C function prototype |
| setFunctionName | Set function name in model-specific C function prototype |
Copy Semantics
Handle. To learn how this affects your use of the class, see Copying Objects in
the MATLAB Programming Fundamentals documentation.
Examples
The code below creates a function control object, a,
and uses it to add argument configuration information to the model.
% Open the rtwdemo_counter model and specify the System Target File
rtwdemo_counter
set_param(gcs,'SystemTargetFile','ert.tlc')
%% Create a function control object
a=RTW.ModelSpecificCPrototype
%% Add argument configuration information for Input and Output ports
addArgConf(a,'Input','Pointer','inputArg','const *')
addArgConf(a,'Output','Pointer','outputArg','none')
%% Attach the function control object to the model
attachToModel(a,gcs)
Alternatives
You can create a function control object using the Model Interface
dialog box.
See Also
 | RTW.ModelCPPVoidClass | | RTW.ModelSpecificCPrototype |  |
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
Get this Simulink Kit