2 # This module is part of the new protocal mode for a dx cluster
4 # This module handles ping requests
6 # Copyright (c) 2003 Dirk Koopman G1TLH
15 use vars qw(@ISA $VERSION $BRANCH);
18 $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
19 $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
20 $main::build += $VERSION;
21 $main::branch += $BRANCH;
25 my ($self, $to, $from, $msgid, $line) = @_;
27 my @f = split /\^/, $line;
30 if ($to eq $main::mycall) {
32 $self->send(gen($self, $from, '0', $f[1], $f[2], $f[3]));
34 # it's a reply, look in the ping list for this one
35 $self->handlepingreply($from);
39 # route down an appropriate thingy
40 $self->route($to, $line);
46 my ($self, $to, $flag, $user, $secs, $usecs) = @_;
47 my @out = ('P', $to, $flag);
48 push @out, $user if defined $user;
49 push @out, $secs if defined $secs;
50 push @out, $usecs if defined $usecs;
51 return $self->frame(@out);