SDL  2.0
CHIDDevice Class Reference
+ Collaboration diagram for CHIDDevice:

Public Member Functions

 CHIDDevice (int nDeviceID, hid_device_info *pInfo)
 
 ~CHIDDevice ()
 
int IncrementRefCount ()
 
int DecrementRefCount ()
 
int GetId ()
 
const hid_device_infoGetDeviceInfo ()
 
hid_device * GetDevice ()
 
void ExceptionCheck (JNIEnv *env, const char *pszMethodName)
 
bool BOpen ()
 
void SetOpenPending ()
 
void SetOpenResult (bool bResult)
 
void ProcessInput (const uint8_t *pBuf, size_t nBufSize)
 
int GetInput (unsigned char *data, size_t length)
 
int SendOutputReport (const unsigned char *pData, size_t nDataLen)
 
int SendFeatureReport (const unsigned char *pData, size_t nDataLen)
 
void ProcessFeatureReport (const uint8_t *pBuf, size_t nBufSize)
 
int GetFeatureReport (unsigned char *pData, size_t nDataLen)
 
void Close (bool bDeleteDevice)
 

Data Fields

hid_device_ref< CHIDDevicenext
 

Private Attributes

pthread_mutex_t m_refCountLock = PTHREAD_MUTEX_INITIALIZER
 
int m_nRefCount = 0
 
int m_nId = 0
 
hid_device_infom_pInfo = nullptr
 
hid_device * m_pDevice = nullptr
 
bool m_bIsBLESteamController = false
 
pthread_mutex_t m_dataLock = PTHREAD_MUTEX_INITIALIZER
 
hid_buffer_pool m_vecData
 
pthread_mutex_t m_cvLock = PTHREAD_MUTEX_INITIALIZER
 
pthread_cond_t m_cv = PTHREAD_COND_INITIALIZER
 
bool m_bIsWaitingForOpen = false
 
bool m_bOpenResult = false
 
bool m_bIsWaitingForFeatureReport = false
 
int m_nFeatureReportError = 0
 
hid_buffer m_featureReport
 

Detailed Description

Definition at line 348 of file hid.cpp.

Constructor & Destructor Documentation

◆ CHIDDevice()

CHIDDevice::CHIDDevice ( int  nDeviceID,
hid_device_info pInfo 
)
inline

Definition at line 351 of file hid.cpp.

References hid_device::m_nId, hid_device_info::product_id, and hid_device_info::vendor_id.

Referenced by HIDDeviceConnected().

352  {
353  m_nId = nDeviceID;
354  m_pInfo = pInfo;
355 
356  // The Bluetooth Steam Controller needs special handling
357  const int VALVE_USB_VID = 0x28DE;
358  const int D0G_BLE2_PID = 0x1106;
359  if ( pInfo->vendor_id == VALVE_USB_VID && pInfo->product_id == D0G_BLE2_PID )
360  {
362  }
363  }
hid_device_info * m_pInfo
Definition: hid.cpp:684
unsigned short product_id
Definition: hidapi.h:59
unsigned short vendor_id
Definition: hidapi.h:57
int m_nId
Definition: hid.cpp:683
bool m_bIsBLESteamController
Definition: hid.cpp:686

◆ ~CHIDDevice()

CHIDDevice::~CHIDDevice ( )
inline

Definition at line 365 of file hid.cpp.

References FreeHIDDeviceInfo().

366  {
368 
369  // Note that we don't delete m_pDevice, as the app may still have a reference to it
370  }
hid_device_info * m_pInfo
Definition: hid.cpp:684
static void FreeHIDDeviceInfo(hid_device_info *pInfo)
Definition: hid.cpp:326

Member Function Documentation

◆ BOpen()

bool CHIDDevice::BOpen ( )
inline

Definition at line 432 of file hid.cpp.

References g_HIDDeviceManagerCallbackHandler, g_JVM, g_midHIDDeviceManagerOpen, g_ThreadKey, get_timespec_ms(), LOGD, LOGV, hid_device::m_nId, and NULL.

Referenced by hid_open_path().

