Documentation

System Level

hisl_0401: Encapsulation of code to improve MISRA C:2012 compliance

ID: Titlehisl_0401: Encapsulation of code to improve MISRA C:2012 compliance
DescriptionTo improve the MISRA C:2012 compliance of the generated code, encapsulate manually inserted code. This code includes, but is not limited to, C, Fortran, and assembly code.
RationaleImprove MISRA C:2012 compliance of the generated code
See Also
Notes

Simulink provides multiple methods for integrating existing code. The user is responsible for encapsulating the generated code.

Encapsulation can be defined as "the process of compartmentalizing the elements of an abstraction that constitute its structure and behavior; encapsulation serves to separate the contractual interface of an abstraction and its implementation" a

References
  • MISRA C:2012, Dir 4.3

Last ChangedR2015b

aBooch, Grady, R. Maksimchuk, M. Engle, B. Young, J. Conallen, K. Houston. Object-Oriented Analysis and Design with Applications. 3rd ed. Boston, MA: Addison-Wesley Professional, 2007.

hisl_0402: Use of custom #pragma to improve MISRA C:2012 compliance

ID: Titlehisl_0402: Use of custom #pragma to improve MISRA C:2012 compliance
DescriptionTo improve the MISRA C:2012 compliance of the generated code, document user defined pragma. In the documentation, include:
AMemory range (start and stop address)
BIntended use
CJustification for using a pragma
RationaleImprove MISRA C:2012 compliance of the generated code
See Also
Notes

The Simulink Report Generator™ documents pragmas.

References
  • MISRA C:2012, Dir 1.1

Last ChangedR2015b

hisl_0403: Use of char data type to improve MISRA C:2012 compliance

ID: Title

hisl_0403: Use of char data type to improve MISRA C:2012 compliance

Description

To improve the MISRA C:2012 compliance of the generated code with custom storage classes that use the char data type, use only:

A

Plain char type for character values.

B

Signed and unsigned char type for numeric values.

Rationale

Improve MISRA C:2012 compliance of the generated code.

See Also

References

  • MISRA C:2012, Rule 10.1

  • MISRA C:2012, Rule 10.2

Last Changed

R2015b

Was this topic helpful?