1 # $Id: Ping.pm,v 1.17 2006-12-06 12:58:06 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);
14 use ZOOM::IRSpy::Utils qw(isodate);
21 $conn->irspy_connect(undef, {},
22 ZOOM::Event::RECV_APDU, \&connected,
23 exception => \¬_connected);
27 sub connected { maybe_connected(@_, 1) }
28 sub not_connected { maybe_connected(@_, 0) }
31 my($conn, $task, $__UNUSED_udata, $event, $ok) = @_;
33 $conn->log("irspy_test", ($ok ? "" : "not "), "connected");
34 my $rec = $conn->record();
35 $rec->append_entry("irspy:status", "<irspy:probe ok='$ok'>" .
36 isodate(time()) . "</irspy:probe>");
39 foreach my $opt (qw(search present delSet resourceReport
40 triggerResourceCtrl resourceCtrl
41 accessCtrl scan sort extendedServices
42 level_1Segmentation level_2Segmentation
43 concurrentOperations namedResultSets
44 encapsulation resultCount negotiationModel
45 duplicationDetection queryType104
46 pQESCorrection stringSchema)) {
47 $conn->record()->store_result('init_opt', option => $opt)
48 if $conn->option("init_opt_$opt");
52 return $ok ? ZOOM::IRSpy::Status::TEST_GOOD :
53 ZOOM::IRSpy::Status::TEST_BAD;