AlertServiceClient::setOutOfService()
Places datapoint elements into maintenance mode by swapping their alert classes to dedicated maintenance counterparts.
Synopsis
int AlertServiceClient::setOutOfService(dyn_string dpes, string reason = "", bool force = false);
Parameters
| Parameter | Description |
|---|---|
| dpes | List of datapoint element paths to set out-of-service. |
| reason | Optional reason text for the out-of-service action. Logged in the Security Event audit trail. |
| force | If TRUE, the system creates missing maintenance alert classes automatically by copying the original class configuration. |
Return value
Returns 0 on success, -1 on failure.
Errors
Missing or invalid arguments. Insufficient user permissions (bit 5 required). Missing maintenance alert classes when force is FALSE.
Details
The function places the specified datapoint elements into maintenance mode. It swaps the alert class configuration to maintenance counterparts (alarm-maint, warning-maint, info-maint). Alerts continue to be generated but use the maintenance classes, which are visually distinct and excluded from operational KPIs. All pending unacknowledged alerts on the affected elements are automatically acknowledged.
The original alert classes are stored and restored when maintenance mode is removed via AlertServiceClient::resetOutOfService(). If a required maintenance alert class does not exist and force is TRUE, the system creates it by copying the original alert class.
Assignment
AlertService functions
Availability
CTRL
