line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Device::MindWave::Packet::ThinkGear::DataValue::BlinkStrength; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
22558
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
169
|
|
4
|
5
|
|
|
5
|
|
26
|
use warnings; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
132
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
581
|
use Device::MindWave::Utils qw(checksum); |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
289
|
|
7
|
|
|
|
|
|
|
|
8
|
5
|
|
|
5
|
|
27
|
use base qw(Device::MindWave::Packet::ThinkGear::DataValue); |
|
5
|
|
|
|
|
15
|
|
|
5
|
|
|
|
|
1764
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new |
11
|
|
|
|
|
|
|
{ |
12
|
3
|
|
|
3
|
1
|
31
|
my ($class, $bytes, $index) = @_; |
13
|
|
|
|
|
|
|
|
14
|
3
|
|
|
|
|
16
|
my $self = { value => $bytes->[$index + 1] }; |
15
|
3
|
|
|
|
|
10
|
bless $self, $class; |
16
|
3
|
|
|
|
|
10
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub as_bytes |
20
|
|
|
|
|
|
|
{ |
21
|
2
|
|
|
2
|
1
|
734
|
my ($self) = @_; |
22
|
|
|
|
|
|
|
|
23
|
2
|
|
|
|
|
15
|
return [ 0x16, $self->{'value'} ]; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub length |
27
|
|
|
|
|
|
|
{ |
28
|
3
|
|
|
3
|
1
|
10
|
return 2; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub as_string |
32
|
|
|
|
|
|
|
{ |
33
|
2
|
|
|
2
|
1
|
542
|
my ($self) = @_; |
34
|
|
|
|
|
|
|
|
35
|
2
|
|
|
|
|
11
|
return "Blink strength (".$self->{'value'}."/255)"; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub as_hashref |
39
|
|
|
|
|
|
|
{ |
40
|
2
|
|
|
2
|
1
|
6
|
my ($self) = @_; |
41
|
|
|
|
|
|
|
|
42
|
2
|
|
|
|
|
21
|
return { BlinkStrength => $self->{'value'} }; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |