Download Real-Time Workshop

Transcript
C-API for Interfacing with Signals and Parameters
• rtDataTypeMap array contains information about the various data
types in the model. Each element of this array is of type struct
rtwCAPI-DataTypeMap. The members of this structure provide the data
type name, size of the data type, and information on whether or not the
data is complex.
• rtDimensionMap array contains information about the various data
dimensions in the model. Each element of this array is of type struct
rtwCAPI_DimensionsMap. The members of this structure provide
information on the number of dimensions in the data, the orientation of the
data (whether it is scalar, vector, or a matrix), and the actual dimensions
of the data.
• rtFixPtMap array contains fixed-point information about the signals
and parameters. Each element of this array is of type struct
rtwCAPI_FixPtMap. The members of this structure provide information
about the data’s scaling, bias, exponent, and whether or not the fixed-point
data is signed. If the model does not have fixed-point data (signal or
parameter), Real-Time Workshop assigns NULL or zero values to the
elements of the rtFixPtMap array.
• rtSampleTimeMap array contains sampling information about the model’s
global signals. (This array contains no information about parameters.)
Each element of this array is of type struct rtwCAPI_SampleTimeMap. The
members of this structure provide information about the sample period,
offset, and whether or not the data is frame-based or sample-based.
Example model_capi.c File
This section discusses the generated C-API structures for the demo model
rtwdemo_capi. This model is located in matlabroot/toolbox/rtw/rtwdemos
directory.
17-9