Skip to Main Content Skip to Search
Product Documentation

ssGetDataTypeId - Get the ID of a data type

Syntax

DTypeId ssGetDataTypeId(SimStruct *S, char *name)

Arguments

S

SimStruct representing an S-Function block.

name

Name of a data type.

Returns

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.

Description

Use to obtain the data type ID of a custom data type.

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.

Languages

C, C++

Example

The following example gets the ID of the data type named Color.

int_T id = ssGetDataTypeId (S, "Color");
if(id == INVALID_DTYPE_ID) return;

See Also

ssRegisterDataType

  


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