getACount()
Returns the internal number of an alarm (count starts at 0) at a particular time.
Synopsis
int getACount( atime AlertTime );
Parameters
Parameter | Description |
---|---|
AlertTime | Time of the alarm |
Return value
The function returns the number of the alarm (count starts at 0) or in the event of an error, -1.
Error
In the event of an error, does not set an error class list.
Description
Returns the number of an internal alert at a time AlertTime in context with dpQuery(ALERT) (if there is an occasion with more than one alert of a data point element).
Example
AcknowledgeDpe(string dpe) { int range; time t; atime At; // get range of the alert dpGet(dpe+":_alert_hdl.._act_range", range); // get time of the alert dpGet(dpe+":_online..stime", t); // make time to be of type "atime" At= makeATime(t, 0, dpe); //make sure acknowledging is needed if (range != 0) // single-acknowledge alert alertSet(t, getACount(At), dpe+":_alert_hdl."+range+"._ack_state", DPATTR_ACKTYPE_SINGLE); } |
Assignment
Data point functions
Availability
CTRL