Predefined Configurations

As described in section Configuration, you can select a predefined configuration and use it for checking your code.

The predefined configurations currently available are:

  • MonkeyProof MATLAB Coding Standard: A generic and complete set of configurations that reflects the MonkeyProof MATLAB Coding Standard created in agreement with renowned companies that use CC4M.

  • MonkeyProof MATLAB Coding Standard++: This set of configurations contains the configurations of the MonkeyProof MATLAB Coding Standard and adds naming conventions to it. It is useful for anyone who wants to write clean, readable and stable m-code. The coding standards document for this is available on our website.

  • Coder-compatibility: Use this configuration to help you identify parts of your code that are (potentially) not Coder-compatible. M-code that is not Coder-compatible cannot be used to generate C or C++ code. The coding standards document for this is available on our website.

  • MAB/MAAB: The latest MAB (Mathworks Advisory Board) coding standards (previously MAAB) incorporate the modeling rules of JMAAB v5.1 and MAAB v3.0. Also see the Mathworks. The MAB coding standards are for the usage of MATLAB, Simulink, Stateflow and Embedded Coder. The standards for MATLAB are configured in this predefined set of configurations.

  • JMAAB: The JMAAB (Japan MATLAB Automotive Advisory Board) has developed a set of coding standards mostly for Simulink models. There are several standards for the MATLAB code of your models, which are configured in this predefined set of configurations.

After installing the CC4M toolbox, the predefined configuration MonkeyProof MATLAB Coding Standard++ becomes active.

If you want to open one of these configurations, switch to Predefined on the Configuration tab of the CC4M GUI, select the configuration of your choice and click Open and the Configuration Editor opens. If you want to save the configuration, the Save button will be disabled, because it is not allowed to save configuration files in the folder for predefined configurations. You will have to save the file in a different location, with Save as. The configuration file is then considered a Custom configuration.

You can obtain a list of all available configurations by using

configFiles = listPredefinedConfigurations()

which returns a cell array of all predefined configurations shipped with CC4M.

From the MATLAB command window a predefined configuration can be activated by using

monkeyproof.cc4m.activateConfigurationFile('MonkeyProof MATLAB Coding Standard++')

(with MonkeyProof MATLAB Coding Standard++ the name of the predefined configuration set) and a configuration will open in the Configuration Editor by using

monkeyproof.cc4m.openConfigurationFile('MonkeyProof MATLAB Coding Standard++')