| 1 | package Ham::Reference::Qsignals; | ||||||||||||
| 2 | |||||||||||||
| 3 | # -------------------------------------------------------------------------- | ||||||||||||
| 4 | # Ham::Reference::Qsignals - A quick reference for Q Signals | ||||||||||||
| 5 | # | ||||||||||||
| 6 | # Copyright (c) 2008 Brad McConahay N8QQ. | ||||||||||||
| 7 | # Cincinnat, Ohio USA | ||||||||||||
| 8 | # | ||||||||||||
| 9 | # This module is free software; you can redistribute it and/or | ||||||||||||
| 10 | # modify it under the terms of the Artistic License 2.0. For | ||||||||||||
| 11 | # details, see the full text of the license in the file LICENSE. | ||||||||||||
| 12 | # | ||||||||||||
| 13 | # This program is distributed in the hope that it will be | ||||||||||||
| 14 | # useful, but it is provided "as is" and without any express | ||||||||||||
| 15 | # or implied warranties. For details, see the full text of | ||||||||||||
| 16 | # the license in the file LICENSE. | ||||||||||||
| 17 | # -------------------------------------------------------------------------- | ||||||||||||
| 18 | |||||||||||||
| 19 | 2 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 20 | 2 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 21 | |||||||||||||
| 22 | 2 | ▶ | use vars qw($VERSION); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 23 | |||||||||||||
| 24 | 2 | our $VERSION = '0.02'; | |||||||||||
| 25 | |||||||||||||
| 26 | 2 | my $qsignals = {}; | |||||||||||
| 27 | $qsignals->{arrl} = | ||||||||||||
| 28 | { | ||||||||||||
| 29 | 2 | 'qna' => 'Answer in prearranged order.', | |||||||||||
| 30 | 'qnc' => 'All net stations copy.', | ||||||||||||
| 31 | 'qnd' => 'Net is directed.', | ||||||||||||
| 32 | 'qne' => 'Entire net stand by.', | ||||||||||||
| 33 | 'qnf' => 'Net is free.', | ||||||||||||
| 34 | 'qng' => 'Take over as net control station.', | ||||||||||||
| 35 | 'qni' => 'Net stations report in.', | ||||||||||||
| 36 | 'qnm' => 'You are QRMing the net.', | ||||||||||||
| 37 | 'qnn' => 'Net control station is [call sign].', | ||||||||||||
| 38 | 'qno' => 'Station is leaving the net.', | ||||||||||||
| 39 | 'qnp' => 'Unable to copy you.', | ||||||||||||
| 40 | 'qns' => 'Following stations are in the net.', | ||||||||||||
| 41 | 'qnt' => 'I request permission to leave the net.', | ||||||||||||
| 42 | 'qnu' => 'The net has traffic for you.', | ||||||||||||
| 43 | 'qnx' => 'You are excused from the net', | ||||||||||||
| 44 | 'qny' => 'Shift to another frequency.', | ||||||||||||
| 45 | 'qnz' => 'Zero beat your signal with mine.', | ||||||||||||
| 46 | 'qrg' => 'Will you tell me my exact frequency?', | ||||||||||||
| 47 | 'qrh' => 'Does my frequency vary?', | ||||||||||||
| 48 | 'qrj' => 'Are you receiving me badly?', | ||||||||||||
| 49 | 'qrk' => 'What is the intelligibility of my signals?', | ||||||||||||
| 50 | 'qrl' => 'Are you busy?', | ||||||||||||
| 51 | 'qrm' => 'Is my transmission being interfered with?', | ||||||||||||
| 52 | 'qrn' => 'Are you troubled by static?', | ||||||||||||
| 53 | 'qro' => 'Shall I increase power?', | ||||||||||||
| 54 | 'qrp' => 'Shall I decrease power?', | ||||||||||||
| 55 | 'qrq' => 'Shall I send faster?', | ||||||||||||
| 56 | 'qrs' => 'Shall I send more slowly?', | ||||||||||||
| 57 | 'qrt' => 'Shall I stop sending?', | ||||||||||||
| 58 | 'qru' => 'Have you anything for me?', | ||||||||||||
| 59 | 'qrv' => 'Are you ready?', | ||||||||||||
| 60 | 'qrx' => 'When will you call me again?', | ||||||||||||
| 61 | 'qry' => 'What is my turn?', | ||||||||||||
| 62 | 'qrz' => 'Who is calling me?', | ||||||||||||
| 63 | 'qsa' => 'What is the strength of my signals?', | ||||||||||||
| 64 | 'qsb' => 'Are my signals fading?', | ||||||||||||
| 65 | 'qsd' => 'Is my keying defective?', | ||||||||||||
| 66 | 'qsg' => 'Shall I send messages?', | ||||||||||||
| 67 | 'qsk' => 'Can you hear between your signals?', | ||||||||||||
| 68 | 'qsl' => 'Can you acknowledge receipt?', | ||||||||||||
| 69 | 'qsm' => 'Shall I repeat the last message?', | ||||||||||||
| 70 | 'qsn' => 'Did you hear me?', | ||||||||||||
| 71 | 'qso' => 'Can you communicate with me?', | ||||||||||||
| 72 | 'qsp' => 'Will you relay?', | ||||||||||||
| 73 | 'qst' => 'General call preceding a message.', | ||||||||||||
| 74 | 'qsu' => 'Shall I send or reply on this frequency?', | ||||||||||||
| 75 | 'qsw' => 'Will you send on this frequency?', | ||||||||||||
| 76 | 'qsx' => 'Will you listen?', | ||||||||||||
| 77 | 'qsy' => 'Shall I change frequency?', | ||||||||||||
| 78 | 'qsz' => 'Shall I send each word more than once?', | ||||||||||||
| 79 | 'qta' => 'Shall I cancel message?', | ||||||||||||
| 80 | 'qtb' => 'Do you agree with my counting of words?', | ||||||||||||
| 81 | 'qtc' => 'How many messages have you to send?', | ||||||||||||
| 82 | 'qth' => 'What is your location?', | ||||||||||||
| 83 | 'qtr' => 'What is the correct time?' | ||||||||||||
| 84 | }; | ||||||||||||
| 85 | |||||||||||||
| 86 | sub new | ||||||||||||
| 87 | 0 | ▶ | { | ||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 88 | 0 | my $class = shift; | |||||||||||
| 89 | 0 | my %args = @_; | |||||||||||
| 90 | 0 | my $self = {}; | |||||||||||
| 91 | 0 | bless $self, $class; | |||||||||||
| 92 | 0 | ▶ | $self->{signal_set} = lc($args{signal_set}) || 'arrl'; | ||||||||||
|
Condition0%0/2
lc $args{'signal_set'} || 'arrl'
MC/DC0%0/1
lc $args{'signal_set'} || 'arrl'
lc $args{'signal_set'}
Truth table0%0/2
A
A= lc $args{'signal_set'}
| |||||||||||||
| 93 | 0 | return $self; | |||||||||||
| 94 | } | ||||||||||||
| 95 | |||||||||||||
| 96 | sub get | ||||||||||||
| 97 | 0 | ▶ | { | ||||||||||
|
Subroutine
get: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 98 | 0 | my $self = shift; | |||||||||||
| 99 | 0 | my $signal = shift; | |||||||||||
| 100 | 0 | ▶ | return $qsignals->{$self->{signal_set}}->{lc($signal)} || undef; | ||||||||||
|
Condition0%0/2
$$qsignals{$self->{'signal_set'}}{lc $signal} || undef
MC/DC0%0/1
$$qsignals{$self->{'signal_set'}}{lc $signal} || undef
$$qsignals{$self->{'signal_set'}}{lc $signal}
Truth table0%0/2
A
A= $$qsignals{$self->{'signal_set'}}{lc $signal}
| |||||||||||||
| 101 | } | ||||||||||||
| 102 | |||||||||||||
| 103 | sub get_hashref | ||||||||||||
| 104 | 0 | ▶ | { | ||||||||||
|
Subroutine
get_hashref: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 105 | 0 | my $self = shift; | |||||||||||
| 106 | 0 | return $qsignals->{$self->{signal_set}}; | |||||||||||
| 107 | } | ||||||||||||
| 108 | |||||||||||||
| 109 | 2 | 1; | |||||||||||
| 110 | |||||||||||||
| 111 | =head1 NAME | ||||||||||||
| 112 | |||||||||||||
| 113 | Ham::Reference::Qsignals - A quick reference for Q Signals. | ||||||||||||
| 114 | |||||||||||||
| 115 | =head1 VERSION | ||||||||||||
| 116 | |||||||||||||
| 117 | Version 0.02 | ||||||||||||
| 118 | |||||||||||||
| 119 | =head1 SYNOPSIS | ||||||||||||
| 120 | |||||||||||||
| 121 | my $q = new Ham::Reference::Qsignals; | ||||||||||||
| 122 | |||||||||||||
| 123 | # use the get() function to get a single meaning for a particular Q signal | ||||||||||||
| 124 | |||||||||||||
| 125 | print $q->get('qrp'); | ||||||||||||
| 126 | print "\n"; | ||||||||||||
| 127 | |||||||||||||
| 128 | # use a hash reference to get all Q signals at once | ||||||||||||
| 129 | # the following will display all signals and meanings | ||||||||||||
| 130 | |||||||||||||
| 131 | my $hashref = $q->get_hashref(); | ||||||||||||
| 132 | foreach (sort keys %$hashref) | ||||||||||||
| 133 | { | ||||||||||||
| 134 | print "$_ = $hashref->{$_}\n"; | ||||||||||||
| 135 | } | ||||||||||||
| 136 | |||||||||||||
| 137 | =head1 DESCRIPTION | ||||||||||||
| 138 | |||||||||||||
| 139 | The C<Ham::Reference::Qsignals> module is a quick reference to the ARRL suggested Q signal set. | ||||||||||||
| 140 | Other Q signal sets may be added in the future, but the primary mission of this module is | ||||||||||||
| 141 | for Amateur Radio applications. | ||||||||||||
| 142 | |||||||||||||
| 143 | =head1 CONSTRUCTOR | ||||||||||||
| 144 | |||||||||||||
| 145 | =head2 new() | ||||||||||||
| 146 | |||||||||||||
| 147 | Usage : my $q = Ham::Reference::Qsignals->new(); | ||||||||||||
| 148 | Function : creates a new Ham::Reference::Qsignals object | ||||||||||||
| 149 | Returns : A Ham::Reference::Qsignals object | ||||||||||||
| 150 | Args : an anonymous hash: | ||||||||||||
| 151 | key required? value | ||||||||||||
| 152 | ------- --------- ----- | ||||||||||||
| 153 | signal_set no select the set of Q signals | ||||||||||||
| 154 | the only set for now, and the default set | ||||||||||||
| 155 | is arrl | ||||||||||||
| 156 | |||||||||||||
| 157 | |||||||||||||
| 158 | =head1 METHODS | ||||||||||||
| 159 | |||||||||||||
| 160 | =head2 get() | ||||||||||||
| 161 | |||||||||||||
| 162 | Usage : my $description = $q->get( 'qrp' ); | ||||||||||||
| 163 | Function : gets a single meaning for a given Q signal | ||||||||||||
| 164 | Returns : a string | ||||||||||||
| 165 | Args : you can get a full list of Q signals by accessing the keys of | ||||||||||||
| 166 | of the hashref returned by get_hashref() function | ||||||||||||
| 167 | (see the synopsis for example) | ||||||||||||
| 168 | |||||||||||||
| 169 | =head2 get_hashref() | ||||||||||||
| 170 | |||||||||||||
| 171 | Usage : my $hashref = $q->get_hashref(); | ||||||||||||
| 172 | Function : get all q signals | ||||||||||||
| 173 | Returns : a hash reference | ||||||||||||
| 174 | Args : n/a | ||||||||||||
| 175 | |||||||||||||
| 176 | =head1 ACKNOWLEDGEMENTS | ||||||||||||
| 177 | |||||||||||||
| 178 | The arrl Q signal set is from http://www.arrl.org/files/bbs/general/q-sigs, | ||||||||||||
| 179 | courtesy of the American Radio Relay League. | ||||||||||||
| 180 | |||||||||||||
| 181 | =head1 AUTHOR | ||||||||||||
| 182 | |||||||||||||
| 183 | Brad McConahay N8QQ, C<< <brad at n8qq.com> >> | ||||||||||||
| 184 | |||||||||||||
| 185 | =head1 COPYRIGHT & LICENSE | ||||||||||||
| 186 | |||||||||||||
| 187 | C<Ham::Reference::Qsignals> is Copyright (C) 2008-2010 Brad McConahay N8QQ. | ||||||||||||
| 188 | |||||||||||||
| 189 | This module is free software; you can redistribute it and/or | ||||||||||||
| 190 | modify it under the terms of the Artistic License 2.0. For | ||||||||||||
| 191 | details, see the full text of the license in the file LICENSE. | ||||||||||||
| 192 | |||||||||||||
| 193 | This program is distributed in the hope that it will be | ||||||||||||
| 194 | useful, but it is provided "as is" and without any express | ||||||||||||
| 195 | or implied warranties. For details, see the full text of | ||||||||||||
| 196 | the license in the file LICENSE. | ||||||||||||
| 197 | |||||||||||||
| 198 | |||||||||||||