alertSetWait()
Allows data point attributes to be set in a similar way to alertSet()/dpSetWait().
Synopsis
int alertSetWait(time t1, int count1, string dp1, anytype value1 [, time t2,
... ]);
Parameters
Parameter | Description |
---|---|
t1 | Time of occurrence |
count 1 | Serial number |
dp1 | Data point name |
value1 | Value to be set |
Return Value
Returns 0, in the event of a failure returns -1.
Errors
Errors can be retrieved with getLastError(). The return value is then the appropriate error code. An alert is issued in the event of non-existent data points, incorrect parameter transfers or spelling errors.
Details
Works in a similar way to dpSet(), with certain attributes being able to be set to an alert (to the value valueX). As alerts are not only identified by the associated data point dpX, but also by the time of their occurrence tX, this must also be transferred. It is also possible that several alarms are issued at the same time (for example: group alarm). Alarms of this kind are also assigned a serial number countX. Unlike with the function alertSet(), with alertSetWait() the execution of the script is blocked and the program waits for an answer from the event manager.
The attributes and their constants which can be set using alertSet() are described in the chapter _alert_hdl.
Example for the function alertSetWait() that has been taken from the alarm panel implementation.
main()
{
alertSetWait(zeit,count,"Zahl_1.:_alert_hdl.._ack_state",25);
}
Assignment
Alert Handling FunctionsAvailability
CTRL