reportparser

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection CollectionItemType

func (Collection) Name

func (c Collection) Name() string

func (Collection) Tag

func (c Collection) Tag() ItemTag

func (Collection) Value

func (c Collection) Value() CollectionItemType

type CollectionItemType

type CollectionItemType byte
const (
	CollectionItemTypePhysical CollectionItemType = iota
	CollectionItemTypeApplication
	CollectionItemTypeLogical
	CollectionItemTypeReport
	CollectionItemTypeNamedArray
	CollectionItemTypeUsageSwitch
	CollectionItemTypeUsageModifier
)

func (CollectionItemType) String

func (i CollectionItemType) String() string

type EndCollection

type EndCollection struct{}

func (EndCollection) Name

func (e EndCollection) Name() string

func (EndCollection) Tag

func (e EndCollection) Tag() ItemTag

func (EndCollection) Value

func (e EndCollection) Value() struct{}

type Feature

type Feature FeatureFlags

func (Feature) Name

func (f Feature) Name() string

func (Feature) Tag

func (f Feature) Tag() ItemTag

func (Feature) Value

func (f Feature) Value() FeatureFlags

type FeatureFlags

type FeatureFlags uint32
const (
	FeatureFlagConstant FeatureFlags = 1 << iota
	FeatureFlagVariable
	FeatureFlagRelative
	FeatureFlagWrap
	FeatureFlagNonLinear
	FeatureFlagNoPreferred
	FeatureFlagNullState
	FeatureFlagVolatile

	FeatureFlagBufferedBytes
)

func (FeatureFlags) String

func (i FeatureFlags) String() string

type Input

type Input InputFlags

func (Input) Name

func (i Input) Name() string

func (Input) Tag

func (i Input) Tag() ItemTag

func (Input) Value

func (i Input) Value() InputFlags

type InputFlags

type InputFlags uint32
const (
	InputFlagConstant InputFlags = 1 << iota
	InputFlagVariable
	InputFlagRelative
	InputFlagWrap
	InputFlagNonLinear
	InputFlagNoPreferred
	InputFlagNullState

	InputFlagBufferedBytes
)

func (InputFlags) String

func (i InputFlags) String() string

type Item

type Item[T any] interface {
	Name() string
	Tag() ItemTag
	Value() T
}

type ItemSize

type ItemSize uint8
const (
	ItemSize0 ItemSize = iota
	ItemSize8
	ItemSize16
	ItemSize32
)

func (ItemSize) String

func (i ItemSize) String() string

type ItemTag

type ItemTag uint8
const (
	ItemTagMainInput         ItemTag = 0b100000
	ItemTagMainOutput        ItemTag = 0b100100
	ItemTagMainFeature       ItemTag = 0b101100
	ItemTagMainCollection    ItemTag = 0b101000
	ItemTagMainEndCollection ItemTag = 0b110000

	ItemTagGlobalUsagePage       ItemTag = 0b000001
	ItemTagGlobalLogicalMinimum  ItemTag = 0b000101
	ItemTagGlobalLogicalMaximum  ItemTag = 0b001001
	ItemTagGlobalPhysicalMinimum ItemTag = 0b001101
	ItemTagGlobalPhysicalMaximum ItemTag = 0b010001
	ItemTagGlobalUnitExponent    ItemTag = 0b010101
	ItemTagGlobalUnit            ItemTag = 0b011001
	ItemTagGlobalReportSize      ItemTag = 0b011101
	ItemTagGlobalReportID        ItemTag = 0b100001
	ItemTagGlobalReportCount     ItemTag = 0b100101
	ItemTagGlobalPush            ItemTag = 0b101001
	ItemTagGlobalPop             ItemTag = 0b101101

	ItemTagLocalUsage             ItemTag = 0b000010
	ItemTagLocalUsageMinimum      ItemTag = 0b000110
	ItemTagLocalUsageMaximum      ItemTag = 0b001010
	ItemTagLocalDesignatorIndex   ItemTag = 0b001110
	ItemTagLocalDesignatorMinimum ItemTag = 0b010010
	ItemTagLocalDesignatorMaximum ItemTag = 0b010110
	ItemTagLocalStringIndex       ItemTag = 0b011110
	ItemTagLocalStringMinimum     ItemTag = 0b100010
	ItemTagLocalStringMaximum     ItemTag = 0b100110
	ItemTagLocalDelimiter         ItemTag = 0b101010
)

func (ItemTag) String

func (i ItemTag) String() string

func (ItemTag) Type

func (t ItemTag) Type() ItemType

type ItemType

type ItemType uint8
const (
	ItemTypeMain ItemType = iota
	ItemTypeGlobal
	ItemTypeLocal
	ItemTypeReserved
)

func (ItemType) String

func (i ItemType) String() string

type Items

type Items []any

func ParseReport

func ParseReport(b []byte) Items

type LogicalMaximum added in v0.2.1

type LogicalMaximum uint32

func (LogicalMaximum) Name added in v0.2.1

func (p LogicalMaximum) Name() string

func (LogicalMaximum) Tag added in v0.2.1

func (p LogicalMaximum) Tag() ItemTag

func (LogicalMaximum) Value added in v0.2.1

func (p LogicalMaximum) Value() uint32

type LogicalMinimum added in v0.2.1

type LogicalMinimum uint32

func (LogicalMinimum) Name added in v0.2.1

func (p LogicalMinimum) Name() string

func (LogicalMinimum) Tag added in v0.2.1

func (p LogicalMinimum) Tag() ItemTag

func (LogicalMinimum) Value added in v0.2.1

func (p LogicalMinimum) Value() uint32

type Output

type Output OutputFlags

func (Output) Name

func (o Output) Name() string

func (Output) Tag

func (o Output) Tag() ItemTag

func (Output) Value

func (o Output) Value() OutputFlags

type OutputFlags

type OutputFlags uint32
const (
	OutputFlagConstant OutputFlags = 1 << iota
	OutputFlagVariable
	OutputFlagRelative
	OutputFlagWrap
	OutputFlagNonLinear
	OutputFlagNoPreferred
	OutputFlagNullState
	OutputFlagVolatile

	OutputFlagBufferedBytes
)

func (OutputFlags) String

func (i OutputFlags) String() string

type ReportCount added in v0.2.1

type ReportCount byte

func (ReportCount) Name added in v0.2.1

func (r ReportCount) Name() string

func (ReportCount) Tag added in v0.2.1

func (r ReportCount) Tag() ItemTag

func (ReportCount) Value added in v0.2.1

func (r ReportCount) Value() ReportCount

type ReportID added in v0.2.1

type ReportID byte

func (ReportID) Name added in v0.2.1

func (r ReportID) Name() string

func (ReportID) Tag added in v0.2.1

func (r ReportID) Tag() ItemTag

func (ReportID) Value added in v0.2.1

func (r ReportID) Value() ReportID

type ReportSize added in v0.2.1

type ReportSize byte

func (ReportSize) Name added in v0.2.1

func (r ReportSize) Name() string

func (ReportSize) Tag added in v0.2.1

func (r ReportSize) Tag() ItemTag

func (ReportSize) Value added in v0.2.1

func (r ReportSize) Value() ReportSize

type Usage

type Usage uint16

func (Usage) Name

func (u Usage) Name() string

func (Usage) Tag

func (u Usage) Tag() ItemTag

func (Usage) Value

func (u Usage) Value() uint16

type UsagePage

type UsagePage uint16

func (UsagePage) Name

func (p UsagePage) Name() string

func (UsagePage) Tag

func (p UsagePage) Tag() ItemTag

func (UsagePage) Value

func (p UsagePage) Value() uint16

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL