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.

ssIsDataTypeABus

Determine whether a data type identifier represents a bus signal

Syntax

boolean_T ssIsDataTypeABus(S, int_T typeID)

Arguments

S

SimStruct that represents an S-Function block

typeID

The data type identifier that represents a signal

Returns

boolean_T

Description

Use to determine whether the data type identifier for a signal represents a bus signal and whether a bus element of another bus signal is itself a bus signal. To obtain the data type identifier for the bus element, use ssGetBusElementDataType.

Languages

C, C++

Example

static void mdlOutputs(SimStruct *S, int_T tid)
 {
    DTypeId    dType    = ssGetOutputPortDataType(S, 0);
    const void *u       = ssGetInputPortSignal(S, 0);
    int        numElems = ssGetNumBusElements(S, dType);
    int        i;
    
    for(i=0; i<numElems; i++) {
        
        if (ssIsDataTypeABus(S, elemType)) {
            /* Sub-bus element */
            ...
        }
     }
  }

Introduced in R2010b

Was this topic helpful?