| Contents | Index |
extern DTypeId ssRegisterDataTypeFxpFSlopeFixExpBias
(SimStruct *S,
int isSigned,
int wordLength,
double fractionalSlope,
int fixedExponent,
double bias,
int obeyDataTypeOverride)
SimStruct representing an S-function block.
TRUE if the data type is signed.
FALSE if the data type is unsigned.
Total number of bits in the data type, including any sign bit.
Fractional slope of the data type.
Exponent of the slope of the data type.
Bias of the scaling of the data type.
TRUE indicates that the Data Type Override setting for the subsystem is to be obeyed. Depending on the value of Data Type Override, the resulting data type could be Double, Single, Scaled double, or the fixed-point data type specified by the other arguments of the function.
FALSE indicates that the Data Type Override setting is to be ignored.
This function fully registers a fixed-point data type with the Simulink software and returns a data type ID. Note that unlike the standard Simulink function ssRegisterDataType, you do not need to take any additional registration steps. The data type ID can be used to specify the data types of input and output ports, run-time parameters, and DWork states. It can also be used with all the standard data type access methods in simstruc.h, such as ssGetDataTypeSize.
Use this function if you want to register a fixed-point data type by specifying the word length, fractional slope, fixed exponent, and bias. Alternatively, you can use one of the other fixed-point registration functions:
Use ssRegisterDataTypeFxpBinaryPoint to register a data type with binary-point-only scaling.
Use ssRegisterDataTypeFxpScaledDouble to register a scaled double.
Use ssRegisterDataTypeFxpSlopeBias to register a data type with [Slope Bias] scaling.
If the registered data type is not one of the Simulink built-in data types, a Simulink Fixed Point software license is checked out. To prevent a Simulink Fixed Point software license from being checked out when you simply open or view a model, protect registration calls with
if (ssGetSimMode(S) != SS_SIMMODE_SIZES_CALL_ONLY ) ssRegisterDataType...
Note Because of the nature of the assignment of data type IDs, you should always use API functions to extract information from a data type ID about a data type in your S-function. For more information, refer to Data Type IDs. |
To use this function, you must include fixedpoint.h and fixedpoint.c. For more information, see Structure of the S-Function.
C
None. Data types should be registered in the Simulink software. Registration of data types is not supported in TLC.
ssRegisterDataTypeFxpBinaryPoint, ssRegisterDataTypeFxpScaledDouble, ssRegisterDataTypeFxpSlopeBias

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |