File Coverage

blib/lib/Device/MindWave/Packet/Dongle/ScanMode.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 5 5 100.0
total 31 31 100.0


line stmt bran cond sub pod time code
1             package Device::MindWave::Packet::Dongle::ScanMode;
2              
3 5     5   21639 use strict;
  5         10  
  5         171  
4 5     5   35 use warnings;
  5         10  
  5         135  
5              
6 5     5   29 use base qw(Device::MindWave::Packet::Dongle);
  5         10  
  5         1394  
7              
8             sub new
9             {
10 115     115 1 2711 my ($class) = @_;
11 115         157 my $self = {};
12 115         5499 bless $self, $class;
13 115         553 return $self;
14             }
15              
16             sub code
17             {
18 1     1 1 443 return 0xD5;
19             }
20              
21             sub as_bytes
22             {
23 58     58 1 67 my ($self) = @_;
24              
25 58         159 return [ 0xD4, 0x01, 0x01 ];
26             }
27              
28             sub length
29             {
30 1     1 1 3 return 3;
31             }
32              
33             sub as_string
34             {
35 1     1 1 311 return "Scanning";
36             }
37              
38             1;
39              
40             __END__