Branch Coverage

blib/lib/Device/ELM327.pm
Criterion Covered Total %
branch 1 324 0.3


line true false branch
16 0 1 if ($^O eq 'MSWin32') { }
130 0 0 if (defined $debug_level)
2208 0 0 if (defined $replay_filename) { }
2239 0 0 if ($$self{'port'} == -1) { }
2241 0 0 if ($$self{'debug_level'} > 0)
2268 0 0 if (exists $$definition{'available'} and $$definition{'available'} == 1)
2274 0 0 if (exists $$result{'name'}) { }
2282 0 0 if (exists $$result{'unit'} and $$result{'unit'} ne '') { }
0 0 elsif (substr($$result{'type'}, 0, 4) eq 'bool') { }
2317 0 0 if ($$self{'debug_level'} > 0)
2323 0 0 if ($$response{'status'} eq 'ok') { }
2328 0 0 if (exists $$result{'min_limit'})
2332 0 0 if (exists $$result{'max_limit'})
2399 0 0 if ($$self{'debug_level'} > 0)
2401 0 0 if (exists $$self{'get'}{$name}) { }
2403 0 0 if (exists $$self{'get'}{$name}{'available'} and $$self{'get'}{$name}{'available'} == 1) { }
2407 0 0 if (substr($name, 0, 12) eq 'Freeze frame') { }
0 0 elsif (substr($command, 0, 2) eq '05' and substr($command, 0, 5) ne '05 00') { }
2409 0 0 if (defined $parameter) { }
2421 0 0 if (defined $parameter) { }
2434 0 0 if ($$results{'status'} ne 'ok')
2440 0 0 if (substr($command, 0, 2) eq '06' and substr($command, 0, 5) ne '06 00' and substr($command, 0, 5) ne '06 20' and substr($command, 0, 5) ne '06 40' and substr($command, 0, 5) ne '06 60' and substr($command, 0, 5) ne '06 80' and substr($command, 0, 5) ne '06 A0' and substr($command, 0, 5) ne '06 C0' and substr($command, 0, 5) ne '06 E0' and $$self{'bus_type'} eq 'CAN') { }
2452 0 0 if ($$self{'debug_level'} > 2)
2453 0 0 if (exists $$result{'name'}) { }
2467 0 0 if ($type[0] eq 'signed')
2473 0 0 if ($type[$index] eq 'AT') { }
2477 0 0 if (defined $$result{'modifier'})
2481 0 0 if ($$self{'debug_level'} > 2)
2484 0 0 if ($$self{'debug_level'} > 1)
2490 0 0 if ($$self{'debug_level'} > 2)
2495 0 0 if ($$self{'debug_level'} > 2)
2497 0 0 if ($value ne 'no result')
2501 0 0 if ($type[$index] eq 'byte' and $type[0] eq 'signed') { }
0 0 elsif ($type[$index] eq 'word' and $type[0] eq 'signed') { }
2516 0 0 if ($type[$index] ne 'string') { }
2518 0 0 if ($$self{'debug_level'} > 2)
2520 0 0 if ($$self{'debug_level'} > 2)
2527 0 0 if ($$self{'debug_level'} > 2)
2531 0 0 if ($type[$index] eq 'bool')
2533 0 0 if ($value != 0)
2534 0 0 if ($unit ne '')
2541 0 0 if (exists $$result{'alternatives'})
2545 0 0 if ($$alternative{'value'} == $value)
2555 0 0 if ($$self{'debug_level'} > 2)
2557 0 0 if ($command eq '03' or $command eq '07' or $command eq '0A') { }
2574 0 0 if ($$self{'debug_level'} > 2)
2580 0 0 if ($$self{'debug_level'} > 2)
2605 0 0 if ($$self{'debug_level'} > 0)
2615 0 0 if ($malfunction_indicator_lamp_state > 0) { }
2624 0 0 if ($number_of_codes > 0 or $malfunction_indicator_lamp_state > 0) { }
2627 0 0 if ($number_of_codes != 1)
2662 0 0 if ($$self{'debug_level'} > 0)
2692 0 0 if ($code eq 'no result' or $code == 0)
2702 0 0 if ($$self{'debug_level'} > 1)
2730 0 0 if ($$self{'debug_level'} > 0)
2750 0 0 if ($$self{'debug_level'} > 0)
2775 0 0 if ($$self{'debug_level'} > 0)
2805 0 0 if ($$self{'debug_level'} > 0)
2814 0 0 if ($command_parts[0] ne 'AT' and $status eq 'ok')
2817 0 0 if ($has_sub_command[$$self{'last_command'}]) { }
2862 0 0 unless (defined $number)
2864 0 0 if ($$self{'debug_level'} > 1)
2869 0 0 if ($$self{'results'}{$address}{'command'} == $$self{'last_command'} and $$self{'results'}{$address}{'sub_command'} == $$self{'last_sub_command'}) { }
2872 0 0 if ($type eq 'bool') { }
0 0 elsif ($type eq 'byte') { }
0 0 elsif ($type eq 'word') { }
0 0 elsif ($type eq 'dword') { }
0 0 elsif ($type eq 'string') { }
2874 0 0 if ($number_of_result_bytes < $number + 1) { }
2888 0 0 if ($number_of_result_bytes < $number + 1) { }
2902 0 0 if ($number_of_result_bytes < $number * 2 + 2) { }
2904 0 0 if ($$self{'debug_level'} > 2)
2917 0 0 if ($number_of_result_bytes < $number * 4 + 4) { }
2932 0 0 if ($number_of_result_bytes < $number) { }
2941 0 0 if ($number > 0) { }
2947 0 0 if ($_ > 32 and $_ < 127)
2987 0 0 if ($$self{'debug_level'} > 0)
2989 0 0 if ($$self{'replay_file'} == 0)
2991 0 0 if ($self->PortOK) { }
3038 0 0 if ($$self{'debug_level'} > 1)
3040 0 0 if ($$self{'replay_file'} == 0 and $self->PortOK) { }
3062 0 0 if $$self{'debug_level'} > 5
3065 0 0 if ($count_in == $bytes_to_read) { }
0 0 elsif ($prev eq '>' and not length $line) { }
3070 0 0 if ($string_in ne '>' and $string_in ne $null)
3072 0 0 if ($string_in eq $cr) { }
0 0 elsif (index("\r\n", $string_in) == -1) { }
3074 0 0 if ($line ne '')
3076 0 0 if $$self{'debug_level'} > 5
3099 0 0 if $try and $$self{'debug_level'} > 5
3101 0 0 if $try_delay * $try > 0
3118 0 0 if ($$self{'response_length'} == 0) { }
0 0 elsif ($$self{'response'}[0] eq 'NO DATA') { }
0 0 elsif ($$self{'response'}[0] eq 'STOPPED') { }
3131 0 0 if ($$self{'debug_level'} > 0)
3171 0 0 if ($$self{'debug_level'} > 1)
3185 0 0 if (scalar @line_parts > 2)
3188 0 0 if (length $address < 3) { }
3191 0 0 if ($$self{'debug_level'} > 4)
3198 0 0 if ($$self{'results'}{$address}{'command'} == 4)
3199 0 0 if ($$self{'results'}{$address}{'command'} == $command_mask)
3203 0 0 if ($has_sub_command[$$self{'results'}{$address}{'command'}]) { }
3211 0 0 if ($$self{'results'}{$address}{'command'} == 2) { }
0 0 elsif ($$self{'results'}{$address}{'command'} == 5) { }
0 0 elsif ($$self{'results'}{$address}{'command'} == 6) { }
3223 0 0 if (exists $$self{'results'}{$address}{'response_length'}) { }
3235 0 0 if ($$self{'debug_level'} > 4)
3240 0 0 if ($line_number <= 16)
3242 0 0 if ($line_number == 16)
3249 0 0 if ($line_number < 16)
3251 0 0 if ($has_sub_command[$$self{'results'}{$address}{'command'}] or $$self{'results'}{$address}{'command'} == $command_mask) { }
3261 0 0 if ($$self{'results'}{$address}{'command'} == 4)
3263 0 0 if ($$self{'results'}{$address}{'command'} == $command_mask) { }
3270 0 0 if ($has_sub_command[$$self{'results'}{$address}{'command'}]) { }
3278 0 0 if ($$self{'results'}{$address}{'command'} == 2)
3292 0 0 if ($$self{'debug_level'} > 2)
3315 0 0 if ($$self{'debug_level'} > 1)
3350 0 0 if ($index != 0)
3369 0 0 if (exists $$self{'Standardized_Test_IDs'}{$sdt_id})
3376 0 0 if ($uas_id >= 128)
3386 0 0 if (exists $$self{'unit_and_scaling_identifiers'}{$uas_id})
3401 0 0 if ($$self{'debug_level'} > 2)
3462 0 0 if (defined $port_details and $port_details ne '')
3466 0 0 if ($parameters[0] ne '')
3470 0 0 if ($parameter ne '')
3475 0 0 if (scalar @parameters > 0)
3478 0 0 if (scalar @parameters > 0)
3481 0 0 if (scalar @parameters > 0)
3484 0 0 if (scalar @parameters > 0)
3487 0 0 if (scalar @parameters > 0)
3497 0 0 if (not defined $port_name or $port_name eq '')
3499 0 0 if ($^O eq 'MSWin32') { }
3519 0 0 if ($^O eq 'MSWin32') { }
3528 0 0 if (defined $port) { }
3535 0 0 if ($parity eq 'none') { }
3553 0 0 if (substr($_, 0, 5) eq 'ELM32')
3558 0 0 if ($$self{'ELM_type'} eq 'NONE' and $$self{'debug_level'} > 0)
3565 0 0 if ($$self{'debug_level'} > 0)
3576 0 0 if ($$self{'ELM_type'} eq 'NONE')
3599 0 0 if ($$self{'debug_level'} > 0)
3601 0 0 if ($self->PortOK)
3642 0 0 if ($$self{'debug_level'} > 0)
3644 0 0 if ($$self{'bus_type'} eq 'CAN') { }
3684 0 0 if ($$self{'debug_level'} > 0)
3690 0 0 if ($$self{'debug_level'} > 1)
3692 0 0 if ($$response{'status'} eq 'ok') { }
3697 0 0 if ($$self{'debug_level'} > 1)
3698 0 0 if ($$self{'debug_level'} > 4)
3706 0 0 if (substr($$result{'name'}, 4, 15) eq 'IDs supported (' and $$result{'value'} == 1) { }
0 0 elsif ($$result{'value'} == 1 and substr($$result{'name'}, -2, 2) eq '13' && $$self{'get'}{'Location of oxygen sensors 13'}{'available'} == 1 || substr($$result{'name'}, -2, 2) eq '1D' && $$self{'get'}{'Location of oxygen sensors 1D'}{'available'} == 1) { }
3717 0 0 if ($$self{'debug_level'} > 2)
3723 0 0 if ($$result{'name'} eq 'Location of oxygen sensors 13' or $$result{'name'} eq 'Location of oxygen sensors 1D') { }
3731 0 0 if ($$self{'debug_level'} > 3)
3784 0 0 if ($replay_state == $get_command) { }
0 0 elsif ($replay_state == $seek_response) { }
0 0 elsif ($replay_state == $read_response) { }
3786 0 0 if (substr($_, 0, 1) eq '~')
3800 0 0 if ($index < $number_of_parameters - 1)
3811 0 0 if ($_ eq 'Response')
3818 0 0 if ($_ eq 'End of response') { }
3823 0 0 if ($$self{'debug_level'} > 1)
3833 0 0 if (length $_ > 0)