ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference
|
IOUPSPlugInInterface |
Declared In: |
Represents and provides management functions for a UPS device.
Used to create an async run loop event source of the plugin.
Used to obtain the capabilities of the UPS device.
Used to poll the current state of the UPS.
Used to obtain the properties of the UPS device such as the name and transport.
Send a command to the UPS.
Set the callback that should be called to handle an event from the UPS.
createAsyncEventSource |
Used to create an async run loop event source of the plugin.
IOReturn ( *createAsyncEventSource)( void *thisPointer, CFTypeRef *source);
thisPointer
The UPS Interface to use.
source
Pointer to a CFTypeRef. It is expected that this point to either a CFRunLoopSourceRef or a CFRunLoopTimerRef.
An IOReturn error code.
This is an allocation method. Thus the caller must release the object that is returned.
getCapabilities |
Used to obtain the capabilities of the UPS device.
IOReturn ( *getCapabilities)( void *thisPointer, CFSetRef *capabilities);
thisPointer
The UPS Interface to use.
capabilities
Pointer to a CFSetRef that contains the capabilities.
An IOReturn error code.
Keys are defined in IOPSKeys.h and begin with kIOPS. This is not an allocation method. Thus the caller does not release the CFSet that is returned.
getEvent |
Used to poll the current state of the UPS.
IOReturn ( *getEvent)( void *thisPointer, CFDictionaryRef *event);
thisPointer
The UPS Interface to use.
event
Pointer to a CFDictionaryRef that contains the current event state.
An IOReturn error code.
Keys are defined in IOPSKeys.h and begin with kIOPS. This is not an allocation method. Thus the caller does not release the CFDictionary that is returned.
getProperties |
Used to obtain the properties of the UPS device such as the name and transport.
IOReturn ( *getProperties)( void *thisPointer, CFDictionaryRef *properties);
thisPointer
The UPS Interface to use.
properties
Pointer to a CFDictionaryRef that contains the properties.
An IOReturn error code.
Property keys are defined in IOPSKeys.h. This is not an allocation method. Thus the caller does not release the CFDictionary that is returned.
sendCommand |
Send a command to the UPS.
IOReturn ( *sendCommand)( void *thisPointer, CFDictionaryRef command);
thisPointer
The UPS Interface to use.
command
CFDictionaryRef that contains the command.
An IOReturn error code.
Command keys are defined in IOPSKeys.h and begin with kIOPSCommand. An error should be returned if your device does not know how to respond to a command.
setEventCallback |
Set the callback that should be called to handle an event from the UPS.
IOReturn ( *setEventCallback)( void *thisPointer, IOUPSEventCallbackFunction callback, void *callbackTarget, void *callbackRefcon);
thisPointer
The UPS Interface to use.
callback
A callback handler of type IOUPSEventCallbackFunction.
callbackTarget
The address to be targeted by this callback.
callbackRefcon
A user specified reference value. This will be passed to all callback functions.
An IOReturn error code.
The provided callback method should be called whenever there is a change of state in the UPS. This should be used in conjunction with createAsyncEventSource.
|
Last Updated: 2009-02-23