Embedded Systems Solutions logo  
 
 
 
     
     
  Products  
     
   
     
 
 
     
  Events & Promos  
 
     
 
Axivion Logo
 
 
     
  Coding Guidelines How-To +++ First Thoughts  
     
  Coding Guidelines How to 1st Thoughts Banner  
     
 

[by Dr. Daniel Simon, Head of Professional Services at Axivion]

For use in Safety or Security, a range of Standard Programming Guides is available. In automotive industry, MISRA and AUTOSAR C++14 standards are widely used. While covering many different aspects, the standards leave it up to the user to define additional project or company specific rules.

As a first example, consider “Naming Conventions”. Before actually running a check for rules, the rules should be properly defined, communicated, and agreed in the development teams. The degree of agreement depends on the respective work culture – but accepting the rules is key. Equally, a sound definition is key to acceptance.

To illustrate with an example, I analyse the following rule for Naming in the C programming language:

Rule NAMING-C-22:

 
     
 
  • Global names begin with a prefix that identifies the module unambiguously.
  • The prefix shall be written in all uppercase letters.
  • The Prefix must be separated by underscore from the remaining name.
  • The length of the prefix should not exceed 5 characters.
 
     
 
Learn More Scroll Top