line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Device::MindWave::Packet::Dongle::HeadsetNotFound; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
31013
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
163
|
|
4
|
5
|
|
|
5
|
|
26
|
use warnings; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
135
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
511
|
use Device::MindWave::Utils qw(checksum); |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
257
|
|
7
|
|
|
|
|
|
|
|
8
|
5
|
|
|
5
|
|
25
|
use base qw(Device::MindWave::Packet::Dongle); |
|
5
|
|
|
|
|
16
|
|
|
5
|
|
|
|
|
1686
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new |
11
|
|
|
|
|
|
|
{ |
12
|
5
|
|
|
5
|
1
|
24
|
my ($class, $bytes, $index) = @_; |
13
|
|
|
|
|
|
|
|
14
|
5
|
|
|
|
|
21
|
my $self = { headset_upper => $bytes->[$index + 2], |
15
|
|
|
|
|
|
|
headset_lower => $bytes->[$index + 3] }; |
16
|
5
|
|
|
|
|
17
|
bless $self, $class; |
17
|
5
|
|
|
|
|
24
|
return $self; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub code |
21
|
|
|
|
|
|
|
{ |
22
|
1
|
|
|
1
|
1
|
350
|
return 0xD1; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub as_bytes |
26
|
|
|
|
|
|
|
{ |
27
|
3
|
|
|
3
|
1
|
6
|
my ($self) = @_; |
28
|
|
|
|
|
|
|
|
29
|
3
|
|
|
|
|
25
|
return [ 0xD1, 0x02, |
30
|
|
|
|
|
|
|
$self->{'headset_upper'}, |
31
|
|
|
|
|
|
|
$self->{'headset_lower'} ]; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub length |
35
|
|
|
|
|
|
|
{ |
36
|
1
|
|
|
1
|
1
|
2
|
return 4; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub as_string |
40
|
|
|
|
|
|
|
{ |
41
|
1
|
|
|
1
|
1
|
315
|
my ($self) = @_; |
42
|
|
|
|
|
|
|
|
43
|
1
|
|
|
|
|
24
|
return sprintf "Headset (%X%X) not found", |
44
|
|
|
|
|
|
|
$self->{'headset_upper'}, |
45
|
|
|
|
|
|
|
$self->{'headset_lower'}; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__END__ |