The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Device::USB::PCSensor::HidTEMPer - Device overview

VERSION

Version 0.01

SYNOPSIS

  use Device::USB::PCSensor::HidTEMPer;

  my $pcsensor  = Device::USB::PCSensor::HidTEMPer->new();
  my @devices   = $pcsensor->list_devices();
  
  foreach my $device ( @devices ){
    say $device->internal()->celsius();
  }

DESCRIPTION

Simplified interface to the usb devices hiding Device::USB from the user. Using this class to list devices ensures that only the correct temperature devices are returned, all initialized and ready for use.

CONSTANTS

The following constants are declared in this class

  • PRODUCT_ID

    Contains the hex value of the product id on the usb chip.

  • VENDOR_ID

    Contains the hex value representing the manufacturer of the chip, in this case this is "Tenx Technology, Inc."

METHODS

  • new()

  • list_devices()

    Returns an array of all the recognized devices that are attaced to the system. Each device is a object of the same type as the device found.

  • device( $generic_device )

    Convert a generic usb-device into the corresponding HidTEMPer device.

    Input parameters 1) The Device::USB::Device object that should be converted to the appropriate object type.

    Output This method returns a object of the corresponding type if the device is supported, else it returns undef. Returns undef on errors, and carp to display the error message.

    List of supported devices:

     Hex value   Product         Internal sensor    External sensor
     0x5b        HidTEMPerNTC    Yes                Yes
     0x58        HidTEMPer       Yes                No

DEPENDENCIES

  use 5.010;
  use strict;
  use warnings;
  use Carp;
  use Device::USB;
  use Device::USB::PCSensor::HidTEMPer::Device;
  use Device::USB::PCSensor::HidTEMPer::NTC;
  use Device::USB::PCSensor::HidTEMPer::TEMPer;

This module uses the strict and warning pragmas.

BUGS

If you find any bugs or missing features please notify me using the following email address: msulland@cpan.org

FOR MORE INFORMATION

None

AUTHOR

Magnus Sulland < msulland@cpan.org >

ACKNOWLEDGEMENTS

None

COPYRIGHT & LICENSE

Copyright (c) 2010 Magnus Sulland

 This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.10.0 or,
at your option, any later version of Perl 5 you may have available.