Device::USB::PCSensor::HidTEMPer::NTC - The HidTEMPerNTC thermometer


Device-USB-PCSensor-HidTEMPer documentation Contained in the Device-USB-PCSensor-HidTEMPer distribution.

Index


Code Index:

Top

Device::USB::PCSensor::HidTEMPer::NTC - The HidTEMPerNTC thermometer

VERSION

Top

Version 0.03

SYNOPSIS

Top

None

DESCRIPTION

Top

This is the implementation of the HidTEMPerNTC thermometer that has both one internal and one external sensor measuring the temperature.

CONSTANTS

None

METHODS

* init()

Initialize the device, connects the sensors and makes the object ready for use.

INHERIT METHODS FROM

Top

Device::USB::PCSensor::HidTEMPer::Device

DEPENDENCIES

Top

This module internally includes and takes use of the following packages:

  use Device::USB::PCSensor::HidTEMPer::Device;
  use Device::USB::PCSensor::HidTEMPer::NTC::Internal;
  use Device::USB::PCSensor::HidTEMPer::NTC::External;

This module uses the strict and warning pragmas.

BUGS

Top

Please report any bugs or missing features using the CPAN RT tool.

FOR MORE INFORMATION

Top

None

AUTHOR

Top

Magnus Sulland < msulland@cpan.org >

ACKNOWLEDGEMENTS

Top

Thanks to Jeremy G for the fix on initializing the device configuration.

COPYRIGHT & LICENSE

Top


Device-USB-PCSensor-HidTEMPer documentation Contained in the Device-USB-PCSensor-HidTEMPer distribution.
package Device::USB::PCSensor::HidTEMPer::NTC;

use strict;
use warnings;

use Device::USB::PCSensor::HidTEMPer::Device;
use Device::USB::PCSensor::HidTEMPer::NTC::Internal;
use Device::USB::PCSensor::HidTEMPer::NTC::External;
our @ISA = 'Device::USB::PCSensor::HidTEMPer::Device';

our $VERSION = 0.03;

sub init
{
    my $self = shift;
    
    # Add sensor references to this instance
    $self->{sensor}->{internal} = Device::USB::PCSensor::HidTEMPer::NTC::Internal->new( $self );
    $self->{sensor}->{external} = Device::USB::PCSensor::HidTEMPer::NTC::External->new( $self );

    # Set configuration
    $self->_write(0x43);
    
    # Rebless
    bless $self, 'Device::USB::PCSensor::HidTEMPer::NTC';
}

sub DESTROY
{
    $_[0]->SUPER::DESTROY;
}

1;