1 # $Id: Ping.pm,v 1.14 2006-10-25 10:49:37 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(undef, {},
20 ZOOM::Event::CONNECT, \&connected,
21 exception => \¬_connected);
25 sub connected { maybe_connected(@_, 1) }
26 sub not_connected { maybe_connected(@_, 0) }
29 my($conn, $task, $__UNUSED_udata, $event, $ok) = @_;
31 $conn->log("irspy_test", ($ok ? "" : "not "), "connected");
32 my $rec = $conn->record();
33 $rec->append_entry("irspy:status", "<irspy:probe ok='$ok'>" .
34 isodate(time()) . "</irspy:probe>");
35 $conn->option(pod_omit => 1) if !$ok;
36 return ZOOM::IRSpy::Status::TASK_DONE;