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.

ssSetBusOutputAsStruct

Specify whether the output bus signal from an S-function must be virtual or nonvirtual

Syntax

void ssSetBusOutputAsStruct(SimStruct *S, int_T portNum, boolean_T val)

Arguments

S

SimStruct that represents an S-Function block

portNum

The zero-based index of the output port of the S-function block

val

True, if the output signal is a nonvirtual bus and should be converted to a virtual bus; false otherwise

Returns

Nothing

Description

Use this method to specify whether the output bus signal from an S-function must be virtual or nonvirtual. If you specify a virtual bus, Simulink® inserts a Signal Conversion block (with the Output block parameter set to Virtual bus) at the output of the S-function when you update the model.

Languages

C, C++

Example

static void mdlInitializeSizes(SimStruct *S)
{
    char* busName;
    
    /* Bus object name is passed in as a parameter */
    ssGetSFcnParamName(S, 0, &busName);
    ssSetBusOutputObjectName(S, 0, busName);

    /* Output nonvirtual bus */
    ssSetBusInputAsStruct(S, 0, true);
    ssSetBusOutputAsStruct(S, 0, true);

        …
 }

Introduced in R2010a

Was this topic helpful?