Purpose
Format and send an event to the Event Server that clears an alert. Clearing an alert causes any pending external actions to be terminated, initiates any external actions associated with clearing the alert, and removes the alert from the Event Server.
Syntax
#include "spd.h" SPD_errorTP SPD_ClearAlarm( char *objectClass, char *objectName, char *alarmIdentifier, char *alarmQualifier, char *clearText, char *externalActionList, char *application, char *applicationQualifier, time_t timeValue );
Description
objectClass
identifies the type of object that is the source of the alert (for example, a system or application). objectClass must match the objectClass specified when the alert was raised (see [xref text to replace] and [xref text to replace]).
objectName
identifies the instance of the object class that is the source of the alert (for example, a system or application name). objectName must match the objectName specified when the alert was raised.
alarmIdentifier
identifies the type of alert being cleared. alarmIdentifier must match the alarmIdentifier specified when the alert was raised.
alarmQualifier
further qualifies the type of alert when multiple instances of the alert are raised and must be kept distinct from one another. alarmQualifier must match the alarmQualifier specified when the alert was raised. This parameter is optional. Specify NULL if the alert is not further qualified.
clearText
is an optional string that explains why the alert is being cleared. Specify NULL to supply no text.
externalActionList
is the identifier of the external action list that is associated with clearing this alert. External action lists are defined in alert policies. If no external action list is associated with clearing this alert, or if the external action list is the same as alarmIdentifier, specify NULL.
application
identifies the application that raised the alert. application must match the application specified when the alert was raised. Specify NULL if the application is the same as the application that you specified on the call to SPD_InitClient.
applicationQualifier
further qualifies the application in the case where more than one instance of the application may be present. Specify NULL if the application qualifier is the same as the application qualifier that you specified on the call to SPD_InitClient.
timeValue
is the local time to be associated with clearing the alert. Specify the result of the C time function, or 0 if you want no local time to be associated with clearing the alert.
Return Value
The return value indicates whether an error occurred, as follows:
Return | Indication |
SPD_normalCN | No error |
SPD_notInitializedCN | SPD_InitClient not called previously |
SPD_badClassCN | Bad objectClass parameter |
SPD_badNameCN | Bad objectName parameter |
SPD_badAlarmIdCN | Bad alarmIdentifier parameter |
SPD_commFailureCN | Communications problem |
See Also
See also the following client functions:
SPD_AckAlarm (see [xref text to replace])
SPD_HandleEvent (see [xref text to replace])
SPD_InitClient (see [xref text to replace])
SPD_SendAlarm (see [xref text to replace])
SPD_SendUserAlarm (see [xref text to replace])