#include <OVR_OSX_HIDDevice.h>
Public Member Functions | |
virtual bool | GetFeatureReport (UByte *data, UInt32 length) |
HIDDevice (HIDDeviceManager *manager) | |
HIDDevice (HIDDeviceManager *manager, IOHIDDeviceRef device) | |
bool | HIDInitialize (const String &path) |
void | HIDShutdown () |
UInt64 | OnTicks (UInt64 ticksMks) |
bool | Read (UByte *pData, UInt32 length, UInt32 timeoutMilliS) |
bool | ReadBlocking (UByte *pData, UInt32 length) |
virtual bool | SetFeatureReport (UByte *data, UInt32 length) |
bool | Write (UByte *data, UInt32 length) |
virtual | ~HIDDevice () |
Private Types | |
enum | { ReadBufferSize = 96 } |
Private Member Functions | |
void | closeDevice (bool wasUnplugged) |
void | deviceAddedCallback (io_iterator_t iterator) |
void | deviceRemovedCallback () |
CFStringRef | generateRunLoopModeString (IOHIDDeviceRef device) |
void | hidReportCallback (UByte *pData, UInt32 length) |
bool | initInfo () |
bool | openDevice () |
bool | setupDevicePluggedInNotification () |
Static Private Member Functions | |
static void | staticDeviceAddedCallback (void *pContext, io_iterator_t iterator) |
static void | staticDeviceRemovedCallback (void *pContext, IOReturn result, void *pSender) |
static void | staticHIDReportCallback (void *pContext, IOReturn result, void *pSender, IOHIDReportType reportType, uint32_t reportId, uint8_t *pReport, CFIndex reportLength) |
Private Attributes | |
HIDDeviceDesc | DevDesc |
IOHIDDeviceRef | Device |
UInt16 | FeatureReportBufferLength |
HIDDeviceManager * | HIDManager |
bool | InMinimalMode |
UInt16 | InputReportBufferLength |
UInt16 | OutputReportBufferLength |
UByte | ReadBuffer [ReadBufferSize] |
io_iterator_t | RepluggedNotification |
IONotificationPortRef | RepluggedNotificationPort |
Friends | |
class | HIDDeviceManager |
Definition at line 31 of file OVR_OSX_HIDDevice.h.
anonymous enum [private] |
Definition at line 90 of file OVR_OSX_HIDDevice.h.
OVR::OSX::HIDDevice::HIDDevice | ( | HIDDeviceManager * | manager | ) |
Definition at line 433 of file OVR_OSX_HIDDevice.cpp.
OVR::OSX::HIDDevice::HIDDevice | ( | HIDDeviceManager * | manager, |
IOHIDDeviceRef | device | ||
) |
Definition at line 442 of file OVR_OSX_HIDDevice.cpp.
OVR::OSX::HIDDevice::~HIDDevice | ( | ) | [virtual] |
Reimplemented from OVR::HIDDevice.
Definition at line 448 of file OVR_OSX_HIDDevice.cpp.
void OVR::OSX::HIDDevice::closeDevice | ( | bool | wasUnplugged | ) | [private] |
Definition at line 712 of file OVR_OSX_HIDDevice.cpp.
void OVR::OSX::HIDDevice::deviceAddedCallback | ( | io_iterator_t | iterator | ) | [private] |
Definition at line 530 of file OVR_OSX_HIDDevice.cpp.
void OVR::OSX::HIDDevice::deviceRemovedCallback | ( | ) | [private] |
Definition at line 767 of file OVR_OSX_HIDDevice.cpp.
CFStringRef OVR::OSX::HIDDevice::generateRunLoopModeString | ( | IOHIDDeviceRef | device | ) | [private] |
Definition at line 779 of file OVR_OSX_HIDDevice.cpp.
bool OVR::OSX::HIDDevice::GetFeatureReport | ( | UByte * | data, |
UInt32 | length | ||
) | [virtual] |
Implements OVR::HIDDevice.
Definition at line 812 of file OVR_OSX_HIDDevice.cpp.
bool OVR::OSX::HIDDevice::HIDInitialize | ( | const String & | path | ) |
Definition at line 456 of file OVR_OSX_HIDDevice.cpp.
void OVR::OSX::HIDDevice::hidReportCallback | ( | UByte * | pData, |
UInt32 | length | ||
) | [private] |
Definition at line 751 of file OVR_OSX_HIDDevice.cpp.
void OVR::OSX::HIDDevice::HIDShutdown | ( | ) |
Definition at line 641 of file OVR_OSX_HIDDevice.cpp.
bool OVR::OSX::HIDDevice::initInfo | ( | ) | [private] |
Definition at line 487 of file OVR_OSX_HIDDevice.cpp.
UInt64 OVR::OSX::HIDDevice::OnTicks | ( | UInt64 | ticksMks | ) | [virtual] |
Reimplemented from OVR::OSX::DeviceManagerThread::Notifier.
Definition at line 825 of file OVR_OSX_HIDDevice.cpp.
bool OVR::OSX::HIDDevice::openDevice | ( | ) | [private] |
Definition at line 552 of file OVR_OSX_HIDDevice.cpp.
bool OVR::OSX::HIDDevice::Read | ( | UByte * | pData, |
UInt32 | length, | ||
UInt32 | timeoutMilliS | ||
) |
bool OVR::OSX::HIDDevice::ReadBlocking | ( | UByte * | pData, |
UInt32 | length | ||
) |
bool OVR::OSX::HIDDevice::SetFeatureReport | ( | UByte * | data, |
UInt32 | length | ||
) | [virtual] |
Implements OVR::HIDDevice.
Definition at line 788 of file OVR_OSX_HIDDevice.cpp.
bool OVR::OSX::HIDDevice::setupDevicePluggedInNotification | ( | ) | [private] |
Definition at line 658 of file OVR_OSX_HIDDevice.cpp.
void OVR::OSX::HIDDevice::staticDeviceAddedCallback | ( | void * | pContext, |
io_iterator_t | iterator | ||
) | [static, private] |
Definition at line 524 of file OVR_OSX_HIDDevice.cpp.
void OVR::OSX::HIDDevice::staticDeviceRemovedCallback | ( | void * | pContext, |
IOReturn | result, | ||
void * | pSender | ||
) | [static, private] |
Definition at line 761 of file OVR_OSX_HIDDevice.cpp.
void OVR::OSX::HIDDevice::staticHIDReportCallback | ( | void * | pContext, |
IOReturn | result, | ||
void * | pSender, | ||
IOHIDReportType | reportType, | ||
uint32_t | reportId, | ||
uint8_t * | pReport, | ||
CFIndex | reportLength | ||
) | [static, private] |
Definition at line 739 of file OVR_OSX_HIDDevice.cpp.
bool OVR::OSX::HIDDevice::Write | ( | UByte * | data, |
UInt32 | length | ||
) |
friend class HIDDeviceManager [friend] |
Definition at line 34 of file OVR_OSX_HIDDevice.h.
HIDDeviceDesc OVR::OSX::HIDDevice::DevDesc [private] |
Definition at line 88 of file OVR_OSX_HIDDevice.h.
IOHIDDeviceRef OVR::OSX::HIDDevice::Device [private] |
Definition at line 87 of file OVR_OSX_HIDDevice.h.
Definition at line 95 of file OVR_OSX_HIDDevice.h.
HIDDeviceManager* OVR::OSX::HIDDevice::HIDManager [private] |
Definition at line 86 of file OVR_OSX_HIDDevice.h.
bool OVR::OSX::HIDDevice::InMinimalMode [private] |
Definition at line 85 of file OVR_OSX_HIDDevice.h.
Definition at line 93 of file OVR_OSX_HIDDevice.h.
Definition at line 94 of file OVR_OSX_HIDDevice.h.
UByte OVR::OSX::HIDDevice::ReadBuffer[ReadBufferSize] [private] |
Definition at line 91 of file OVR_OSX_HIDDevice.h.
io_iterator_t OVR::OSX::HIDDevice::RepluggedNotification [private] |
Definition at line 98 of file OVR_OSX_HIDDevice.h.
IONotificationPortRef OVR::OSX::HIDDevice::RepluggedNotificationPort [private] |
Definition at line 97 of file OVR_OSX_HIDDevice.h.