line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
5
|
|
|
5
|
|
24
|
use strict; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
154
|
|
2
|
5
|
|
|
5
|
|
26
|
use warnings; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
240
|
|
3
|
|
|
|
|
|
|
package Device::RFXCOM::Response::Sensor; |
4
|
|
|
|
|
|
|
$Device::RFXCOM::Response::Sensor::VERSION = '1.142010'; |
5
|
|
|
|
|
|
|
# ABSTRACT: Device::RFXCOM::Response class for Sensor message from RFXCOM receiver |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
5
|
|
|
5
|
|
81
|
use 5.006; |
|
5
|
|
|
|
|
17
|
|
|
5
|
|
|
|
|
214
|
|
9
|
5
|
|
|
5
|
|
23
|
use constant DEBUG => $ENV{DEVICE_RFXCOM_RESPONSE_SENSOR_DEBUG}; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
383
|
|
10
|
5
|
|
|
5
|
|
26
|
use Carp qw/croak/; |
|
5
|
|
|
|
|
21
|
|
|
5
|
|
|
|
|
1351
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
85
|
|
|
85
|
1
|
374
|
my ($pkg, %p) = @_; |
15
|
85
|
|
|
|
|
731
|
bless { %p }, $pkg; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
85
|
|
|
85
|
1
|
328
|
sub type { 'sensor' } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
85
|
|
|
85
|
1
|
207
|
sub measurement { shift->{measurement} } |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
85
|
|
|
85
|
1
|
254
|
sub device { shift->{device} } |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
85
|
|
|
85
|
1
|
605
|
sub value { shift->{value} } |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
85
|
|
|
85
|
1
|
827
|
sub units { shift->{units} } |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub summary { |
35
|
85
|
|
|
85
|
1
|
119
|
my $self = shift; |
36
|
85
|
|
100
|
|
|
275
|
$self->type.'/'. |
37
|
|
|
|
|
|
|
$self->device.'['.$self->measurement.']='.$self->value.($self->units||''); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |