SPD_SendAlarm

Purpose

Format and send an alert event to the Event Server. The alert cannot include user- defined attributes. Use SPD_SendUserAlarm instead if the alert includes user-defined attributes.

Syntax

#include "spd.h"
SPD_errorTP SPD_SendAlarm(
   char *objectClass,
   char *objectName,
   char *alarmIdentifier,
   char *alarmQualifier,
   char *alarmText,
   char *helpText,
   char *externalActionList,
   SPD_alarmSeverityTP severity,
   char *application,
   char *applicationQualifier,
   time_t timeValue
);

Description

objectClass

identifies the object that is the source of the alert (for example, a system or application).

objectName

identifies the instance of the object class that is the source of the alert (for example, a system name or application name).

alarmIdentifier

identifies the type of alert being raised. This value can also be the name of the optional help text file for the alert, if the value you specify for parameter helpText is NULL. This value can also be the identifier of the external action list that is associated with raising this alert, if the value you specify for parameter externalActionList is NULL.

alarmQualifier

further qualifies the type of alert when multiple alerts with the same alarmIdentifier are raised and must be kept distinct from one another. This parameter is optional. Specify NULL if the alert is not further qualified.

alarmText

is a description of the alert condition.

helpText

is used to provide help text for this alert. Help text is identified for this alert using the following set of rules:

externalActionList

is the identifier of the external action list that is associated with raising this alert. External action lists are defined in alert policies. If no external action list is associated with raising this alert, or if the identifier of the external action list is the same as the value specified for parameter alarmIdentifier, specify NULL.

severity

indicates the severity of the alert. See 8.1 for a list of values for the severity of an alert. Do not specify either SPD_clearCN or SPD_acknowledgeCN. Instead, use the function SPD_ClearAlarm to clear an alert, or the function SPD_AckAlarm to acknowledge an alert.

application

identifies the application that is raising the alert. 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 the alert. Specify the result of the C time function, or 0 if you want no local time raising to be associated with 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_badAlarmQualifierCN

Bad alarmQualifier parameter

SPD_badTextCN

Bad alarmText parameter

SPD_badSeverityCN

Bad severity parameter

SPD_commFailureCN

Communications problem

See Also

See also the following client functions:

Use of this function is illustrated in 6.2.