Skip to Main Content Skip to Search
Product Documentation

ssSetBusOutputObjectName - Specify the name of the bus object that defines the structure and type of the output bus signal

Syntax

void ssSetBusOutputObjectName(SimStruct *S, int_T portNum, char* busName)

Arguments

S

SimStruct that represents an S-Function block

portNum

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

busName

The name of the bus object

Returns

Nothing

Description

Use this method to specify the structure and hierarchy of the output bus signal from an output port of an S-function block. Downstream Bus Selector and Bus Assignment blocks display in their Block Parameters dialog boxes the bus hierarchy and names that the bus object specifies.

Bus S-function Usage Guidelines

Use this S-function in simulations. You cannot use this S-function for code generation.

This S-function does not support bus elements that have any of the following characteristics:

To use this S-function and other bus-related S-functions, before you run the simulation, execute the following MATLAB command:

set_param(block_handle, 'EnableBusSupport', 'on')

To automate setting the EnableBusSupport parameter, use one of the following approaches:

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);

        …
 }

See Also

ssSetBusOutputAsStruct

  


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