X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FBands.pm;h=55ac154c358022155833669327c301c18f77c830;hb=6a0068ec3df1dca0c6ae2714af3c0a4a62998dcf;hp=3f3c99849ddf8e9839f35204fa70c9b5c51d7a76;hpb=3f145290a93b39bf15b50269dd8be585d7b4bc9c;p=spider.git diff --git a/perl/Bands.pm b/perl/Bands.pm index 3f3c9984..55ac154c 100644 --- a/perl/Bands.pm +++ b/perl/Bands.pm @@ -14,10 +14,11 @@ use DXVars; use Carp; use strict; -use vars qw(%bands %regions $bandsfn %valid); +use vars qw(%bands %regions %aliases $bandsfn %valid); %bands = (); # the 'raw' band data %regions = (); # list of regions for shortcuts eg vhf ssb +%aliases = (); # list of aliases $bandsfn = "$main::data/bands.pl"; %valid = ( @@ -47,6 +48,8 @@ sub load sub get { my $call = shift; + my $ncall = $aliases{$call}; + $call = $ncall if $ncall; return $bands{$call}; } @@ -62,6 +65,25 @@ sub get_keys return keys(%bands); } +# get all the region keys +sub get_region_keys +{ + return keys(%regions); +} + +# get all the alias keys +sub get_alias_keys +{ + return keys(%aliases); +} + +# get a region +sub get_region +{ + my $reg = shift; + return $regions{$reg}; +} + # get all the frequency pairs associated with the band and sub-band offered # the band can be a region, sub-band can be missing #