Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Sys::Apm
Perl extension for APM

Sys::Apm - Perl extension for APM


NAME

Sys::Apm - Perl extension for APM


SYNOPSIS


  use Sys::Apm;

  my $apm = Sys::Apm->new or die "no apm nupport in kernel";

  print $apm->charge


DESCRIPTION


  This module allows you to query your battery status and such through /proc/apm


METHODS

fetch


  Fetches the data from /proc/apm

  This method is called once in the constructor

driver_version




  Linux APM driver version



=head2 bios_version



  APM BIOS Version.  Usually 1.0, 1.1 or 1.2.

ac_status


  AC line status

  0x00: offline

  0x01: online

  0x02: on backup power

  0xff: unknown

battery_status


  Battery status

  0x00: High

  0x01: Low

  0x02: Critical

  0x03: Charging

  0x04: No battery

charge


  Remaining battery life (percentage of charge)

  0-100: valid

  -1: Unknown

remaining


  Remaining battery life (time units):

  Number of remaining minutes or seconds

  -1: Unknown

units


  min: minutes

  sec: seconds

  

=head1 SEE ALSO

  apm(1)

  arch/i386/kernel/apm.c


AUTHOR

Raoul Zwart, <rlzwart@cpan.org>


COPYRIGHT AND LICENSE

Copyright 2003 by Raoul Zwart

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy