pwrmNotifyFxn
Application Program Interface
2-329
C Interface
Syntax
status = notifyFxn(eventType, eventArg1, eventArg2, clientArg);
Parameters
PWRM_Event
eventType;
/* type of power event */
Arg
eventArg1;
/* event-specific argument */
Arg
eventArg2;
/* event-specific argument */
Arg
clientArg;
/* arbitrary argument */
Return Value
PWRM_NotifyResponse status;
/* returned status */
Description
PWRM_registerNotify registers a function to be called when a specific
power event occurs. Clients, which are typically drivers, register
notification functions they need to run when a particular power event
occurs.
This topic describes the required prototype and behavior of such
notification functions. Your application must provide and register these
functions. Registered functions are called internally by the PWRM
module.
The eventType parameter identifies the type of power event for which the
notify function is being called. This parameter has an enumerated type of
PWRM_Event. The values for this parameter are listed in the
PWRM_registerNotify topic.
The eventArg1 and eventArg2 parameters are event-specific arguments.
Currently, eventArg1 and eventArg2 are used only for V/F scaling events:
❏
PWRM_PENDINGSETPOINTCHANGE.
The eventArg1 holds the
current setpoint, and eventArg2 holds the pending setpoint.
❏
PWRM_DONESETPOINTCHANGE.
The eventArg1 holds the
previous setpoint, and eventArg2 holds the new setpoint.
The clientArg parameter holds the arbitrary argument passed to
PWRM_registerNotify when this function was registered. This argument
may allow one notify function to be used by multiple instances of a driver
(that is, the clientArg can be used to identify the instance of the driver that
is being notified).
pwrmNotifyFxn
Function to be called on a registered power event