Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

ssGetDWorkDataType

Get the data type of a data type work vector

Syntax

DTypeId ssGetDWorkDataType(SimStruct *S, int_T vector)

Arguments

S

SimStruct representing an S-Function block.

vector

Index of a data type work vector, where the index is one of 0, 1, 2, ... ssGetNumDWork(S)-1.

Returns

The data type ID of the DWork vector specified by the index vector if the data type is valid. Otherwise, returns INVALID_DTYPE_ID.

Description

Use to obtain the data type of a particular DWork vector. For a list of built-in values for the data type ID DTypeId, see ssGetInputPortDataType.

Languages

C, C++

Example

The following example checks the data type of the first DWork vector.

DTypeId dt = ssgetDWorkDataType(S, 0);
if(dt == INVALID_DTYPE_ID) {
     ssSetErrorStatus(S,"Invalid data type.");
}

Introduced before R2006a

Was this topic helpful?