Writing Monitors for the Event Monitoring Service (December 1999)

26 Chapter2
The EMS Application Programming Interface (API)
Functions
Functions
The EMS API provides the functions listed in Table 2-1:
These functions are described in the following sections. The chapters
“Creating a Resource Monitor” and “Writing a Target Application” give
examples of how to use these functions.
Table 2-1 EMS API Functions
rm_copy() Replicates an object.
rm_create() Creates an object of the type specified by the
user.
rm_destroy() Frees the memory associated with an object.
rm_get() Returns a data item within an object.
rm_get_next_event() Blocks for an event from the EMS API.
rm_log() Prints a user-defined message to a log file.
rm_monitor_start() Establishes communication with the
Registrar and EMS API.
rm_monitor_stop() Terminates communication with the
Registrar and EMS API.
rm_notify() Sends notification of a resource change.
rm_perror() Prints an error message to a log file.
rm_print() Formats an EMS object and outputs (prints)
it to a log file.
rm_send_reply() Sends a reply to the Registrar.
rm_set() Stores a data item in an object.
rm_strerror() Formats an error message and sends it to a
buffer.
rm_uncompress_object() Converts a TCP/IP or UDP/IP notification
message into an EMS object.