433  {
434  // Make sure thread is attached to JVM/env
435  JNIEnv *env;
436  g_JVM->AttachCurrentThread( &env, NULL );
437  pthread_setspecific( g_ThreadKey, (void*)env );
438 
439  m_bIsWaitingForOpen = false;
441  ExceptionCheck( env, "BOpen" );
442 
443  if ( m_bIsWaitingForOpen )
444  {
445  hid_mutex_guard cvl( &m_cvLock );
446 
447  const int OPEN_TIMEOUT_SECONDS = 60;
448  struct timespec ts, endtime;
449  clock_gettime( CLOCK_REALTIME, &ts );
450  endtime = ts;
451  endtime.tv_sec += OPEN_TIMEOUT_SECONDS;
452  do
453  {
454  if ( pthread_cond_timedwait( &m_cv, &m_cvLock, &endtime ) != 0 )
455  {
456  break;
457  }
458  }
459  while ( m_bIsWaitingForOpen && get_timespec_ms( ts ) < get_timespec_ms( endtime ) );
460  }
461 
462  if ( !m_bOpenResult )
463  {
464  if ( m_bIsWaitingForOpen )
465  {
466  LOGV( "Device open failed - timed out waiting for device permission" );
467  }
468  else
469  {
470  LOGV( "Device open failed" );
471  }
472  return false;
473  }
474 
475  m_pDevice = new hid_device;
476  m_pDevice->m_nId = m_nId;
477  m_pDevice->m_nDeviceRefCount = 1;
478  LOGD("Creating device %d (%p), refCount = 1\n", m_pDevice->m_nId, m_pDevice);
479  return true;
480  }
static jmethodID g_midHIDDeviceManagerOpen
Definition: hid.cpp:337
static JavaVM * g_JVM
Definition: hid.cpp:46
bool m_bIsWaitingForOpen
Definition: hid.cpp:694
void ExceptionCheck(JNIEnv *env, const char *pszMethodName)
Definition: hid.cpp:405
static jobject g_HIDDeviceManagerCallbackHandler
Definition: hid.cpp:336
bool m_bOpenResult
Definition: hid.cpp:695
#define NULL
Definition: begin_code.h:164
hid_device * m_pDevice
Definition: hid.cpp:685
pthread_mutex_t m_cvLock
Definition: hid.cpp:692
static pthread_key_t g_ThreadKey
Definition: hid.cpp:47
#define LOGV(...)
Definition: hid.cpp:25
int m_nId
Definition: hid.cpp:683
static uint64_t get_timespec_ms(const struct timespec &ts)
Definition: hid.cpp:343
#define LOGD(...)
Definition: hid.cpp:26
pthread_cond_t m_cv
Definition: hid.cpp:693

◆ Close()

void CHIDDevice::Close ( bool  bDeleteDevice)
inline

Definition at line 653 of file hid.cpp.

References g_HIDDeviceManagerCallbackHandler, g_JVM, g_midHIDDeviceManagerClose, g_ThreadKey, hid_device::m_nId, and NULL.

Referenced by hid_close(), and HIDDeviceDisconnected().

654  {
655  // Make sure thread is attached to JVM/env
656  JNIEnv *env;
657  g_JVM->AttachCurrentThread( &env, NULL );
658  pthread_setspecific( g_ThreadKey, (void*)env );
659 
661  ExceptionCheck( env, "Close" );
662 
663  hid_mutex_guard dataLock( &m_dataLock );
664  m_vecData.clear();
665 
666  // Clean and release pending feature report reads
667  hid_mutex_guard cvLock( &m_cvLock );
670  m_nFeatureReportError = -ECONNRESET;
671  pthread_cond_broadcast( &m_cv );
672 
673  if ( bDeleteDevice )
674  {
675  delete m_pDevice;
676  m_pDevice = nullptr;
677  }
678  }
static JavaVM * g_JVM
Definition: hid.cpp:46
void ExceptionCheck(JNIEnv *env, const char *pszMethodName)
Definition: hid.cpp:405
hid_buffer m_featureReport
Definition: hid.cpp:698
static jobject g_HIDDeviceManagerCallbackHandler
Definition: hid.cpp:336
static jmethodID g_midHIDDeviceManagerClose
Definition: hid.cpp:341
bool m_bIsWaitingForFeatureReport
Definition: hid.cpp:696
void clear()
Definition: hid.cpp:249
void clear()
Definition: hid.cpp:160
pthread_mutex_t m_dataLock
Definition: hid.cpp:688
#define NULL
Definition: begin_code.h:164
hid_device * m_pDevice
Definition: hid.cpp:685
hid_buffer_pool m_vecData
Definition: hid.cpp:689
pthread_mutex_t m_cvLock
Definition: hid.cpp:692
static pthread_key_t g_ThreadKey
Definition: hid.cpp:47
int m_nId
Definition: hid.cpp:683
pthread_cond_t m_cv
Definition: hid.cpp:693
int m_nFeatureReportError
Definition: hid.cpp:697

