ssGetInputPortDataType
Get the data type of an input port
Syntax
DTypeId ssGetInputPortDataType(SimStruct *S,int_T port)
Arguments
SSimStruct that represents an S-Function block.
portIndex of an input port.
Returns
The data type ID of the input port specified by port. Returns
DYNAMICALLY_TYPED if the input port inherits its data
type.
Description
Use ssGetInputPortDataType to obtain the data type of a
particular input port. The following table is a list of built-in data types
associated with the index DTypeId.
| Integer Data Type ID (DTypeId) | Built-in Data Type |
|---|---|
0 | SS_DOUBLE |
1 | SS_SINGLE |
2 | SS_INT8 |
3 | SS_UINT8 |
4 | SS_INT16 |
5 | SS_UINT16 |
6 | SS_INT32 |
7 | SS_UINT32 |
8 | SS_BOOLEAN |
Integer values of 9 or greater represent custom data types such
as fixed-point types, bus types, and enumerated data types. The meaning of each
value depends on the number and kind of custom data types that you use in a
model.
Languages
C, C++
Examples
See the S-function sfun_runtime3.c used in sfcndemo_runtime.
Version History
Introduced before R2006a