isAlertAttribute()
Indicates whether the passed attribute is an alarm attribute. That means whether is can be queried with alertGetPeriod(), alertConnect(), SELECT ALERT or can be set with alertSet().
Synopsis
bool isAlertAttribute(string attr);
Parameters
Parameter | Description |
---|---|
attr | Attribute to be checked. |
Return value
Returns TRUE if the attribute could be either queried with alertGet()/alertConnect()/SELECT ALERT or could be set with alertSet().
Description
Indicates whether the passed attribute is an alarm attribute. That means whether is can be queried with alertGetPeriod(), alertConnect(), SELECT ALERT or can be set with alertSet().
Due to the special behavior of virtual attributes the function isAlertAttribute() will return FALSE for the _event attribute, even though it MUST be set using alertSet().
Example
main()
{
DebugN(isAlertAttribute(\"System1:ExampleDP_AlertHdl1.:
_alert_hdl.._alert_fore_color\"));
DebugN(isAlertAttribute(\"System1:ExampleDP_AlertHdl1.:
_alert_hdl.._ack_state\"));
DebugN(isAlertAttribute(\"System1:ExampleDP_AlertHdl1.:
_archive.._archive\"));
DebugN(isAlertAttribute(\"System1:ExampleDP_AlertHdl1.:
_original.._value\"));
}
/* Output in the Log Viewer:
WCCOAui1:[1]
WCCOAui1:[1]
WCCOAui1:[0]
WCCOAui1:[0]
*/
Assignment
Data point functions
Availability
CTRL