◆ DecrementRefCount()

int CHIDDevice::DecrementRefCount ( )
inline

Definition at line 381 of file hid.cpp.

382  {
383  int nValue;
384  pthread_mutex_lock( &m_refCountLock );
385  nValue = --m_nRefCount;
386  pthread_mutex_unlock( &m_refCountLock );
387  return nValue;
388  }
pthread_mutex_t m_refCountLock
Definition: hid.cpp:681
int m_nRefCount
Definition: hid.cpp:682

◆ ExceptionCheck()

void CHIDDevice::ExceptionCheck ( JNIEnv *  env,
const char *  pszMethodName 
)
inline

Definition at line 405 of file hid.cpp.

References LOGE, and NULL.

406  {
407  if ( env->ExceptionCheck() )
408  {
409  // Get our exception
410  jthrowable jExcept = env->ExceptionOccurred();
411 
412  // Clear the exception so we can call JNI again
413  env->ExceptionClear();
414 
415  // Get our exception message
416  jclass jExceptClass = env->GetObjectClass( jExcept );
417  jmethodID jMessageMethod = env->GetMethodID( jExceptClass, "getMessage", "()Ljava/lang/String;" );
418  jstring jMessage = (jstring)( env->CallObjectMethod( jExcept, jMessageMethod ) );
419  const char *pszMessage = env->GetStringUTFChars( jMessage, NULL );
420 
421  // ...and log it.
422  LOGE( "CHIDDevice::%s threw an exception: %s", pszMethodName, pszMessage );
423 
424  // Cleanup
425  env->ReleaseStringUTFChars( jMessage, pszMessage );
426  env->DeleteLocalRef( jMessage );
427  env->DeleteLocalRef( jExceptClass );
428  env->DeleteLocalRef( jExcept );
429  }
430  }
#define NULL
Definition: begin_code.h:164
#define LOGE(...)
Definition: hid.cpp:19

◆ GetDevice()

hid_device* CHIDDevice::GetDevice ( )
inline

Definition at line 400 of file hid.cpp.

Referenced by hid_open_path().

401  {
402  return m_pDevice;
403  }
hid_device * m_pDevice
Definition: hid.cpp:685

◆ GetDeviceInfo()

const hid_device_info* CHIDDevice::GetDeviceInfo ( )
inline

Definition at line 395 of file hid.cpp.

Referenced by hid_get_manufacturer_string(), hid_get_product_string(), and hid_get_serial_number_string().

396  {
397  return m_pInfo;
398  }
hid_device_info * m_pInfo
Definition: hid.cpp:684

◆ GetFeatureReport()

int CHIDDevice::GetFeatureReport ( unsigned char *  pData,
size_t  nDataLen 
)
inline

Definition at line 583 of file hid.cpp.

References g_HIDDeviceManagerCallbackHandler, g_JVM, g_midHIDDeviceManagerGetFeatureReport, g_ThreadKey, get_timespec_ms(), LOGV, hid_device::m_nId, memcpy, NewByteArray(), and NULL.

Referenced by hid_get_feature_report().

