beautypg.com

Portability, See also, Hm_registermonitorwarningevent – Rockwell Automation 6182 SDK User Manual

Page 85: Syntax, Remarks

background image

RAC6182-Specific Extensions to the CE API

4–45

Publication 6182-UM002B-EN-P

Portability
This function is specific to the RAC6182 hardware.

See Also
hm_GetMonitorWarningLevels

hm_RegisterMonitorWarningEvent

This function registers to receive a warning of a parameter out-of-limit.
It is prototyped in HardwareMonitorAPI.h.

Syntax

#include

#include

BOOL hm_RegisterMonitorWarningEvent (DWORD dwMonitorIDMask, HANDLE

*phEventHandle)

Remarks
An application that needs to be notified when one or more monitor
parameters enter the warning state should register for an event with this
function. The caller specifies, via dwMonitorIDMask, what parameters
should be used to trigger a warning event when their values exceed
warning levels. An event handle is passed to the caller in
*phEventHandle.

Note:

It is possible to set an event for power fail (to trigger some
clean up before system shutdown), but this event must be a
separate event from that used for general warnings.

If this function succeeds, the caller can wait for the event using one of
the standard Win32 WaitForxxx() functions. Once the event is triggered
and the caller’s thread falls through the WaitForxxx() function, the caller
can determine which monitor sources are currently in the warning state
via the function hm_GetMonitorWarnings. If any of the monitor sources
in question are still in a warning state, the caller can act accordingly.

Note that monitor parameters will vary with time, and may oscillate
about a defined upper or lower warning level for a short period.
Therefore, when a warning state event has been triggered, the calling
application should poll the warning status of any monitor sources of
concern (using hm_GetMonitorWarnings) for a while to ensure that the
monitor source remains in a warning state before acting. Note also that,
to avoid oscillating events due to a lack of input hysteresis, the hardware
monitor driver will not signal an event when a monitor source leaves the
warning state. Applications must poll the device's warning state to
determine when/if it resumes normal operation.

This manual is related to the following products: