Branch Coverage

blib/lib/RFID/Matrics/Reader.pm
Criterion Covered Total %
branch 79 220 35.9


line true false branch
108 3 0 unless $$self{'timeout'}
116 0 3 if (grep {not $_ =~ /Unknown setting/;} @errs)
122 0 3 unless (defined $$self{'default_antenna'})
124 0 0 if (defined $$self{'_antenna_sequence'}) { }
133 3 0 unless $$self{'_antenna_sequence'}
137 3 0 if $$self{'default_node'} and not $p{'noinit'}
169 10 26 unless defined $$p{'node'}
171 10 26 unless defined $$p{'antenna'}
173 12 24 if defined $$p{'antenna'} and $$p{'antenna'} < 10
198 0 17 unless ($sof == 1)
202 0 17 unless (crc(substr($packet, 1, -2)) == $dat{'crc'})
206 0 17 if (($dat{'status'} & 128) == 128 or ($dat{'status'} & 192) == 192)
217 0 17 unless my $data = $self->_readbytes(3)
219 0 17 unless length $data == 3
223 0 17 unless my $moredata = $self->_readbytes($len - 2)
225 0 17 unless length $moredata == $len - 2
228 0 17 if $$self{'_debug'}
238 0 15 if $$self{'_debug'}
240 0 15 unless $self->_writebytes($data)
250 0 15 unless my $cmd = &$cmd_sub($self, %p)
252 0 15 unless $self->_sendpacket($cmd)
257 0 17 unless my $resp = $self->_getpacket
259 0 17 unless my $pr = &$resp_sub($self, $resp)
262 15 2 unless $$pr{'status'} & 1
264 2 13 wantarray ? :
287 4 2 if ($paramblock_rename{$g} or $g =~ /^(\w+)_Antenna(\d+)$/ and $paramblock_rename{$1}) { }
0 2 elsif ($g eq 'AntennaSequence') { }
2 0 elsif ($readerstatus_rename{$g}) { }
290 4 0 if ($paramblock_rename{$g}) { }
300 2 2 unless ($paramblocks{$ant})
302 0 2 unless $paramblocks{$ant} = $self->getparamblock('antenna', $antid{$ant})
305 0 4 if ($g eq 'Mask') { }
308 0 0 if ($masktype == 0) { }
316 0 0 if ($masktype == 1) { }
0 0 elsif ($masktype == 2) { }
0 0 elsif ($masktype == 3) { }
346 2 0 unless ($readerstatus)
350 0 2 unless $readerstatus = $self->getreaderstatus(%p)
360 2 2 if (wantarray) { }
395 0 4 unless my $pp = $self->_parsepacket(@_)
404 0 16 if ($ca & 1 << $i)
446 4 8 if ($paramblock_rename{$k} or $k =~ /^(\w+)_Antenna(\d+)$/ and $paramblock_rename{$1}) { }
0 8 elsif ($k eq 'AntennaSequence') { }
0 8 elsif ($k eq 'node') { }
0 8 elsif ($k eq 'baudrate') { }
449 4 0 if ($paramblock_rename{$k}) { }
457 0 4 if ($param eq 'Mask')
459 0 0 if ($v eq '') { }
467 0 0 if ($start)
472 0 0 unless (defined $len)
477 0 0 if ($len == 0) { }
0 0 elsif ($len == 8) { }
0 0 elsif ($len == 40) { }
0 0 elsif ($len == 64) { }
522 3 2 if (keys %unknown)
538 2 18 if ($antset{$ant})
542 0 2 unless $self->changeparamblock(%{$antset{$ant};})
564 2 0 defined $p{'power_level'} ? :
2 0 defined $p{'environment'} ? :
582 0 2 unless my $pp = $self->_parsepacket(@_)
592 0 2 unless $p{'antenna'}
594 0 2 unless my $curparam = $self->getparamblock(@_)
596 0 2 if ($p{'combine_antennas'})
623 2 0 if $$r{'tags'}
632 0 2 unless my(@resp) = $self->_do_something(\&_cmd_readfullfield, \&_resp_readfullfield, @_)
658 0 4 unless my $pp = $self->_parsepacket(@_)
685 0 0 unless $self->_sendpacket($cmd)
699 0 0 $p{'antenna2_power'} || $p{'antenna2'} ? :
0 0 $p{'antenna3_power'} || $p{'antenna3'} ? :
0 0 $p{'antenna4_power'} || $p{'antenna4'} ? :
728 0 0 if ($type == 12) { }
752 0 0 unless $$self{'_constant_read'}{$p{'node'}}
755 0 0 unless my $resp = $self->_getpacket
766 0 0 unless ($pp)
776 0 0 if ($$pp{'error'})
797 0 10 $type_len_bits & 16 ? :
801 2 8 if ($type == 0) { }
843 0 3 unless my $pp = $self->_parsepacket(@_)
852 0 0 if ($$self{'_constant_read'} and $self->_connected)
874 2 0 unless (keys %antflag)
878 2 0 $antflag{'160'} ? :
0 2 $antflag{'176'} ? :
0 2 $antflag{'192'} ? :
0 2 $antflag{'208'} ? :
896 0 2 unless ($$p{'combine_antenna_bits'})
899 0 0 if ($$p{'combine_antennas'})
915 0 0 unless my(@resp) = $self->_do_something(\&_cmd_epc_readfullfield, \&_resp_epc_readfullfield, %p)
943 0 0 unless my $pp = $self->_parsepacket(@_)
984 0 0 unless my $pp = $self->_parsepacket(@_)
1004 0 0 defined $p{'power_level'} ? :
1024 0 0 unless my $pp = $self->_parsepacket(@_)
1034 0 0 unless $p{'antenna'}
1036 0 0 unless my $curparam = $self->epc_getparamblock(@_)
1047 0 0 if ($p{'oldnode'} == 255 or not $p{'oldnode'}) { }
1050 0 0 unless my $cmd = _cmd_setnodeaddress($self, @_)
1052 0 0 unless $self->_sendpacket($cmd)
1068 0 0 unless ($p{'serialnum_bits'})
1070 0 0 unless defined $p{'serialnum'}
1073 0 0 unless $p{'newnode'} or $p{'node'}
1088 0 0 unless my $pp = $self->_parsepacket(@_)
1111 0 2 unless my $pp = $self->_parsepacket(@_)
1135 2 0 unless ($p{'serialnum_bits'})
1137 0 2 unless defined $p{'serialnum'}
1152 0 2 unless my $pp = $self->_parsepacket(@_)
1172 0 0 unless ($p{'baudrate_bits'})
1174 0 0 unless defined $p{'baudrate'}
1175 0 0 unless defined($p{'baudrate_bits'} = $baudnum{$p{'baudrate'}})
1188 0 0 unless my $pp = $self->_parsepacket(@_)
1210 0 0 unless $self->stop_all_constant_read
1220 0 0 defined $ec ? :