projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added new html
[spider.git]
/
perl
/
Bands.pm
diff --git
a/perl/Bands.pm
b/perl/Bands.pm
index 99612693442156043afdf413d8824000222072df..55ac154c358022155833669327c301c18f77c830 100644
(file)
--- a/
perl/Bands.pm
+++ b/
perl/Bands.pm
@@
-14,16
+14,17
@@
use DXVars;
use Carp;
use strict;
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
%bands = (); # the 'raw' band data
%regions = (); # list of regions for shortcuts eg vhf ssb
+%aliases = (); # list of aliases
$bandsfn = "$main::data/bands.pl";
%valid = (
cw => '0,CW,parraypairs',
ssb => '0,SSB,parraypairs',
$bandsfn = "$main::data/bands.pl";
%valid = (
cw => '0,CW,parraypairs',
ssb => '0,SSB,parraypairs',
- data => '0,DATA,parraypairs
,parraypairs
',
+ data => '0,DATA,parraypairs',
sstv => '0,SSTV,parraypairs',
fstv => '0,FSTV,parraypairs',
rtty => '0,RTTY,parraypairs',
sstv => '0,SSTV,parraypairs',
fstv => '0,FSTV,parraypairs',
rtty => '0,RTTY,parraypairs',
@@
-47,6
+48,8
@@
sub load
sub get
{
my $call = shift;
sub get
{
my $call = shift;
+ my $ncall = $aliases{$call};
+ $call = $ncall if $ncall;
return $bands{$call};
}
return $bands{$call};
}
@@
-62,6
+65,25
@@
sub get_keys
return keys(%bands);
}
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
#
# get all the frequency pairs associated with the band and sub-band offered
# the band can be a region, sub-band can be missing
#