alertGet()
Queries only the last alert attributes of a data point.
Synopsis
int alertGet(time t, int count, string dp, anytype value [, time t2, int
count2, string dp2, anytype value2, ...]);
int alertGet(time t, int count, dyn_string dps, dyn_anytype
values);
Parameters
Parameter | Meaning |
---|---|
t1 | Time of occurrence |
count 1 | Serial number |
dp1 | Data point name |
value1 | Value to be set |
dps | Dynamic string of data point names. |
values | Dynamic type of values to be set. |
Return Value
If the function was successfully executed, it returns 0 and in the event of a failure -1. The return value 0 only indicates that the message was correctly sent to Event Manager.
Errors
Independently of the return value, errors can be retrieved with getLastError() (nonexistent data points, missing arguments or no read permission).
Description
Queries only the last alert attributes of a data point. Historical alerts will not be queried.
Those historical alerts which have been configured that they are not deleted can still be queried by alertGet().
Example
main()
{
bool ok;
atime a;
ok = TRUE;
dpGet("ExampleDP_AlertHdl1.:_alert_hdl.._ok_range",ok);
alertGet(a, getACount(a), "ExampleDP_AlertHdl1.:_alert_hdl.._value", ok);
DebugN("alertGet: atime = " + (string) a + ", value = " + ok);
}
Assignment
Data point function
Availability
CTRL