Module GseosMonitor
Previous  Top  Next

The main purpose of the Monitor module is to verify the integrity of the incomming data and to report alarm conditions. It works similar like the Decoder in that it hooks on the arrival of a data block. However, opposed to the Decoder it does not generate any child blocks but reports alarms or issues commands depending on the outcome of the monitor condition. In most cases a simple limit check will be sufficient, but even complex monitor conditions are easy to manage.

In order for the monitor to be called on the arrival of a specific block it has to be registered with this block. To do this you have to create a monitor object and add it to the list of monitors for that block. Every time the block arrives your monitor condition is evaluated.

To construct a monitor you have to instantiate a monitor object of the monitor class. The constructor of the monitor object takes the unique monitor name and the monitor condition you want evaluated. The monitor function itself takes one parameter. The block that triggers the monitor is passed into the monitor function. Therefore when you register one decoder for multiple blocks you will be able to distinguish which block arrived.
The monitor can be disabled by setting bEnable to false. It can be reenabled by setting bEnable to true. The variable dwCnt holds the number of times the monitor has been executed. You can reset this value if desired.
If the monitor raises an exception it will be disabled. You should catch all exceptions you don't want to terminate the monitor.
It is advised that you give your monitor function a documentation string. This documentation will be displayed in the GSEOS Explorer.

For more information please refer to the examples:

·Limit Check  
·Counter Check