Get the zero representation of a data type
void *ssGetDataTypeZero(SimStruct *S, DTypeId id)
SimStruct representing an S-Function block.
ID of a data type.
A pointer (
void *) to the zero representation
of the data type specified by
valid and the data type's size has been set. Otherwise, returns
reports an error.
Use to obtain the zero representation of a data type, which is the value that represents zero for the custom data type.
Because this macro reports any error that occurs, you do not
need to use
The Simulink® Coder™ product does not support S-functions that contain custom data types. Attempting to generate code for a model that contains this macro results in an error.
The following example gets the zero representation of a custom data type.
const void *myZero = ssGetDataTypeZero(S, id); if(myZero == NULL) return;