Stateflow | ![]() ![]() |
Return the specified code flag
Syntax
Description
The getCodeFlag
method returns the value of a particular code flag whose name you specify.
Arguments
thisTarget |
The target for which to get code flag value |
|
The short string name of the code flag for which to get value. See CodeFlagsInfo Property of Targets for a list of these names. |
Returns
Example
Assume that the Target object x
represents the simulation target sfun
for the loaded model. If m
is the Stateflow machine object for this model, you can obtain x
with the following command:
The simulation target has two code flags: debug
and echo
. You can verify this by looking at the CodeFlagsInfo
property of x
. See the description of this property in the reference section Target Properties for more information.
In the Stateflow user interface the debug
code flag is enabled or disabled through the Enable debugging/animation check box in the Coder Options dialog. By default, this flag is turned on for the simulation target. You can verify this with the following command:
Similarly, you can check the value of the echo
code flag, which is enabled or disabled through the Echo expressions without semicolons check box of the same dialog, with the following command:
See Also
The method setCodeFlag
![]() | get | help | ![]() |