Products & Services Solutions Academia Support User Community Company

Learn more about Real-Time Workshop Embedded Coder   

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

RTW.ModelSpecificCPrototypeCreate model-specific C prototype object

Methods

addArgConfAdd argument configuration information for Simulink model port to model-specific C function prototype
attachToModelAttach model-specific C function prototype to loaded ERT-based Simulink model
getArgCategoryGet argument category for Simulink model port from model-specific C function prototype
getArgNameGet argument name for Simulink model port from model-specific C function prototype
getArgPositionGet argument position for Simulink model port from model-specific C function prototype
getArgQualifierGet argument type qualifier for Simulink model port from model-specific C function prototype
getDefaultConfGet default configuration information for model-specific C function prototype from Simulink model
getFunctionNameGet function name from model-specific C function prototype
getNumArgsGet number of function arguments from model-specific C function prototype
getPreviewGet model-specific C function prototype code preview
runValidationValidate model-specific C function prototype against Simulink model
setArgCategorySet argument category for Simulink model port in model-specific C function prototype
setArgNameSet argument name for Simulink model port in model-specific C function prototype
setArgPositionSet argument position for Simulink model port in model-specific C function prototype
setArgQualifierSet argument type qualifier for Simulink model port in model-specific C function prototype
setFunctionNameSet 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.ModelSpecificCPrototype.addArgConf
Controlling Generation of Function Prototypes — Explains how to configure model function prototypes in generated code
  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS