Applies To: |
|
Summary: |
I have designed a
multi-cluster project and have therefore several alarm
servers.
Can I display all my alarms (from my different clusters) on a single alarm page? The help topic for the AlarmDsp function seems to suggest it is not possible: "If the client is connected to clusters containing more than one Alarms Server then the Cluster Name must be specified or an error will be returned." |
Solution: |
The help file is
incorrect and it should read:
"If a cluster name is not specified, alarms are returned for all clusters."
If you configure alarms from different clusters, you will be able to display them all on a singel alarm page by calling AlarmDsp(250, 25, 0) ->the 4th argument ("cluster") is not specified, so all alarms will be displayed by default.This is the case in the CSV_Include alarm page for instance.
If you wish to "filter" your alarms by cluster, you will simply need to dynamically set the cluster argument to whichever cluster you wish. For example: AlarmDsp(250, 25, 0, "ClusterOne") However, if you wish to display alarms for another cluster without changing page, you will first need to call twice the AlarmDsp to display the full list of alarms, and then only specify the cluster you are interested in: AlarmDsp(250, 25, 0, ""); AlarmDsp(250, 25, 0, ""); AlarmDsp(250, 25, 0, "ClusterTwo");
An example of a cicode work around is available below. To filter your alarms, you would need to change the value of the ClusterOne.iFilter Integer (to be defined as a disk tag for instance) . Its allowable values are 0 (display alarms from all clusters), 1 (display alarms from 1st cluster only), or 2 (display alarms from 2nd cluster only). This function is meant to be called from a cicode object instead of directly calling AlarmDsp().
GLOBAL INT iCase=0
FUNCTION FilterAlarmsByCluster() SELECT CASE ClusterOne.iFilter CASE 0 AlarmDsp(250, 10, 0,"") iCase=0 CASE 1 IF iCase<>1 THEN AlarmDsp(250, 10, 0,"") AlarmDsp(250, 10, 0,"") END iCase=1; AlarmDsp(250, 10, 0,"ClusterOne") CASE 2 IF iCase<>2 THEN AlarmDsp(250, 10, 0,"") AlarmDsp(250, 10, 0,"") END iCase=2; AlarmDsp(250, 10, 0,"ClusterTwo") END SELECT END |
Keywords: |
Related Links
Attachments