Device::USB::PCSensor::HidTEMPer::Sensor - Generic sensor class


Device-USB-PCSensor-HidTEMPer documentation  | view source Contained in the Device-USB-PCSensor-HidTEMPer distribution.

Index


Top

Device::USB::PCSensor::HidTEMPer::Sensor - Generic sensor class

VERSION

Top

Version 0.02

SYNOPSIS

Top

None

DESCRIPTION

Top

This module contains a generic class that all HidTEMPer sensors should inherit from keeping the implemented methods consistent, and making it possible to use the same code to contact every supported device.

CONSTANTS

* MAX_TEMPERATURE

The highest temperature(Celsius) this sensor can detect.

* MIN_TEMPERATURE

The lowest temperature(Celsius) this sensor can detect.

METHODS

* new( $device )

Generic initializing method, creating a sensor object.

Input parameter

$device = A pre-initialized Device::USB::PCSensor::HidTEMPer::Device that the sensor is connected to. This device will be used to handle communication.

* fahrenheit()

Reads the current temperature and returns the corresponding value in fahrenheit degrees.

* max()

Returns the highest temperature(Celsius) the sensor can detect.

* min()

Returns the lowest temperature(Celsius) the sensor can detect.

* celsius()

Empty method that should be implemented in each sensor, returing the current degrees in celsius.

DEPENDENCIES

Top

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

  use Scalar::Util qw/ weaken /;

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

None

COPYRIGHT & LICENSE

Top


Device-USB-PCSensor-HidTEMPer documentation  | view source Contained in the Device-USB-PCSensor-HidTEMPer distribution.