Stateflow Chart Considerations
hisf_0065: Type cast operations in Stateflow to improve code compliance
ID: Title | hisf_0065: Type cast operations in Stateflow® to improve code compliance | |
---|---|---|
Description | In Stateflow charts that use the C action language, use the
:= notation to protect against Stateflow implicit data type casting for integer and fixed-point
calculations to data types other than input data types. | |
Note | If you follow this and other modeling guidelines, you increase the likelihood of generating code that complies with the coding standards. | |
Rationale | To avoid implicit casts in the generated code that might violate coding standards. | |
Model Advisor Checks | Check assignment operations in Stateflow Charts (Simulink Check) | |
References |
| |
Prerequisites | hisl_0060: Configuration parameters that improve MISRA C:2012 compliance | |
Last Changed | R2024a |
hisf_0211: Protect against use of unary operators in Stateflow Charts to improve code compliance
ID: Title | hisf_0211: Protect against use of unary operators in Stateflow Charts to improve code compliance | |
---|---|---|
Description | To improve code compliance of the generated code: | |
A | Do not use unary minus operators on unsigned data types. | |
Note | The MATLAB® and C action languages do not restrict the use of unary minus operators on unsigned expressions. | |
Rationale | Improve code compliance of the generated code. | |
Model Advisor Checks | Check Stateflow charts for unary operators (Simulink Check) | |
References |
| |
Last Changed | R2017b |