logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Acknowledgements

       Thanks to Elan Ruusamäe for fixing some compatibility issues with perl 5.8

Author

       Magnus Sulland < msulland@cpan.org >

Bugs

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

Dependencies

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

         use Scalar::Util qw/ weaken /;

       This module uses the strict and warning pragmas.

Description

       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.

For More Information

       None

Name

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

Pod Errors

       Hey! Theabovedocumenthadsomecodingerrors,whichareexplainedbelow:

       Around line 157:
           Non-ASCII character seen before =encoding in 'Ruusamäe'. Assuming UTF-8

perl v5.40.0                                       2024-11-30             Device::USB::PC...dTEMPer::Sensor(3pm)

Synopsis

       None

Version

       Version 0.0301

See Also