| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# $Id: Channel.pm,v 1.4 2003/09/11 19:57:31 davidb Exp $ |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# Copyright (C) 2003 Verisign, Inc. |
|
4
|
|
|
|
|
|
|
# |
|
5
|
|
|
|
|
|
|
# This library is free software; you can redistribute it and/or |
|
6
|
|
|
|
|
|
|
# modify it under the terms of the GNU Lesser General Public |
|
7
|
|
|
|
|
|
|
# License as published by the Free Software Foundation; either |
|
8
|
|
|
|
|
|
|
# version 2.1 of the License, or (at your option) any later version. |
|
9
|
|
|
|
|
|
|
# |
|
10
|
|
|
|
|
|
|
# This library is distributed in the hope that it will be useful, |
|
11
|
|
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12
|
|
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13
|
|
|
|
|
|
|
# Lesser General Public License for more details. |
|
14
|
|
|
|
|
|
|
# |
|
15
|
|
|
|
|
|
|
# You should have received a copy of the GNU Lesser General Public |
|
16
|
|
|
|
|
|
|
# License along with this library; if not, write to the Free Software |
|
17
|
|
|
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
|
18
|
|
|
|
|
|
|
# USA |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
package Net::BEEP::Lite::Channel; |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 NAME |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Net::BEEP::Lite::Channel - a class for holding BEEP channel variables. |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
This is a class that basically just hold various channel related variables. Most of the actual "action" methods are in C. |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=cut |
|
31
|
|
|
|
|
|
|
|
|
32
|
4
|
|
|
4
|
|
38878
|
use Carp; |
|
|
4
|
|
|
|
|
8
|
|
|
|
4
|
|
|
|
|
632
|
|
|
33
|
4
|
|
|
4
|
|
23
|
use strict; |
|
|
4
|
|
|
|
|
10
|
|
|
|
4
|
|
|
|
|
127
|
|
|
34
|
4
|
|
|
4
|
|
21
|
use warnings; |
|
|
4
|
|
|
|
|
10
|
|
|
|
4
|
|
|
|
|
125
|
|
|
35
|
|
|
|
|
|
|
|
|
36
|
4
|
|
|
4
|
|
1380
|
use Net::BEEP::Lite::Message; |
|
|
4
|
|
|
|
|
9
|
|
|
|
4
|
|
|
|
|
5406
|
|
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# some constants: |
|
39
|
|
|
|
|
|
|
my $MAX_MSGNO = 2147483648; |
|
40
|
|
|
|
|
|
|
my $MAX_SEQNO = 4294967296; |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=over 4 |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=item new( I ) |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
This is the main constructor. It takes a named parameter list as its |
|
49
|
|
|
|
|
|
|
argument. See the I method for a list of valid parameter |
|
50
|
|
|
|
|
|
|
names. |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=back |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=cut |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub new { |
|
57
|
2
|
|
|
2
|
1
|
4078
|
my $this = shift; |
|
58
|
2
|
|
33
|
|
|
15
|
my $class = ref($this) || $this; |
|
59
|
|
|
|
|
|
|
|
|
60
|
2
|
|
|
|
|
4
|
my $self = {}; |
|
61
|
2
|
|
|
|
|
7
|
bless $self, $class; |
|
62
|
|
|
|
|
|
|
|
|
63
|
2
|
|
|
|
|
7
|
$self->initialize(@_); |
|
64
|
|
|
|
|
|
|
|
|
65
|
2
|
|
|
|
|
6
|
$self; |
|
66
|
|
|
|
|
|
|
} |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 METHODS |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=over 4 |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item initialize( I ) |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Initialize the object. This is generally called by the constructor |
|
75
|
|
|
|
|
|
|
and subclasses. It takes the following named parameters: |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=over 4 |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=item Number |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
The channel number. |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=item Window |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
The local window to start with. Default to 4096. |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=item Profile |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
The profile implementation. |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=back |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=cut |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub initialize { |
|
96
|
2
|
|
|
2
|
1
|
5
|
my $self = shift; |
|
97
|
2
|
|
|
|
|
7
|
my %args = @_; |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
# default a few things |
|
100
|
2
|
|
|
|
|
11
|
$self->{debug} = 0; |
|
101
|
2
|
|
|
|
|
5
|
$self->{trace} = 0; |
|
102
|
2
|
|
|
|
|
4
|
$self->{profile} = undef; |
|
103
|
2
|
|
|
|
|
5
|
$self->{seqno} = 0; |
|
104
|
2
|
|
|
|
|
5
|
$self->{peer_seqno} = 0; |
|
105
|
2
|
|
|
|
|
4
|
$self->{msgno} = 0; |
|
106
|
2
|
|
|
|
|
7
|
$self->{local_window} = 4096; |
|
107
|
2
|
|
|
|
|
5
|
$self->{remote_window} = 4096; |
|
108
|
2
|
|
|
|
|
5
|
$self->{message} = undef; |
|
109
|
2
|
|
|
|
|
10
|
$self->{ans_message} = {}; |
|
110
|
2
|
|
|
|
|
3
|
$self->{number} = -1; |
|
111
|
|
|
|
|
|
|
|
|
112
|
2
|
|
|
|
|
9
|
for (keys %args) { |
|
113
|
3
|
|
|
|
|
5
|
my $val = $args{$_}; |
|
114
|
|
|
|
|
|
|
|
|
115
|
3
|
100
|
|
|
|
11
|
/^number$/io and do { |
|
116
|
1
|
|
|
|
|
3
|
$self->{number} = $val; |
|
117
|
1
|
|
|
|
|
2
|
next; |
|
118
|
|
|
|
|
|
|
}; |
|
119
|
2
|
100
|
|
|
|
19
|
/^window$/io and do { |
|
120
|
1
|
|
|
|
|
30
|
$self->local_window($val); |
|
121
|
1
|
|
|
|
|
4
|
next; |
|
122
|
|
|
|
|
|
|
}; |
|
123
|
1
|
50
|
|
|
|
5
|
/^profile/io and do { |
|
124
|
1
|
|
|
|
|
4
|
$self->profile($val); |
|
125
|
1
|
|
|
|
|
2
|
next; |
|
126
|
|
|
|
|
|
|
}; |
|
127
|
0
|
0
|
|
|
|
0
|
/^debug$/io and do { |
|
128
|
0
|
|
|
|
|
0
|
$self->{debug} = $val; |
|
129
|
0
|
|
|
|
|
0
|
next; |
|
130
|
|
|
|
|
|
|
}; |
|
131
|
0
|
0
|
|
|
|
0
|
/^trace$/io and do { |
|
132
|
0
|
|
|
|
|
0
|
$self->{trace} = $val; |
|
133
|
0
|
|
|
|
|
0
|
next; |
|
134
|
|
|
|
|
|
|
}; |
|
135
|
|
|
|
|
|
|
} |
|
136
|
|
|
|
|
|
|
} |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=item profile([$val]) |
|
139
|
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
Sets or returns the profile implementation object assoc. with this |
|
141
|
|
|
|
|
|
|
channel (if any). |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=cut |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
sub profile { |
|
146
|
2
|
|
|
2
|
1
|
19
|
my $self = shift; |
|
147
|
2
|
|
|
|
|
3
|
my $val = shift; |
|
148
|
|
|
|
|
|
|
|
|
149
|
2
|
100
|
|
|
|
7
|
$self->{profile} = $val if $val; |
|
150
|
2
|
|
|
|
|
7
|
$self->{profile}; |
|
151
|
|
|
|
|
|
|
} |
|
152
|
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=item seqno() |
|
154
|
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
Returns the current (sending) sequence number for this channel. Note |
|
156
|
|
|
|
|
|
|
that this is the sequence number for octets being sent to the peer. |
|
157
|
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=cut |
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
sub seqno { |
|
161
|
6
|
|
|
6
|
1
|
11
|
my $self = shift; |
|
162
|
|
|
|
|
|
|
|
|
163
|
6
|
|
|
|
|
31
|
$self->{seqno}; |
|
164
|
|
|
|
|
|
|
} |
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
=item update_seqno($length) |
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
Adds length to the current sequence number. This is done when frames |
|
169
|
|
|
|
|
|
|
are written to the socket. |
|
170
|
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=cut |
|
172
|
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
sub update_seqno { |
|
174
|
4
|
|
|
4
|
1
|
8
|
my $self = shift; |
|
175
|
4
|
|
|
|
|
6
|
my $length = shift; |
|
176
|
|
|
|
|
|
|
|
|
177
|
4
|
|
|
|
|
8
|
$self->{seqno} += $length; |
|
178
|
4
|
|
|
|
|
8
|
$self->{seqno} %= $MAX_SEQNO; |
|
179
|
4
|
|
|
|
|
8
|
$self->{seqno}; |
|
180
|
|
|
|
|
|
|
} |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=item peer_seqno([$val]) |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
Returns (or sets and returns) the peer sequence number. This is (or |
|
185
|
|
|
|
|
|
|
should be) the sequence number of the octet seen from the peer on this |
|
186
|
|
|
|
|
|
|
channel. I.e., this should get updated when frames are read from the |
|
187
|
|
|
|
|
|
|
socket. This value is primarily used in calculating SEQ frames to |
|
188
|
|
|
|
|
|
|
send back to the peer (as the ackno.). |
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
=cut |
|
191
|
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
# NOTE: the design of this module does not actually need this to |
|
193
|
|
|
|
|
|
|
# operate: acknos may be calculated directly from the last received |
|
194
|
|
|
|
|
|
|
# frame. This exists so at some future point it can be used to detect |
|
195
|
|
|
|
|
|
|
# channel corruption. |
|
196
|
|
|
|
|
|
|
sub peer_seqno { |
|
197
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
|
198
|
0
|
|
|
|
|
0
|
my $val = shift; |
|
199
|
|
|
|
|
|
|
|
|
200
|
0
|
0
|
|
|
|
0
|
$self->{peer_seqno} = $val if defined $val; |
|
201
|
0
|
|
|
|
|
0
|
$self->{peer_seqno}; |
|
202
|
|
|
|
|
|
|
} |
|
203
|
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
=item msgno([$val]) |
|
206
|
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
Sets or returns the current message number for this channel. |
|
208
|
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
=cut |
|
210
|
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
sub msgno { |
|
212
|
3
|
|
|
3
|
1
|
5
|
my $self = shift; |
|
213
|
3
|
|
|
|
|
4
|
my $val = shift; |
|
214
|
|
|
|
|
|
|
|
|
215
|
3
|
100
|
|
|
|
10
|
$self->{msgno} = $val if $val; |
|
216
|
3
|
|
|
|
|
13
|
$self->{msgno}; |
|
217
|
|
|
|
|
|
|
} |
|
218
|
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
=item next_msgno() |
|
220
|
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
Returns the current message number, then increments it. |
|
222
|
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
=cut |
|
224
|
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
sub next_msgno { |
|
226
|
5
|
|
|
5
|
1
|
8
|
my $self = shift; |
|
227
|
|
|
|
|
|
|
|
|
228
|
5
|
|
|
|
|
11
|
my $n = $self->{msgno}; |
|
229
|
5
|
|
|
|
|
6
|
$self->{msgno}++; |
|
230
|
|
|
|
|
|
|
|
|
231
|
5
|
|
|
|
|
11
|
$self->{msgno} %= $MAX_MSGNO; |
|
232
|
5
|
|
|
|
|
19
|
$n; |
|
233
|
|
|
|
|
|
|
} |
|
234
|
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
=item local_window([$val]) |
|
236
|
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
Sets or returns the size of the local (receiving) window. This is |
|
238
|
|
|
|
|
|
|
what gets published in sent SEQ frames for this window. |
|
239
|
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
=cut |
|
241
|
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
sub local_window { |
|
243
|
3
|
|
|
3
|
1
|
4
|
my $self = shift; |
|
244
|
3
|
|
|
|
|
4
|
my $val = shift; |
|
245
|
|
|
|
|
|
|
|
|
246
|
3
|
100
|
|
|
|
8
|
$self->{local_window} = $val if defined $val; |
|
247
|
3
|
|
|
|
|
10
|
$self->{local_window}; |
|
248
|
|
|
|
|
|
|
} |
|
249
|
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
=item remote_window([$val]) |
|
251
|
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
Sets or returns the size of the remove (sending) window. This is what |
|
253
|
|
|
|
|
|
|
is used to determine the max payload size on a frame that is about to |
|
254
|
|
|
|
|
|
|
be sent. |
|
255
|
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
=cut |
|
257
|
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
sub remote_window { |
|
259
|
2
|
|
|
2
|
1
|
5
|
my $self = shift; |
|
260
|
2
|
|
|
|
|
4
|
my $val = shift; |
|
261
|
|
|
|
|
|
|
|
|
262
|
2
|
100
|
|
|
|
9
|
$self->{remote_window} = $val if defined $val; |
|
263
|
2
|
|
|
|
|
10
|
$self->{remote_window}; |
|
264
|
|
|
|
|
|
|
} |
|
265
|
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
=item message() |
|
268
|
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
Returns the current message that is under construction by the recv_* method in C. |
|
270
|
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
=cut |
|
272
|
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
sub message { |
|
274
|
6
|
|
|
6
|
1
|
13
|
my $self = shift; |
|
275
|
6
|
|
|
|
|
7
|
my $val = shift; |
|
276
|
|
|
|
|
|
|
|
|
277
|
6
|
100
|
|
|
|
15
|
$self->{message} = $val if $val; |
|
278
|
6
|
|
|
|
|
20
|
$self->{message}; |
|
279
|
|
|
|
|
|
|
} |
|
280
|
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
=item message_add_frame($frame) |
|
282
|
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
Adds (or create a new message with) the frame to the message under |
|
284
|
|
|
|
|
|
|
construction. |
|
285
|
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
=cut |
|
287
|
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
sub message_add_frame { |
|
289
|
2
|
|
|
2
|
1
|
10
|
my $self = shift; |
|
290
|
2
|
|
|
|
|
3
|
my $frame = shift; |
|
291
|
|
|
|
|
|
|
|
|
292
|
2
|
100
|
|
|
|
5
|
if (not $self->message()) { |
|
293
|
1
|
|
|
|
|
6
|
$self->message(new Net::BEEP::Lite::Message(Frame => $frame, |
|
294
|
|
|
|
|
|
|
Debug => $self->{debug}, |
|
295
|
|
|
|
|
|
|
Trace => $self->{trace})); |
|
296
|
|
|
|
|
|
|
} else { |
|
297
|
1
|
|
|
|
|
7
|
$self->message()->add_frame($frame); |
|
298
|
|
|
|
|
|
|
} |
|
299
|
|
|
|
|
|
|
} |
|
300
|
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
=item clear_message() |
|
302
|
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
Clears the message under construction. This is generally done when the |
|
304
|
|
|
|
|
|
|
message is complete. |
|
305
|
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
=cut |
|
307
|
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
sub clear_message { |
|
309
|
1
|
|
|
1
|
1
|
3139
|
my $self = shift; |
|
310
|
|
|
|
|
|
|
|
|
311
|
1
|
|
|
|
|
4
|
$self->{message} = undef; |
|
312
|
|
|
|
|
|
|
} |
|
313
|
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
=item ans_message($ans_number, [$val]) |
|
315
|
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
Returns or sets the ANS message under construction for the given ANS |
|
317
|
|
|
|
|
|
|
number. |
|
318
|
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
=cut |
|
320
|
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
sub ans_message { |
|
322
|
5
|
|
|
5
|
1
|
9
|
my $self = shift; |
|
323
|
5
|
|
|
|
|
6
|
my $ansno = shift; |
|
324
|
5
|
|
|
|
|
8
|
my $val = shift; |
|
325
|
|
|
|
|
|
|
|
|
326
|
5
|
50
|
|
|
|
23
|
return undef if not defined $ansno; |
|
327
|
5
|
100
|
|
|
|
14
|
$self->{ans_message}->{$ansno} = $val if $val; |
|
328
|
5
|
|
|
|
|
21
|
$self->{ans_message}->{$ansno}; |
|
329
|
|
|
|
|
|
|
} |
|
330
|
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
=item ans_message_add_frame($frame) |
|
332
|
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
Adds a frame (or creates a new ANS message) for the ANS message under |
|
334
|
|
|
|
|
|
|
construction with the frame's ANS number. |
|
335
|
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
=cut |
|
337
|
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
sub ans_message_add_frame { |
|
339
|
2
|
|
|
2
|
1
|
11
|
my $self = shift; |
|
340
|
2
|
|
|
|
|
3
|
my $frame = shift; |
|
341
|
|
|
|
|
|
|
|
|
342
|
2
|
|
|
|
|
6
|
my $ansno = $frame->ansno(); |
|
343
|
|
|
|
|
|
|
|
|
344
|
2
|
100
|
|
|
|
8
|
if (not $self->ans_message($ansno)) { |
|
345
|
1
|
|
|
|
|
7
|
$self->ans_message($ansno, new Net::BEEP::Lite::Message |
|
346
|
|
|
|
|
|
|
(Frame => $frame, |
|
347
|
|
|
|
|
|
|
Debug => $self->{debug}, |
|
348
|
|
|
|
|
|
|
Trace => $self->{trace})); |
|
349
|
|
|
|
|
|
|
} else { |
|
350
|
1
|
|
|
|
|
51
|
$self->ans_message($ansno)->add_frame($frame); |
|
351
|
|
|
|
|
|
|
} |
|
352
|
|
|
|
|
|
|
} |
|
353
|
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
=item ans_clear_message($ans_number) |
|
355
|
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
Clears the ANS message under construction with the given ANS number. |
|
357
|
|
|
|
|
|
|
This is generally done when the message is complete. |
|
358
|
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
=cut |
|
360
|
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
sub ans_clear_message { |
|
362
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
|
363
|
0
|
|
|
|
|
0
|
my $ansno = shift; |
|
364
|
|
|
|
|
|
|
|
|
365
|
0
|
|
|
|
|
0
|
$self->{ans_message}->{$ansno} = undef; |
|
366
|
|
|
|
|
|
|
} |
|
367
|
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
=item number() |
|
369
|
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
Returns the channel number. |
|
371
|
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
=cut |
|
373
|
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
sub number { |
|
375
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
|
376
|
|
|
|
|
|
|
|
|
377
|
1
|
|
|
|
|
5
|
$self->{number}; |
|
378
|
|
|
|
|
|
|
} |
|
379
|
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
=pod |
|
381
|
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
=back |
|
383
|
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
385
|
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
=over 4 |
|
387
|
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
=item L |
|
389
|
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
=item L |
|
391
|
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
=back |
|
393
|
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
=cut |
|
395
|
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
1; |