584  {
585  // Make sure thread is attached to JVM/env
586  JNIEnv *env;
587  g_JVM->AttachCurrentThread( &env, NULL );
588  pthread_setspecific( g_ThreadKey, (void*)env );
589 
590  {
591  hid_mutex_guard cvl( &m_cvLock );
593  {
594  LOGV( "Get feature report already ongoing... bail" );
595  return -1; // Read already ongoing, we currently do not serialize, TODO
596  }
598  }
599 
600  jbyteArray pBuf = NewByteArray( env, pData, nDataLen );
601  int nRet = env->CallBooleanMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerGetFeatureReport, m_nId, pBuf ) ? 0 : -1;
602  ExceptionCheck( env, "GetFeatureReport" );
603  env->DeleteLocalRef( pBuf );
604  if ( nRet < 0 )
605  {
606  LOGV( "GetFeatureReport failed" );
608  return -1;
609  }
610 
611  {
612  hid_mutex_guard cvl( &m_cvLock );
614  {
615  LOGV("=== Going to sleep" );
616  // Wait in CV until we are no longer waiting for a feature report.
617  const int FEATURE_REPORT_TIMEOUT_SECONDS = 2;
618  struct timespec ts, endtime;
619  clock_gettime( CLOCK_REALTIME, &ts );
620  endtime = ts;
621  endtime.tv_sec += FEATURE_REPORT_TIMEOUT_SECONDS;
622  do
623  {
624  if ( pthread_cond_timedwait( &m_cv, &m_cvLock, &endtime ) != 0 )
625  {
626  break;
627  }
628  }
629  while ( m_bIsWaitingForFeatureReport && get_timespec_ms( ts ) < get_timespec_ms( endtime ) );
630 
631  // We are back
633  {
634  m_nFeatureReportError = -ETIMEDOUT;
636  }
637  LOGV( "=== Got feature report err=%d", m_nFeatureReportError );
638  if ( m_nFeatureReportError != 0 )
639  {
640  return m_nFeatureReportError;
641  }
642  }
643 
644  size_t uBytesToCopy = m_featureReport.size() > nDataLen ? nDataLen : m_featureReport.size();
645  memcpy( pData, m_featureReport.data(), uBytesToCopy );
647  LOGV( "=== Got %u bytes", uBytesToCopy );
648 
649  return uBytesToCopy;
650  }
651  }
static JavaVM * g_JVM
Definition: hid.cpp:46
static jmethodID g_midHIDDeviceManagerGetFeatureReport
Definition: hid.cpp:340
const uint8_t * data() const
Definition: hid.cpp:170
void ExceptionCheck(JNIEnv *env, const char *pszMethodName)
Definition: hid.cpp:405
hid_buffer m_featureReport
Definition: hid.cpp:698
static jobject g_HIDDeviceManagerCallbackHandler
Definition: hid.cpp:336
bool m_bIsWaitingForFeatureReport
Definition: hid.cpp:696
void clear()
Definition: hid.cpp:160
#define NULL
Definition: begin_code.h:164
pthread_mutex_t m_cvLock
Definition: hid.cpp:692
static pthread_key_t g_ThreadKey
Definition: hid.cpp:47
#define LOGV(...)
Definition: hid.cpp:25
#define memcpy
Definition: SDL_malloc.c:622
int m_nId
Definition: hid.cpp:683
static uint64_t get_timespec_ms(const struct timespec &ts)
Definition: hid.cpp:343
static jbyteArray NewByteArray(JNIEnv *env, const uint8_t *pData, size_t nDataLen)
Definition: hid.cpp:270
pthread_cond_t m_cv
Definition: hid.cpp:693
int m_nFeatureReportError
Definition: hid.cpp:697
size_t size() const
Definition: hid.cpp:165

◆ GetId()

int CHIDDevice::GetId ( )
inline

Definition at line 390 of file hid.cpp.

References hid_device::m_nId.

Referenced by FindDevice().

391  {
392  return m_nId;
393  }
int m_nId
Definition: hid.cpp:683

◆ GetInput()

int CHIDDevice::GetInput ( unsigned char *  data,
size_t  length 
)
inline

Definition at line 509 of file hid.cpp.

References hid_buffer::data(), memcpy, and hid_buffer::size().

Referenced by hid_read_timeout().

510  {
512 
513  if ( m_vecData.size() == 0 )
514  {
515 // LOGV( "hid_read_timeout no data available" );
516  return 0;
517  }
518 
519  const hid_buffer &buffer = m_vecData.front();
520  size_t nDataLen = buffer.size() > length ? length : buffer.size();
522  {
523  data[0] = 0x03;
524  memcpy( data + 1, buffer.data(), nDataLen );
525  ++nDataLen;
526  }
527  else
528  {
529  memcpy( data, buffer.data(), nDataLen );
530  }
532 
533 // LOGV("Read %u bytes", nDataLen);
534 // LOGV("%02x %02x %02x %02x %02x %02x %02x %02x ....",
535 // data[0], data[1], data[2], data[3],
536 // data[4], data[5], data[6], data[7]);
537 
538  return nDataLen;
539  }
const uint8_t * data() const
Definition: hid.cpp:170
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
const hid_buffer & front() const
Definition: hid.cpp:202
size_t size() const
Definition: hid.cpp:200
pthread_mutex_t m_dataLock
Definition: hid.cpp:688
GLuint buffer
hid_buffer_pool m_vecData
Definition: hid.cpp:689
void pop_front()
Definition: hid.cpp:204
#define memcpy
Definition: SDL_malloc.c:622
GLuint GLsizei GLsizei * length
bool m_bIsBLESteamController
Definition: hid.cpp:686
size_t size() const
Definition: hid.cpp:165

