Get the ID of a data type
DTypeId ssGetDataTypeId(SimStruct *S, char *name)
S
SimStruct representing an S-Function block.
name
Name of a data type.
The ID of the custom data type specified by name
if
name
is a registered type name. Otherwise, returns
INVALID_DTYPE_ID
and reports an error.
Use to obtain the data type ID of a custom data type.
Note
Because this macro reports any error that occurs, you do not need to use
ssSetErrorStatus
to report the error.
For more information about using custom data types in S-functions, see Configure Custom Data Types.
C, C++
The following example gets the ID of the data type named
Color
.
int_T id = ssGetDataTypeId (S, "Color"); if(id == INVALID_DTYPE_ID) return;