20. Debugging and Testing the OpenSCADA project
To monitor the quality of code and test the performance of various parts of the system the special modules are written that perform testing with the issue of testing protocol. These modules must be executed after the completion of any part of the project.
21. Rules for design and commenting of the sources of OpenSCADA and its modules
When writing and design of the sources of the OpenSCADA system and its modules you must to follow the rules:
- indent between the levels of enclosure: 4 characters;
- braces of opening and closing must be placed in separate lines at the level of the previous text;
- it is possible to write an enclosure in the single line with the previous level of enclosure, in case of increasing the readability of the code;;
- distance between the descriptions of the functions of at least one character;
- the distance between the definition of variables and the text of the program at least one symbol;
- it is possible to define variables in the text while saving the readability;
- to avoid long lines more than 100 characters;
- preprocessor commands must be located on the first level, regardless of the current level of the text;
- for the formatting the source code, inherited from the other free applications and examples, it is recommended to use the utility:
indent -bli0 -i4 -l100 -npsl -npcs -prs -nsaf -nsai -ts8 <filename>.
Commenting rules of the OpenSCADA sources:
- обязательному комментированию и тщательному описанию подлежат объявления классов;
- объявления публичных методов классов должны быть тщательно описаны с индивидуальным описанием каждого параметра;
- объявления публичных атрибутов также необходимо тщательно комментировать;
- текст функций не нуждаются в тщательном комментировании, однако неявные места желательно комментировать.
22. Условные обозначения по тексту и в исходниках
???? -- сомнение в целесообразности данного участка;
?!?! -- участок не полностью реализован;
!!!! -- участок требует переосмысления.