◆ IncrementRefCount()

int CHIDDevice::IncrementRefCount ( )
inline

Definition at line 372 of file hid.cpp.

373  {
374  int nValue;
375  pthread_mutex_lock( &m_refCountLock );
376  nValue = ++m_nRefCount;
377  pthread_mutex_unlock( &m_refCountLock );
378  return nValue;
379  }
pthread_mutex_t m_refCountLock
Definition: hid.cpp:681
int m_nRefCount
Definition: hid.cpp:682

◆ ProcessFeatureReport()

void CHIDDevice::ProcessFeatureReport ( const uint8_t pBuf,
size_t  nBufSize 
)
inline

Definition at line 570 of file hid.cpp.

Referenced by HIDDeviceFeatureReport().

571  {
572  hid_mutex_guard cvl( &m_cvLock );
574  {
575  m_featureReport.assign( pBuf, nBufSize );
576 
579  pthread_cond_signal( &m_cv );
580  }
581  }
void assign(const uint8_t *pData, size_t nSize)
Definition: hid.cpp:147
hid_buffer m_featureReport
Definition: hid.cpp:698
bool m_bIsWaitingForFeatureReport
Definition: hid.cpp:696
pthread_mutex_t m_cvLock
Definition: hid.cpp:692
pthread_cond_t m_cv
Definition: hid.cpp:693
int m_nFeatureReportError
Definition: hid.cpp:697

◆ ProcessInput()

void CHIDDevice::ProcessInput ( const uint8_t pBuf,
size_t  nBufSize 
)
inline

Definition at line 497 of file hid.cpp.

Referenced by HIDDeviceInputReport().

498  {
500 
501  size_t MAX_REPORT_QUEUE_SIZE = 16;
502  if ( m_vecData.size() >= MAX_REPORT_QUEUE_SIZE )
503  {
505  }
506  m_vecData.emplace_back( pBuf, nBufSize );
507  }
size_t size() const
Definition: hid.cpp:200
void emplace_back(const uint8_t *pData, size_t nSize)
Definition: hid.cpp:220
pthread_mutex_t m_dataLock
Definition: hid.cpp:688
hid_buffer_pool m_vecData
Definition: hid.cpp:689
void pop_front()
Definition: hid.cpp:204

◆ SendFeatureReport()

int CHIDDevice::SendFeatureReport ( const unsigned char *  pData,
size_t  nDataLen 
)
inline

Definition at line 556 of file hid.cpp.

References g_HIDDeviceManagerCallbackHandler, g_JVM, g_midHIDDeviceManagerSendFeatureReport, g_ThreadKey, hid_device::m_nId, NewByteArray(), and NULL.

Referenced by hid_send_feature_report().

557  {
558  // Make sure thread is attached to JVM/env
559  JNIEnv *env;
560  g_JVM->AttachCurrentThread( &env, NULL );
561  pthread_setspecific( g_ThreadKey, (void*)env );
562 
563  jbyteArray pBuf = NewByteArray( env, pData, nDataLen );
564  int nRet = env->CallIntMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerSendFeatureReport, m_nId, pBuf );
565  ExceptionCheck( env, "SendFeatureReport" );
566  env->DeleteLocalRef( pBuf );
567  return nRet;
568  }
static JavaVM * g_JVM
Definition: hid.cpp:46
void ExceptionCheck(JNIEnv *env, const char *pszMethodName)
Definition: hid.cpp:405
static jobject g_HIDDeviceManagerCallbackHandler
Definition: hid.cpp:336
static jmethodID g_midHIDDeviceManagerSendFeatureReport
Definition: hid.cpp:339
#define NULL
Definition: begin_code.h:164
static pthread_key_t g_ThreadKey
Definition: hid.cpp:47
int m_nId
Definition: hid.cpp:683
static jbyteArray NewByteArray(JNIEnv *env, const uint8_t *pData, size_t nDataLen)
Definition: hid.cpp:270

◆ SendOutputReport()

int CHIDDevice::SendOutputReport ( const unsigned char *  pData,
size_t  nDataLen 
)
inline

Definition at line 541 of file hid.cpp.

References g_HIDDeviceManagerCallbackHandler, g_JVM, g_midHIDDeviceManagerSendOutputReport, g_ThreadKey, hid_device::m_nId, NewByteArray(), and NULL.

Referenced by hid_write().

