Brandon Fosdick > USB-Descriptor-4 > USB::HID::Report

Download:
USB-Descriptor-4.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1   Source  

NAME ^

USB::HID::Report - USB HID Report

SYNOPSIS ^

An object representation of a USB HID Report.

    use USB::HID::Report;

    my $report = USB::HID::Report->new( reportID => 1, direction => 'input' );
    $report->fields( [ USB::HID::Report::Element->new() ] );
    ...

DESCRIPTION ^

USB::HID::Report represents a USB HID Report. When added to an instance of USB::HID::Descriptor::Interface it can be used to generate the data structures needed to compile the firmware for a USB device.

CONSTRUCTOR ^

$interface = USB::HID::Report->new(reportID=>$reportID, ...);

Constructs and returns a new USB::HID::Report object using the passed options. Each option key is the name of an accessor method.

When constructing report objects, the report type and ID can be specified with a single key/value pair. For example, you can use new('input' => 3) instead of new('type' => 'input', 'reportID' => 3).

ARRAYIFICATION ^

$report->bytes (or @{$report} )

Returns an array of bytes containing all of the items in the report.

ATTRIBUTES ^

$report->collection

Get/Set the collection type used to enclose the report's items. Set to 'none' to use a bare report.

$report->reportID

Get/Set the report's ID. Defaults to 1.

$report->type

Get/Set the report's type ('input', 'output' or 'feature'). Defaults to 'input'.

$report->fields

Get/Set the report's fields.

AUTHOR ^

Brandon Fosdick, <bfoz at bfoz.net>

BUGS ^

Please report any bugs or feature requests to bug-usb-hid-report at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=USB-HID-Report. 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::Report

You can also look for information at:

ACKNOWLEDGEMENTS ^

LICENSE AND COPYRIGHT ^

Copyright 2011 Brandon Fosdick.

This program is released under the terms of the BSD License.

syntax highlighting: