NAME
USB::HID::Descriptor::Class - USB HID Class Descriptor
SYNOPSIS
An object representation of a USB HID class descriptor.
use USB::HID::Descriptor::Class;
my $class = USB::HID::Descriptor::Class->new;
$class->country(0);
$class->version('1.2.3');
$class->reports( [ USB::HID::Descriptor::Report->new() ] );
...
DESCRIPTION
USB::HID::Descriptor::Class represents a USB class descriptor for a HID class device. Instances of USB::HID::Descriptor::Class are automatically created by USB::HID::Descriptor::Interface as needed, so there's generally no reason to use this class directly.
CONSTRUCTOR
- $class = USB::HID::Descriptor::Class->new(...);
-
Constructs and returns a new USB::HID::Descriptor::Class object using the passed options. Each option key is the name of an accessor method.
ARRAYIFICATION
- $class->bytes (or @{$class} )
-
Returns an array of bytes containing all of the fields in the class descriptor.
ATTRIBUTES
- $class->bcdHID
-
Direct access to the bcdHID value. Don't use this unless you know what you're doing.
- $class->country
-
Get/Set the country code for localized hardware (bCountryCode). Defaults to 0.
- $class->report_bytes
-
Returns an array of bytes containing the report descriptor.
- $class->report
-
A convenience method that wraps a single hash reference in an array and passes it to
reports()
. - $class->reports
-
Get/Set the array of USB::HID::Descriptor::Report objects.
- $class->version
-
Get/Set the HID specification release number (bcdHID). Defaults to '1.1.0'.
REPORT DESCRIPTOR ATTRIBUTES
- $class->page
-
Get/Set the Usage Page of the interface's report descriptor. Accepts integer values, or any of the Usage Page string constants defined in HID/Descriptor/Report.pm.
- $class->usage
-
Get/Set the Usage of the interface's report descriptor.
AUTHOR
Brandon Fosdick, <bfoz at bfoz.net>
BUGS
Please report any bugs or feature requests to bug-usb-hid-descriptor-class at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=USB-HID-Descriptor-Class. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc USB::HID::Descriptor::Class
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=USB-HID-Descriptor-Class
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2011 Brandon Fosdick.
This program is released under the terms of the BSD License.