542  {
543  // Make sure thread is attached to JVM/env
544  JNIEnv *env;
545  g_JVM->AttachCurrentThread( &env, NULL );
546  pthread_setspecific( g_ThreadKey, (void*)env );
547 
548  jbyteArray pBuf = NewByteArray( env, pData, nDataLen );
549  int nRet = env->CallIntMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerSendOutputReport, m_nId, pBuf );
550  ExceptionCheck( env, "SendOutputReport" );
551 
552  env->DeleteLocalRef( pBuf );
553  return nRet;
554  }
static JavaVM * g_JVM
Definition: hid.cpp:46
void ExceptionCheck(JNIEnv *env, const char *pszMethodName)
Definition: hid.cpp:405
static jobject g_HIDDeviceManagerCallbackHandler
Definition: hid.cpp:336
static jmethodID g_midHIDDeviceManagerSendOutputReport
Definition: hid.cpp:338
#define NULL
Definition: begin_code.h:164
static pthread_key_t g_ThreadKey
Definition: hid.cpp:47
int m_nId
Definition: hid.cpp:683
static jbyteArray NewByteArray(JNIEnv *env, const uint8_t *pData, size_t nDataLen)
Definition: hid.cpp:270

◆ SetOpenPending()

void CHIDDevice::SetOpenPending ( )
inline

Definition at line 482 of file hid.cpp.

Referenced by HIDDeviceOpenPending().

483  {
484  m_bIsWaitingForOpen = true;
485  }
bool m_bIsWaitingForOpen
Definition: hid.cpp:694

◆ SetOpenResult()

void CHIDDevice::SetOpenResult ( bool  bResult)
inline

Definition at line 487 of file hid.cpp.

Referenced by HIDDeviceOpenResult().

488  {
489  if ( m_bIsWaitingForOpen )
490  {
491  m_bOpenResult = bResult;
492  m_bIsWaitingForOpen = false;
493  pthread_cond_signal( &m_cv );
494  }
495  }
bool m_bIsWaitingForOpen
Definition: hid.cpp:694
bool m_bOpenResult
Definition: hid.cpp:695
pthread_cond_t m_cv
Definition: hid.cpp:693

Field Documentation

◆ m_bIsBLESteamController

bool CHIDDevice::m_bIsBLESteamController = false
private

Definition at line 686 of file hid.cpp.

◆ m_bIsWaitingForFeatureReport

bool CHIDDevice::m_bIsWaitingForFeatureReport = false
private

Definition at line 696 of file hid.cpp.

◆ m_bIsWaitingForOpen

bool CHIDDevice::m_bIsWaitingForOpen = false
private

Definition at line 694 of file hid.cpp.

◆ m_bOpenResult

bool CHIDDevice::m_bOpenResult = false
private

Definition at line 695 of file hid.cpp.

◆ m_cv

pthread_cond_t CHIDDevice::m_cv = PTHREAD_COND_INITIALIZER
private

Definition at line 693 of file hid.cpp.

◆ m_cvLock

pthread_mutex_t CHIDDevice::m_cvLock = PTHREAD_MUTEX_INITIALIZER
private

Definition at line 692 of file hid.cpp.

◆ m_dataLock

pthread_mutex_t CHIDDevice::m_dataLock = PTHREAD_MUTEX_INITIALIZER
private

Definition at line 688 of file hid.cpp.

◆ m_featureReport

hid_buffer CHIDDevice::m_featureReport
private

Definition at line 698 of file hid.cpp.

◆ m_nFeatureReportError

int CHIDDevice::m_nFeatureReportError = 0
private

Definition at line 697 of file hid.cpp.

◆ m_nId

int CHIDDevice::m_nId = 0
private

Definition at line 683 of file hid.cpp.

◆ m_nRefCount

int CHIDDevice::m_nRefCount = 0
private

Definition at line 682 of file hid.cpp.

◆ m_pDevice

hid_device* CHIDDevice::m_pDevice = nullptr
private

Definition at line 685 of file hid.cpp.

◆ m_pInfo

hid_device_info* CHIDDevice::m_pInfo = nullptr
private

Definition at line 684 of file hid.cpp.

◆ m_refCountLock

pthread_mutex_t CHIDDevice::m_refCountLock = PTHREAD_MUTEX_INITIALIZER
private

Definition at line 681 of file hid.cpp.

◆ m_vecData

hid_buffer_pool CHIDDevice::m_vecData
private

Definition at line 689 of file hid.cpp.

◆ next


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