C# Class HidSharp.ReportDescriptors.Parser.ReportDescriptorParser

Parses HID report descriptors.
Exibir arquivo Open project: arvydas/BlinkStickDotNet

Public Methods

Method Description
Clear ( ) : void

Resets the parser to its initial state.

GetGlobalItem ( GlobalItemTag tag ) : EncodedItem
GetGlobalItemValue ( GlobalItemTag tag ) : uint
GetReport ( ReportType type, byte id ) : Report
IsGlobalItemSet ( GlobalItemTag tag ) : bool
Parse ( EncodedItem item ) : void

Parses a single EncodedItem. Call this repeatedly for every item to completely decode a report descriptor.

Parse ( IEnumerable items ) : void

Parses all of the EncodedItem elements in a report descriptor.

Parse ( byte buffer ) : void

Parses a raw HID report descriptor.

Parse ( byte buffer, int offset, int count ) : void

Parses a raw HID report descriptor.

ParseDataMain ( MainItemTag tag, uint value, LocalIndexes &indexes ) : void
ParseMain ( MainItemTag tag, uint value ) : void
ParseMainIndexes ( LocalIndexes indexes ) : void
ReportDescriptorParser ( ) : System

Initializes a new instance of the ReportDescriptorParser class.

TryGetReport ( ReportType type, byte id, Report &report ) : bool

Private Methods

Method Description
AddIndex ( uint>.List list, int action, uint value ) : void
FilterReports ( ReportType reportType ) : IEnumerable
GetMaxLengthOfReports ( IEnumerable reports ) : int
UpdateIndexList ( List values, int delimiter, IndexBase &index, uint value ) : void
UpdateIndexListCommit ( List values, int delimiter, IndexBase &index ) : void
UpdateIndexMaximum ( IndexBase &index, uint value ) : void
UpdateIndexMinimum ( IndexBase &index, uint value ) : void

Method Details

Clear() public method

Resets the parser to its initial state.
public Clear ( ) : void
return void

GetGlobalItem() public method

public GetGlobalItem ( GlobalItemTag tag ) : EncodedItem
tag GlobalItemTag
return EncodedItem

GetGlobalItemValue() public method

public GetGlobalItemValue ( GlobalItemTag tag ) : uint
tag GlobalItemTag
return uint

GetReport() public method

public GetReport ( ReportType type, byte id ) : Report
type ReportType
id byte
return Report

IsGlobalItemSet() public method

public IsGlobalItemSet ( GlobalItemTag tag ) : bool
tag GlobalItemTag
return bool

Parse() public method

Parses a single EncodedItem. Call this repeatedly for every item to completely decode a report descriptor.
public Parse ( EncodedItem item ) : void
item EncodedItem The item to parse.
return void

Parse() public method

Parses all of the EncodedItem elements in a report descriptor.
public Parse ( IEnumerable items ) : void
items IEnumerable The items to parse.
return void

Parse() public method

Parses a raw HID report descriptor.
public Parse ( byte buffer ) : void
buffer byte The buffer containing the report descriptor.
return void

Parse() public method

Parses a raw HID report descriptor.
public Parse ( byte buffer, int offset, int count ) : void
buffer byte The buffer containing the report descriptor.
offset int The offset into the buffer to begin parsing from.
count int The number of bytes to parse.
return void

ParseDataMain() public method

public ParseDataMain ( MainItemTag tag, uint value, LocalIndexes &indexes ) : void
tag MainItemTag
value uint
indexes LocalIndexes
return void

ParseMain() public method

public ParseMain ( MainItemTag tag, uint value ) : void
tag MainItemTag
value uint
return void

ParseMainIndexes() public method

public ParseMainIndexes ( LocalIndexes indexes ) : void
indexes LocalIndexes
return void

ReportDescriptorParser() public method

Initializes a new instance of the ReportDescriptorParser class.
public ReportDescriptorParser ( ) : System
return System

TryGetReport() public method

public TryGetReport ( ReportType type, byte id, Report &report ) : bool
type ReportType
id byte
report Report
return bool