X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fbands.pl;fp=cmd%2Fshow%2Fbands.pl;h=158238f3d13c3dbd01b6f5433a8873ab5d1ee94c;hb=6a0068ec3df1dca0c6ae2714af3c0a4a62998dcf;hp=0000000000000000000000000000000000000000;hpb=3f145290a93b39bf15b50269dd8be585d7b4bc9c;p=spider.git diff --git a/cmd/show/bands.pl b/cmd/show/bands.pl new file mode 100644 index 00000000..158238f3 --- /dev/null +++ b/cmd/show/bands.pl @@ -0,0 +1,31 @@ +# +# display the band data +# + +#$DB::single = 1; + +my ($self, $line) = @_; +my @f = split /\s+/, $line; +my @bands; +my $band; +my @out; + +if (!$line) { + @bands = sort { Bands::get($a)->band->[0] <=> Bands::get($b)->band->[0] } Bands::get_keys(); + push @out, "Bands Available:-"; + foreach $band (@bands) { + my $ref = Bands::get($band)->band; + my $from = $ref->[0]; + my $to = $ref->[1]; + push @out, sprintf "%10s: %d -> %d", $band, $from, $to; + } + push @out, "Regions Available:-"; + @bands = Bands::get_region_keys(); + foreach $band (@bands) { + my $ref = Bands::get_region($band); + my $s = sprintf("%10s: ", $band ) . join(' ', @{$ref}); + push @out, $s; + } +} + +return (1, @out);