Writing Monitors for the Event Monitoring Service (December 1999)

Chapter 3 95
Creating a Resource Monitor
Processing a Monitor Request Event
Processing a Monitor Request Event
A Monitor Request asks the resource monitor whether it is ready to
monitor the resource specified. If so, the monitor will reply with a
positive Monitor Reply. The Monitor Request Event is specified by a
return_type of RM_MONITOR_REQUEST_EVENT from
rm_get_next_event().
Replying to Monitor Request Events
To process a monitor request event for your resource monitor, include the
following information.
Assume success.
Check that the resource requested is supported.
Check polling interval.
Asynchronous monitors should:
only accept a request for polling interval = 0. If a non-zero value is
requested, set RmMonitorReply to RM_POLLING_NOT_SUPPORTED.
avoid getting update events polled by EMS
avoid misleading the user that polling is supported (by including
query requests)
Most state monitors should support a minimum polling interval. If
the requested polling interval is less than the minimum, set the
monitor to reply with RM_POLLTIME and set the minimum supported
polling internal in the RmPollingMinimum field.
If appropriate, set RmOVSeverity.
If resource values are an enumeration that represent allor asubset of
the severities defined in the section “Replying to Subclass Events, set
to RM_OV_ENUMERATION.
If the monitor needs to track resources for which active monitor
requests exist, check the RmLifeTime options:
RM_PREVIEW_REGISTER This checks, but does not register
requests.