Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OVR::Linux::HIDDevice Class Reference

#include "OVR_Linux_HIDDevice.h"

Inheritance diagram for OVR::Linux::HIDDevice:
Inheritance graph
Collaboration diagram for OVR::Linux::HIDDevice:
Collaboration graph

Public Member Functions

 HIDDevice (HIDDeviceManager *manager)
 
 HIDDevice (HIDDeviceManager *manager, int device_handle)
 
virtual ~HIDDevice ()
 
bool HIDInitialize (const String &path)
 
void HIDShutdown ()
 
virtual bool SetFeatureReport (UByte *data, UInt32 length)
 
virtual bool GetFeatureReport (UByte *data, UInt32 length)
 
void OnEvent (int i, int fd)
 
double OnTicks (double tickSeconds)
 
bool OnDeviceNotification (MessageType messageType, HIDDeviceDesc *device_info, bool *error)
 
- Public Member Functions inherited from OVR::HIDDevice
 HIDDevice ()
 
void SetHandler (HIDHandler *handler)
 
- Public Member Functions inherited from OVR::RefCountBase< HIDDevice >
OVR_FORCE_INLINE RefCountBase ()
 
- Public Member Functions inherited from OVR::RefCountBaseStatImpl< RefCountImpl >
 RefCountBaseStatImpl ()
 
- Public Member Functions inherited from OVR::RefCountImpl
void AddRef ()
 
void Release ()
 
- Public Member Functions inherited from OVR::RefCountImplCore
OVR_FORCE_INLINE RefCountImplCore ()
 
virtual ~RefCountImplCore ()
 
int GetRefCount () const
 
void operator= (const RefCountImplCore &)
 
- Public Member Functions inherited from OVR::HIDDeviceBase
virtual ~HIDDeviceBase ()
 

Private Types

enum  { ReadBufferSize = 96 }
 

Private Member Functions

bool initInfo ()
 
bool openDevice (const char *dev_path)
 
void closeDevice (bool wasUnplugged)
 
void closeDeviceOnIOError ()
 
bool setupDevicePluggedInNotification ()
 

Private Attributes

bool InMinimalMode
 
HIDDeviceManagerHIDManager
 
int DeviceHandle
 
HIDDeviceDesc DevDesc
 
UByte ReadBuffer [ReadBufferSize]
 
UInt16 InputReportBufferLength
 
UInt16 OutputReportBufferLength
 
UInt16 FeatureReportBufferLength
 

Friends

class HIDDeviceManager
 

Additional Inherited Members

- Static Public Member Functions inherited from OVR::RefCountImplCore
static void checkInvalidDelete (RefCountImplCore *)
 
- Protected Attributes inherited from OVR::HIDDevice
HIDHandlerHandler
 
- Protected Attributes inherited from OVR::RefCountImplCore
volatile int RefCount
 

Detailed Description

Definition at line 40 of file OVR_Linux_HIDDevice.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
ReadBufferSize 

Definition at line 80 of file OVR_Linux_HIDDevice.h.

Constructor & Destructor Documentation

OVR::Linux::HIDDevice::HIDDevice ( HIDDeviceManager manager)

Definition at line 436 of file OVR_Linux_HIDDevice.cpp.

OVR::Linux::HIDDevice::HIDDevice ( HIDDeviceManager manager,
int  device_handle 
)

Definition at line 445 of file OVR_Linux_HIDDevice.cpp.

OVR::Linux::HIDDevice::~HIDDevice ( )
virtual

Reimplemented from OVR::HIDDevice.

Definition at line 451 of file OVR_Linux_HIDDevice.cpp.

Member Function Documentation

void OVR::Linux::HIDDevice::closeDevice ( bool  wasUnplugged)
private

Definition at line 612 of file OVR_Linux_HIDDevice.cpp.

void OVR::Linux::HIDDevice::closeDeviceOnIOError ( )
private

Definition at line 627 of file OVR_Linux_HIDDevice.cpp.

bool OVR::Linux::HIDDevice::GetFeatureReport ( UByte data,
UInt32  length 
)
virtual

Implements OVR::HIDDevice.

Definition at line 654 of file OVR_Linux_HIDDevice.cpp.

bool OVR::Linux::HIDDevice::HIDInitialize ( const String path)

Definition at line 460 of file OVR_Linux_HIDDevice.cpp.

void OVR::Linux::HIDDevice::HIDShutdown ( )

Definition at line 597 of file OVR_Linux_HIDDevice.cpp.

bool OVR::Linux::HIDDevice::initInfo ( )
private

Definition at line 482 of file OVR_Linux_HIDDevice.cpp.

bool OVR::Linux::HIDDevice::OnDeviceNotification ( MessageType  messageType,
HIDDeviceDesc device_info,
bool *  error 
)

Definition at line 695 of file OVR_Linux_HIDDevice.cpp.

void OVR::Linux::HIDDevice::OnEvent ( int  i,
int  fd 
)
virtual
double OVR::Linux::HIDDevice::OnTicks ( double  tickSeconds)
virtual

Reimplemented from OVR::Linux::DeviceManagerThread::Notifier.

Definition at line 664 of file OVR_Linux_HIDDevice.cpp.

bool OVR::Linux::HIDDevice::openDevice ( const char *  dev_path)
private

Definition at line 556 of file OVR_Linux_HIDDevice.cpp.

bool OVR::Linux::HIDDevice::SetFeatureReport ( UByte data,
UInt32  length 
)
virtual

Implements OVR::HIDDevice.

Definition at line 634 of file OVR_Linux_HIDDevice.cpp.

bool OVR::Linux::HIDDevice::setupDevicePluggedInNotification ( )
private

Friends And Related Function Documentation

friend class HIDDeviceManager
friend

Definition at line 43 of file OVR_Linux_HIDDevice.h.

Field Documentation

HIDDeviceDesc OVR::Linux::HIDDevice::DevDesc
private

Definition at line 78 of file OVR_Linux_HIDDevice.h.

int OVR::Linux::HIDDevice::DeviceHandle
private

Definition at line 77 of file OVR_Linux_HIDDevice.h.

UInt16 OVR::Linux::HIDDevice::FeatureReportBufferLength
private

Definition at line 85 of file OVR_Linux_HIDDevice.h.

HIDDeviceManager* OVR::Linux::HIDDevice::HIDManager
private

Definition at line 76 of file OVR_Linux_HIDDevice.h.

bool OVR::Linux::HIDDevice::InMinimalMode
private

Definition at line 75 of file OVR_Linux_HIDDevice.h.

UInt16 OVR::Linux::HIDDevice::InputReportBufferLength
private

Definition at line 83 of file OVR_Linux_HIDDevice.h.

UInt16 OVR::Linux::HIDDevice::OutputReportBufferLength
private

Definition at line 84 of file OVR_Linux_HIDDevice.h.

UByte OVR::Linux::HIDDevice::ReadBuffer[ReadBufferSize]
private

Definition at line 81 of file OVR_Linux_HIDDevice.h.


The documentation for this class was generated from the following files: