The Pedigree Project 0.1
Classes | Public Member Functions | Private Types | Private Attributes | List of all members
HidReport Class Reference
+ Collaboration diagram for HidReport:

Classes

struct  Collection
 Structure representing a Collection whitin a report. More...
 
struct  InputBlock
 Structure representing an Input block whitin a Collection. More...
 
struct  LocalState
 Structure holding various global and local values for a Main item. More...
 

Public Member Functions

void parseDescriptor (uint8_t *pDescriptor, size_t nDescriptorLength)
 Parses a HID report descriptor and stores the resulted data.
 
bool valid () const
 
void feedInput (uint8_t *pBuffer, uint8_t *pOldBuffer, size_t nBufferSize)
 Feeds the input interpreter with a new input buffer.
 

Private Types

enum  ItemType { MainItem = 0 , GlobalItem = 1 , LocalItem = 2 }
 The HID item types. More...
 
enum  ItemTag {
  InputItem = 0x8 , OutputItem = 0x9 , FeatureItem = 0xb , CollectionItem = 0xa ,
  EndCollectionItem = 0xc , UsagePageItem = 0x0 , LogMinItem = 0x1 , LogMaxItem = 0x2 ,
  PhysMinItem = 0x3 , PhysMaxItem = 0x4 , UnitExpItem = 0x5 , UnitItem = 0x6 ,
  ReportSizeItem = 0x7 , ReportIDItem = 0x8 , ReportCountItem = 0x9 , PushItem = 0xa ,
  PopItem = 0xb , UsageItem = 0x0 , UsageMinItem = 0x1 , UsageMaxItem = 0x2
}
 The HID item tags. More...
 
enum  InputItemFlags { InputConstant = 1 , InputVariable = 2 , InputRelative = 4 }
 Input item flags. More...
 

Private Attributes

Collection * m_pRootCollection
 The root collection, under which everything is.
 
size_t m_ReportBits [256]
 
uint8_t * m_OldReports [256]
 
HidUtils::InputState * m_InputStates [256]
 
bool m_HasReportIds
 
bool m_Valid
 

Detailed Description

Definition at line 30 of file HidReport.h.

Member Enumeration Documentation

◆ InputItemFlags

Input item flags.

Definition at line 78 of file HidReport.h.

◆ ItemTag

enum HidReport::ItemTag
private

The HID item tags.

Definition at line 49 of file HidReport.h.

◆ ItemType

enum HidReport::ItemType
private

The HID item types.

Definition at line 46 of file HidReport.h.

Constructor & Destructor Documentation

◆ HidReport()

HidReport::HidReport ( )

Definition at line 43 of file HidReport.cc.

◆ ~HidReport()

HidReport::~HidReport ( )
virtual

Definition at line 51 of file HidReport.cc.

Member Function Documentation

◆ feedInput()

void HidReport::feedInput ( uint8_t *  pBuffer,
uint8_t *  pOldBuffer,
size_t  nBufferSize 
)

Feeds the input interpreter with a new input buffer.

Definition at line 309 of file HidReport.cc.

References HidReport::Collection::feedInput(), and m_pRootCollection.

◆ parseDescriptor()

void HidReport::parseDescriptor ( uint8_t *  pDescriptor,
size_t  nDescriptorLength 
)

◆ valid()

bool HidReport::valid ( ) const
inline

Definition at line 37 of file HidReport.h.

Member Data Documentation

◆ m_HasReportIds

bool HidReport::m_HasReportIds
private

Definition at line 165 of file HidReport.h.

◆ m_InputStates

HidUtils::InputState* HidReport::m_InputStates[256]
private

Definition at line 164 of file HidReport.h.

◆ m_OldReports

uint8_t* HidReport::m_OldReports[256]
private

Definition at line 163 of file HidReport.h.

◆ m_pRootCollection

Collection* HidReport::m_pRootCollection
private

The root collection, under which everything is.

Definition at line 161 of file HidReport.h.

Referenced by feedInput(), and parseDescriptor().

◆ m_ReportBits

size_t HidReport::m_ReportBits[256]
private

Definition at line 162 of file HidReport.h.

◆ m_Valid

bool HidReport::m_Valid
private

Definition at line 166 of file HidReport.h.


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