Writing S-Functions    
ssSetDataTypeSize

Set the size of a custom data type.

Syntax

Arguments

S
   SimStruct representing an S-Function block.

id
   ID of data type.

size
   Size of the custom data type in bytes.

Description

Sets the size of the data type specified by id to size. If the call is successful, the macro returns 1 (true), otherwise, it returns 0 (false). Use this macro in mdlInitializeSizes to set the size of a data type you have registered.

Example

The following example registers and sets the size of the custom data type named Color to 4 bytes.

Languages

C

See Also
ssRegisterDataType, ssGetDataTypeSize


  ssSetCallSystemOutput ssSetDataTypeZero