Writing Monitors for the Event Monitoring Service (December 1999)

58 Chapter2
The EMS Application Programming Interface (API)
Function Descriptions
rm_uncompress_object
Used by target applications to decipher a notification message using the
built-in TCP/IP or UDP/IP notification method.
Function Prototype
rm_object_addr rm_uncompress_object
( char *buf,
rm_error_type *error_code );
Parameters
buf
The ASCII data representing a Notify Object. This data was
received in a TCP/IP or UDP/IP notification message sent by EMS.
error_code
Provides additional information about failure conditions of
the function. Valid values are listed in the file
/opt/resmon/include/resmon.h.
Returned Value
Upon successful completion, rm_uncompress_object() returns the
object requested. If an error occurs, the value returned is
(rm_object_addr)NULL, and error_code is set to one of the values
described in the file /opt/resmon/include/resmon.h.
Usage Notes
This function allocates memory using malloc(3C). The memory must be
freed by the user using the rm_destroy() function when the object is no
longer needed. If rm_create() returns an error, no object is created, so it
is not necessary to call rm_destroy().