line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
4
|
|
|
4
|
|
23
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
151
|
|
2
|
4
|
|
|
4
|
|
18
|
use warnings; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
258
|
|
3
|
|
|
|
|
|
|
package Device::RFXCOM::Response; |
4
|
|
|
|
|
|
|
$Device::RFXCOM::Response::VERSION = '1.163170'; |
5
|
|
|
|
|
|
|
# ABSTRACT: Device::RFXCOM::Response class for data from RFXCOM receiver |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
106
|
use 5.006; |
|
4
|
|
|
|
|
11
|
|
9
|
4
|
|
|
4
|
|
21
|
use constant DEBUG => $ENV{DEVICE_RFXCOM_RESPONSE_DEBUG}; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
544
|
|
10
|
4
|
|
|
4
|
|
23
|
use Carp qw/croak/; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
1571
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
97
|
|
|
97
|
1
|
562
|
my ($pkg, %p) = @_; |
15
|
97
|
|
|
|
|
1015
|
bless { %p }, $pkg; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
104
|
|
|
104
|
1
|
419
|
sub type { shift->{type} } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
104
|
|
|
104
|
1
|
273
|
sub header_byte { shift->{header_byte} } |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
104
|
|
|
104
|
1
|
424
|
sub master { shift->{master} } |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
101
|
|
|
101
|
1
|
185
|
sub hex_data { unpack 'H*', shift->data } |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
108
|
|
|
108
|
1
|
529
|
sub data { shift->{data} } |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
7
|
|
|
7
|
1
|
26
|
sub length { length shift->data } |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
3
|
|
|
3
|
1
|
16
|
sub bytes { shift->{bytes} } |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
103
|
100
|
|
103
|
1
|
895
|
sub messages { shift->{messages} || [] } |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
98
|
|
|
98
|
1
|
1458
|
sub duplicate { shift->{duplicate} } |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub summary { |
47
|
97
|
|
|
97
|
1
|
124402
|
my $self = shift; |
48
|
97
|
|
|
|
|
229
|
my $str = join "\n ", map { $_->summary } @{$self->messages}; |
|
112
|
|
|
|
|
495
|
|
|
97
|
|
|
|
|
217
|
|
49
|
97
|
100
|
|
|
|
284
|
sprintf('%s %s %02x.%s%s%s', |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
50
|
|
|
|
|
|
|
$self->master ? 'master' : 'slave', |
51
|
|
|
|
|
|
|
$self->type, |
52
|
|
|
|
|
|
|
$self->header_byte, |
53
|
|
|
|
|
|
|
$self->hex_data, |
54
|
|
|
|
|
|
|
$self->duplicate ? '(dup)' : '', |
55
|
|
|
|
|
|
|
$str =~ /\n/ ? ":\n ".$str : $str ne '' ? ': '.$str : ''); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
__END__ |