X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FRoute%2FNode.pm;h=123f21f9f2e952d4c74a06a69ddf8c8544afa212;hb=64461bf14f8ce1a;hp=c1fcc5435f05d33505d1f2df3d3045dc6c30b7b9;hpb=fee8c4eabda49d4c7440ce1075ea49dcd9c2e825;p=spider.git diff --git a/perl/Route/Node.pm b/perl/Route/Node.pm index c1fcc543..123f21f9 100644 --- a/perl/Route/Node.pm +++ b/perl/Route/Node.pm @@ -32,7 +32,7 @@ use vars qw(%list %valid @ISA $max $filterdef $obscount); via_pc92 => '0,Came in via pc92,yesno', obscount => '0,Obscount', last_PC92C => '9,Last PC92C', - PC92C_dxchan => '9,Channel of PC92C', + PC92C_dxchan => '9,Channel of PC92C,phash', ); $filterdef = $Route::filterdef; @@ -221,12 +221,6 @@ sub nodes return @{$self->{nodes}}; } -sub parents -{ - my $self = shift; - return @{$self->{parent}}; -} - sub rnodes { my $self = shift; @@ -286,8 +280,7 @@ sub new $self->{flags} = shift || Route::here(1); $self->{users} = []; $self->{nodes} = []; - $self->{lastid} = 0; - $self->{PC92C_dxchan} = ''; + $self->{PC92C_dxchan} = {}; $self->reset_obs; # by definition $list{$call} = $self; @@ -360,6 +353,31 @@ sub reset_obs $self->{obscount} = $obscount; } +sub measure_pc9x_t +{ + my $parent = shift; + my $t = shift; + my $lastid = $parent->{lastid}; + if ($lastid) { + return ($t < $lastid) ? $t+86400-$lastid : $t - $lastid; + } else { + return 86400; + } +} + +sub PC92C_dxchan +{ + my $parent = shift; + my $call = shift; + my $hops = shift; + if ($call && $hops) { + $hops =~ s/^H//; + $parent->{PC92C_dxchan}->{$call} = $hops; + return; + } + return (%{$parent->{PC92C_dxchan}}); +} + sub DESTROY { my $self = shift;