Network_Item.pm

Network_Item

SYNOPSIS

  use Network_Item;

  $network_house = new Network_Item('192.168.0.2',  10);
  $network_hp    = new Network_Item('192.168.0.66', 20);

  print_log "house just changed to $state" if      $state = state_changed $network_house;
  print_log "house is $state" if new_second 15 and $state = state $network_house;

Example mht entry:

  #NETWORK        IP_ADDRESS      NAME            Grouplist       Interval        MAC_ADDRESS
  NETWORK,        192.168.4.25,   HTPC_Mini,      HTPC|HomeGym,   120,    00:1C:C0:AB:CD:AE

DESCRIPTION

This object simply pings the specified address and sets its state according to status

2011-07-30 MKB Enhanced with WakeOnLan functionality

INHERITS

Generic_Item

METHODS

new($address, $interval)

$address: Ip address of the box you want to ping $interval: How often to ping (in seconds)

INI PARAMETERS

NONE

AUTHOR

UNK

SEE ALSO

NONE

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

 Network_Item.pm