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?