1 # $Id: Ping.pm,v 1.12 2006-10-06 11:33:08 mike Exp $
3 # See the "Main" test package for documentation
5 package ZOOM::IRSpy::Test::Ping;
11 use ZOOM::IRSpy::Test;
12 our @ISA = qw(ZOOM::IRSpy::Test);
19 $conn->irspy_connect(ZOOM::Event::CONNECT, \&connected,
20 "exception", \¬_connected);
24 sub connected { maybe_connected(@_, 1) }
25 sub not_connected { maybe_connected(@_, 0) }
28 my($conn, $rs, $event, $ok) = @_;
30 $conn->log("irspy_test", ($ok ? "" : "not "), "connected");
31 my $rec = $conn->record();
32 $rec->append_entry("irspy:status", "<irspy:probe ok='$ok'>" .
33 isodate(time()) . "</irspy:probe>");
34 $conn->option(pod_omit => 1) if !$ok;
35 return ZOOM::IRSpy::Status::TASK_DONE;