line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
7
|
|
|
7
|
|
26
|
use strict; |
|
7
|
|
|
|
|
8
|
|
|
7
|
|
|
|
|
209
|
|
2
|
7
|
|
|
7
|
|
25
|
use warnings; |
|
7
|
|
|
|
|
8
|
|
|
7
|
|
|
|
|
134
|
|
3
|
|
|
|
|
|
|
|
4
|
7
|
|
|
7
|
|
22
|
use Carp; |
|
7
|
|
|
|
|
7
|
|
|
7
|
|
|
|
|
942
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Device::CableModem::Zoom5341J::Get |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NOTA BENE |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
This is part of the guts of Device::CableModem::Zoom5341J. If you're |
14
|
|
|
|
|
|
|
reading this, you're either developing the module, writing tests, or |
15
|
|
|
|
|
|
|
coloring outside the lines; consider yourself warned. |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=cut |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head2 ->get_down_stats |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Return all the downstream stats as a hashref. |
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
sub get_down_stats |
25
|
|
|
|
|
|
|
{ |
26
|
2
|
|
|
2
|
0
|
624
|
my $self = shift; |
27
|
|
|
|
|
|
|
|
28
|
2
|
100
|
|
|
|
15
|
$self->parse_conn_stats unless $self->{conn_stats}; |
29
|
2
|
100
|
|
|
|
143
|
croak "No downstats" unless $self->{conn_stats}{down}; |
30
|
1
|
|
|
|
|
2
|
return $self->{conn_stats}{down}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head2 ->get_up_stats |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Return all the upstream stats as a hashref. |
36
|
|
|
|
|
|
|
=cut |
37
|
|
|
|
|
|
|
sub get_up_stats |
38
|
|
|
|
|
|
|
{ |
39
|
2
|
|
|
2
|
0
|
3385
|
my $self = shift; |
40
|
|
|
|
|
|
|
|
41
|
2
|
50
|
|
|
|
9
|
$self->parse_conn_stats unless $self->{conn_stats}; |
42
|
2
|
100
|
|
|
|
78
|
croak "No upstats" unless $self->{conn_stats}{up}; |
43
|
1
|
|
|
|
|
3
|
return $self->{conn_stats}{up}; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 ->get_down_chanid |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Return an arrayref of downstream channel ids. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 ->get_down_freq |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Return an arrayref of downstream frequencies. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 ->get_down_mod |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Return an arrayref of downstream modulation schemata. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 ->get_down_power |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Return an arrayref of downstream power levels (dBmV). |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 ->get_down_snr |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Return an arrayref of downstream SNRs (dB). |
66
|
|
|
|
|
|
|
=cut |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
for my $k (qw(chanid freq mod power snr)) |
69
|
|
|
|
|
|
|
{ |
70
|
7
|
|
|
7
|
|
34
|
no strict 'refs'; |
|
7
|
|
|
|
|
11
|
|
|
7
|
|
|
|
|
696
|
|
71
|
|
|
|
|
|
|
*{"get_down_$k"} = sub { |
72
|
6
|
|
|
6
|
|
5709
|
my $self = shift; |
73
|
6
|
50
|
|
|
|
21
|
$self->parse_conn_stats unless $self->{conn_stats}; |
74
|
6
|
100
|
|
|
|
90
|
croak "No down ${k}stats" unless $self->{conn_stats}{down}{$k}; |
75
|
5
|
|
|
|
|
13
|
return $self->{conn_stats}{down}{$k}; |
76
|
|
|
|
|
|
|
}; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head2 ->get_up_chanid |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Return an arrayref of upstream channel ids. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 ->get_up_freq |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Return an arrayref of upstream frequencies. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head2 ->get_up_bw |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Return an arrayref of upstream bandwidths (in Ksym/sec). |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 ->get_up_power |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Return an arrayref of upstream power levels (dBmV). |
95
|
|
|
|
|
|
|
=cut |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
for my $k (qw(chanid freq bw power)) |
98
|
|
|
|
|
|
|
{ |
99
|
7
|
|
|
7
|
|
38
|
no strict 'refs'; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
643
|
|
100
|
|
|
|
|
|
|
*{"get_up_$k"} = sub { |
101
|
6
|
|
|
6
|
|
3938
|
my $self = shift; |
102
|
6
|
50
|
|
|
|
20
|
$self->parse_conn_stats unless $self->{conn_stats}; |
103
|
6
|
100
|
|
|
|
87
|
croak "No up ${k}stats" unless $self->{conn_stats}{up}{$k}; |
104
|
5
|
|
|
|
|
9
|
return $self->{conn_stats}{up}{$k}; |
105
|
|
|
|
|
|
|
}; |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
1; |
111
|
|
|
|
|
|
|
__END__ |