AddDBalarm
- Last UpdatedJul 05, 2024
- 2 minute read
The function of this Business Logic Tier (BLT) is to add an alarm to a RealTime database (RTDB) table point. It is for internal use only. Alarm generated solely by executing this Remote Procedure Call (RPC) are transient unless additional RTDB processing is performed.
Syntax
AddDBalarm <tableName> <ptName> <fldname> <category> <message> <persistent> <inalarm> <flashing> <severity> <purgetime> <timestamp> [<host>]
Note: The syntax shown is contained in one line. The RTDB must be open before calling AddDBalarm. Use VDB.OpenDatabase() to open the RTDB.
Parameters
|
Name |
Description |
|---|---|
|
tableName |
RTDB table name. |
|
ptName |
RTDB point name. |
|
fldname |
The point field name. |
|
category |
The category to which the alarm belongs. This can be arbitrary. It is used to distinguish alarms assigned to the same point. The category must be one word with no spaces. |
|
message |
Alarm message to display. |
|
persistent |
Indicates whether or not the alarm remains in the alarm summary after acknowledgement or purge. |
|
inalarm |
Can be yes, no, or nochange. This indicates whether or not the point is declared to be in an alarm state (yes), a normal state (no), or has not changed (nochange). |
|
flashing |
Determines if the point should flash to indicate the alarm. |
|
severity |
Severity of the alarm: low, medium or high. |
|
purgetimer |
Purge timer in seconds. The timer starts after the alarm is acknowledged. The alarm is purged from the almsum table if the purge time has expired and the persistent flag is "no". |
|
timestamp |
Timestamp for alarm (or 0 for current time). |
|
host |
Name of the host that generated the alarm. |
Comments
If the alarm represents a state change, for example, the Hi limit is exceeded, then the inalarm parameter is used to flag whether or not the RTDB point is considered to be in the alarm state or not. If the momentary alarm, such as a command failure alarm, the point’s alarm state should not be changed and the inalarm parameter should be set to nochange.
The severity specified for the alarm using addDBalarm indicates the severity level for which the alarm should appear in the Alarm Summary. This does not affect the alarm severity of the RTDB point. Apply the update command to the flag.severity field.