Purpose
Format and send an attribute change event to the Event Server.
Syntax
#include "spd.h" SPD_errorTP SPD_ReportValue( char *objectClass, char *objectName, char *hostName, char *application, char *applicationQualifier, time_t timeValue, int attrCount, char *attrNames[], char *attrValues[] );
Description
objectClass
identifies the class of the object that contains the attributes whose values are being reported (for example, a disk drive or application).
objectName
identifies the instance of the object class (for example, a disk drive name or application name).
hostName
identifies the name of the host on which the object instance resides.
application
identifies the application that is reporting the attribute value. 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 reporting of the value. Specify the result of the C time function, or 0 if no local time is to be associated with reporting of the value.
attrCount
is the number of attributes whose values are being reported for the specified object.
attrNames
is an array of the attribute names whose values are being reported. There must be attrCount entries in this array. It is the responsibility of the calling program to allocate the memory for this array. There is a one-to-one correspondence between the entries in the attrNames and attrValues arrays, such that the first entry in the attrNames array corresponds to the first entry of the attrValues array. Names in this array cannot be NULL.
attrValues
is an array of the attribute values being reported. There must be attrCount entries in this array. It is the responsibility of the calling program to allocate the memory for this array. There is a one-to-one correspondence between the entries in the attrNames and attrValues arrays, such that the first entry in the attrNames array corresponds to the first entry of the attrValues array. Values in this array can be NULL.
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_badAttributeCN | Bad attrNames parameter |
SPD_badHostCN | Bad hostName parameter |
SPD_commFailureCN | Communications problem |
See Also
See also the client function SPD_HandleEvent ([xref text to replace]).
Use of this function is illustrated in 6.4.