ssSetOperatingPointVisibility
Specify whether S-function operating point is accessible in model operating point
Syntax
void ssSetOperatingPointVisibility(S, visibility)
Arguments
S
SimStruct that represents an S-Function block.
visibility
Option to make the operating point for the S-function accessible in the model operating point, specified as
true
orfalse
.true
— Operating point information for the S-function is accessible in theSimulink.op.ModelOperatingPoint
object for the model. You can access the operating point for the S-function using theget
andset
functions.false
(default) — Operating point information is not accessible on theSimulink.op.ModelOperatingPoint
object for the model. The software can still save and restore operating point information for the S-function, but you cannot access the S-function operating point using theget
andset
functions.
Description
Use this function to specify whether operating point information for the S-function is accessible in the model operating point.
When the S-function operating point is accessible, you can access the S-function
operating point in the Simulink.op.ModelOperatingPoint
object for a
model using the get
and set
functions.
When the S-function operating point is not accessible, the software can still save
and restore the operating point for the S-function, but you cannot access the
S-function operating point using the get
and
set
functions.
The S-function operating point returned by the set
function
provides limited ability to view and modify the operating point data. When you
specify the DWork usage type as SS_DWORK_USED_AS_DSTATE
, the
software logs the discrete states of the S-function with the logged states in the
model. The discrete states of the S-function are accessible in logged state data and
in the loggedStates
property of the
Simulink.op.ModelOperatingPoint
object for the model. For more
information, see ssSetDWorkUsageType
.
Languages
C, C++
Examples
Use the ssSetOperatingPointVisibility
function to make the
S-function operating point accessible on the
Simulink.op.ModelOperatingPoint
object for the model that uses
the S-function. This example specifies the visibility as
true
.
static void mdlInitializeSizes(SimStruct* S) { ssSetNumSFcnParams(S, 2); /* two parameters */ if (ssGetNumSFcnParams(S) != ssGetSFcnParamsCount(S)) return; ssSetSFcnParamTunable(S, 0, false); ssSetSFcnParamTunable(S, 1, false); boolean_T visibility = true; ssOperatingPointCompliance setting = USE_DEFAULT_OPERATING_POINT; if (ssGetErrorStatus(S)) return; ssSetOperatingPointCompliance(S, setting); ssSetOperatingPointVisibility(S, visibility); }