Branch Coverage

blib/lib/ControlX10/CM11.pm
Criterion Covered Total %
branch 71 120 59.1


line true false branch
32 0 78 unless 2 == @_
37 0 1 unless 1 == @_
42 0 1 unless 2 == @_
47 0 11 unless 1 == @_
85 1 0 if (exists $main::config_parms{'debug'})
86 0 1 $main::config_parms{'debug'} eq 'X10' ? :
90 0 1 unless 1 == $serial_port->write($pc_ready)
99 0 1 unless $data = &read($serial_port, 1)
110 0 1 if $ControlX10::CM11::DEBUG
117 0 4 if ($extended_count) { }
126 0 4 unless $house = $table_hcodes2{$house_bits}
127 1 3 if (substr $mask, -++$i, 1) { }
128 0 1 unless $function = $table_fcodes2{$code_bits}
132 0 1 if $function =~ /^STATUS/
134 0 1 if $function eq 'Z'
139 0 1 if $ControlX10::CM11::DEBUG
142 0 3 unless $device = $table_dcodes2{$code_bits}
155 1 79 if $ControlX10::CM11::DEBUG
164 1 79 unless ($house_bits = $table_hcodes{$house})
176 3 76 if (my($dcode, $extended_data) = $code =~ /(\S)&P(\d+)/) { }
18 58 elsif ($code_bits = $table_dcodes{$code}) { }
48 10 elsif ($code_bits = $table_fcodes{$code}) { }
177 0 3 unless ($code_bits = $table_dcodes{$dcode})
181 1 2 unless ($extended_data >= 0 and $extended_data < 65)
207 0 2 if ($ControlX10::CM11::DEBUG)
224 5 43 if ($code eq 'DIM' or $code eq 'M' or $code eq 'BRIGHT' or $code eq 'L') { }
23 20 elsif ($code =~ /^[+-]\d\d$/) { }
257 2 66 if ($extended)
262 1 67 if $ControlX10::CM11::DEBUG
273 80 0 if (exists $main::config_parms{'debug'})
274 1 79 $main::config_parms{'debug'} eq 'X10' ? :
279 12 68 unless $data_snd
282 1 67 if $ControlX10::CM11::DEBUG
285 0 68 unless length $data_snd == $serial_port->write($data_snd)
295 0 68 if ($data_d == 90 || $data_d == 165 and not $checksum == 90 || $checksum == 165)
298 0 0 if $retry_cnt++ < 3
301 0 68 if ($checksum != $data_d)
303 0 0 if $retry_cnt++ < 3
306 1 67 if $ControlX10::CM11::DEBUG
308 0 68 unless 1 == $serial_port->write($pc_ok)
313 68 0 if ($data_d == 85) { }
0 0 elsif ($data_d == 90 or $data_d == 165) { }
314 1 67 if $ControlX10::CM11::DEBUG
320 0 0 if $retry_cnt++ < 3
323 68 0 if (exists $main::config_parms{'debug'})
335 2 136 $no_block ? :
337 138 0 if (exists $main::config_parms{'debug'})
338 2 136 $main::config_parms{'debug'} eq 'X10' ? :
342 2 136 if $ControlX10::CM11::DEBUG and not $no_block
343 138 0 if ($data = $serial_port->input) { }
349 2 136 if $ControlX10::CM11::DEBUG
353 0 138 if ($data_d == 165 and not $no_power_fail_check)
371 0 0 if ($Yday > 255)
387 0 0 if ($ControlX10::CM11::DEBUG)
394 0 0 unless 1 == $serial_port->write($pc_ok)
405 0 0 if ($tries)
410 0 0 if $ControlX10::CM11::DEBUG and not $no_block
423 11 0 if (exists $main::config_parms{'debug'})
424 0 11 $main::config_parms{'debug'} eq 'X10' ? :
435 0 11 if $ControlX10::CM11::DEBUG