Skip to Main Content Skip to Search
Product Documentation

ssGetDataTypeStorageContainerSize - Return storage container size of registered data type

Syntax

extern size_t ssGetDataTypeStorageContainerSize
                                          (SimStruct *S, DTypeId
                                            dataTypeId)

Arguments

S

SimStruct representing an S-function block.

dataTypeId

Data type ID of the registered data type for which you want to know the container size.

Description

This function returns the storage container size of the data type designated by dataTypeId. This function returns the same value as would the sizeof( ) function; it does not return the word length of either the storage container or the data type. To get the word length of the storage container, use ssGetDataTypeFxpContainWordLen. To get the word length of the data type, use ssGetDataTypeFxpWordLength.

The container of the size returned by this function stores input and output signals, run-time parameters, and DWorks during Simulink simulations. It is also the appropriate size measurement to pass to functions like memcpy( ).

This function errors out when ssGetDataTypeIsFxpFltApiCompat returns FALSE.

Requirement

To use this function, you must include fixedpoint.h and fixedpoint.c. For more information, see Structure of the S-Function.

Languages

C

Examples

An sfix24_En10 data type has a word length of 24, but is actually stored in 32 bits during simulation. For this signal,

TLC Functions

FixPt_GetDataTypeStorageContainerSize

See Also

ssGetDataTypeFxpContainWordLen, ssGetDataTypeFxpWordLength, ssGetDataTypeStorageContainCat

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS