Acpi::Fan - A class to get informations about your fan.


Acpi documentation Contained in the Acpi distribution.

Index


Code Index:

NAME

Top

Acpi::Fan - A class to get informations about your fan.

SYNOPSIS

Top

use Acpi::Fan;

$fan = Acpi::Fan->new;

print $fan->getStatus."\n";

DESCRIPTION

Top

Acpi::Fan is used to have information about your fan.It's specific for GNU/Linux.

METHOD DESCRIPTIONS

Top

This sections contains only the methods in Fan.pm itself.

AUTHORS

Top


Acpi documentation Contained in the Acpi distribution.

package Acpi::Fan;
use Acpi::Field;
use strict;

our $VERSION = '0.1';

my($rfield);

sub new{
	my($class) = shift;
	my($self) = {};

	bless($self,$class);
	
	$rfield = Acpi::Field->new;
	return $self;
}

sub getStatus{
	my($self) = shift;
	
	if($rfield->getValueField("/proc/acpi/fan/FAN/state","status") eq "on"){
		return 0;
	}
	else{
		return -1;
	}
}
1;

__END__