Usage

Initialization

To use AlarmLib functions first you must initialize an Alarm Collector. This will be used internally to set and monitor alarms. The following example assumes that a properly Mapp AlarmX configuration called gAlarmXCore and a variable of type alarmCol_typ called alarmCollector is declared. Only a single Alarm Collector is required per a project.

alarmCollector.in.par.coreMpLink := ADR(gAlarmXCore);
alarmCollectorInit(ADR(alarmCollector));

Cyclic Operation

For Alarm Collector to work properly, a cyclic function must called.

alarmCollectorCyclic();

Setting Alarms

Alarms can be set using alarmColSetError or alarmColSetErrorExt. Alarms are not required to be configured prior to use. Alarm Collector will configure a Mapp Alarm with the name provided, because of this the name provided should be unique through the application. Note: If no name is provided, Alarm Collector will generate one.

alarmColSetErrorExt(ADR('MyAlarm'), ADR('This is an Alarm set with Alarm Collector'), 101, 1, ADR(error1Ack), ADR('some additional info'), ADR('and maybe more info :)'));