ssGetInputPortDataType
Get the data type of an input port
Syntax
DTypeId ssGetInputPortDataType(SimStruct *S,int_T port)
Arguments
-
S
-
SimStruct representing an S-Function block.
-
port
-
Index of an input port.
Returns
The data type ID of the input port specified byport
. ReturnsDYNAMICALLY_TYPED
if the input port inherits its data type.
Description
UsessGetInputPortDataType
to obtain the data type of a particular input port. The following table is a list of built-in data types associated with the indexDTypeId
.
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 of9
或更高版本修复等代表自定义数据类型ed-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++
Example
See the S-functionsfun_runtime3.c
used insfcndemo_runtime
.