How can I define an S-Function Outport as bus typed?
I want to create an S-Function with a bus-typed Outport. The name of the bus type shall be provided via mask parameter as shown below.
In the current implementation, I am using the code below to assign the mask parameter value to the bus type information
char* busName;
/* Bus object name is passed in as a parameter */
ssGetSFcnParamName(S, 1, &busName);
ssSetBusOutputObjectName(S, 1, busName);
/* Output nonvirtual bus */
ssSetBusOutputAsStruct(S, 1, true);
This however results in the error below
Variable or object 'BusName' in scope from 'ModelName/BlockName/S_Function' is not a Simulink.DataType object
The error refers to 'BusName' which is actually the name of the mask parameter rather than its value. Is it possible to define the Outport's bus type via mask parameter?
Accepted Answer
More Answers (0)
Categories
Find more on Subsystems in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!