From OpenSCADAWiki
Jump to: navigation, search

Subsequently, there was a need for logging, as well as the accounting of current violations. If for logging it is enough to form messages of the program with the specified category and message format, but for accounting of the current violations some buffer is needed. Such buffer has been added as an add-in over the subsystem of messages, and the addressing to it is carried out by the inversion of the message level. So, writing a message with the level "-2" and the category "TEST" will put the message in the violation buffer and duplicate it in the message archive. When requesting messages with a negative level, messages will be taken from the buffer of violations. Deletion-removal of the violation is made by writing a message with the same category "TEST" and non-negative level.