line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Device::MindWave::Packet::ThinkGear::DataValue::PoorSignal; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
32016
|
use strict; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
158
|
|
4
|
5
|
|
|
5
|
|
25
|
use warnings; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
129
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
577
|
use Device::MindWave::Utils qw(checksum); |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
269
|
|
7
|
|
|
|
|
|
|
|
8
|
5
|
|
|
5
|
|
25
|
use base qw(Device::MindWave::Packet::ThinkGear::DataValue); |
|
5
|
|
|
|
|
15
|
|
|
5
|
|
|
|
|
3269
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new |
11
|
|
|
|
|
|
|
{ |
12
|
6
|
|
|
6
|
1
|
1581
|
my ($class, $bytes, $index) = @_; |
13
|
|
|
|
|
|
|
|
14
|
6
|
|
|
|
|
96
|
my $self = { value => $bytes->[$index + 1] }; |
15
|
6
|
|
|
|
|
26
|
bless $self, $class; |
16
|
6
|
|
|
|
|
22
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub as_bytes |
20
|
|
|
|
|
|
|
{ |
21
|
3
|
|
|
3
|
1
|
825
|
my ($self) = @_; |
22
|
|
|
|
|
|
|
|
23
|
3
|
|
|
|
|
31
|
return [ 0x02, $self->{'value'} ]; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub length |
27
|
|
|
|
|
|
|
{ |
28
|
4
|
|
|
4
|
1
|
25
|
return 2; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub as_string |
32
|
|
|
|
|
|
|
{ |
33
|
3
|
|
|
3
|
1
|
577
|
my ($self) = @_; |
34
|
|
|
|
|
|
|
|
35
|
3
|
100
|
|
|
|
27
|
return "Poor signal (".$self->{'value'}."/200)". |
36
|
|
|
|
|
|
|
(($self->{'value'} == 200) ? " (no signal found)" : ""); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub as_hashref |
40
|
|
|
|
|
|
|
{ |
41
|
2
|
|
|
2
|
1
|
6
|
my ($self) = @_; |
42
|
|
|
|
|
|
|
|
43
|
2
|
|
|
|
|
16
|
return { PoorSignal => $self->{'value'} }; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |