mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
00_ZWCUL.pm: add explorer frame debug decoding (?)
git-svn-id: https://svn.fhem.de/fhem/trunk@10141 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
89073c5b35
commit
b6ca0258ab
@ -287,8 +287,8 @@ ZWCUL_Parse($$$$)
|
||||
|
||||
my $me = $hash->{NAME};
|
||||
my ($H, $S, $F, $f, $L, $T, $P, $C) = ($1,$2,$3,$4,$5,$6,$7,$8);
|
||||
my ($hF, $hf, $rf, $hc, $hops, $ri) = (hex($F), hex($f), "", 0, "", "");
|
||||
if($hF&0x80) {
|
||||
my ($hF,$hf,$rf,$hc,$hops,$ri,$u1) = (hex($F),hex($f),"",0,"","","");
|
||||
if($hF&0x80) { # routing
|
||||
$hc = hex(substr($P,2,1));
|
||||
$ri = "R:".substr($P, 0, ($hc+2)*2)." ";
|
||||
$rf = substr($P, 0, 2);
|
||||
@ -297,16 +297,23 @@ ZWCUL_Parse($$$$)
|
||||
$P = substr($P,($hc+2)*2);
|
||||
}
|
||||
|
||||
if($hF&4) { # Explorer?
|
||||
$u1 = " E:".substr($P,0,16)." ";
|
||||
$P = substr($P,16);
|
||||
}
|
||||
|
||||
if(AttrVal($me, "verbose", 1) > 4) {
|
||||
Log3 $hash, 5, "$H S:$S F:$F f:$f L:$L T:$T ${ri}P:$P C:$C";
|
||||
Log3 $hash, 5, "$H S:$S F:$F f:$f L:$L T:$T ${ri}${u1}P:$P C:$C";
|
||||
Log3 $hash, 5, " F:".unpack("B*",chr($hF)).
|
||||
(($hF&0xf)==1 ? " singleCast" :
|
||||
($hF&0xf)==2 ? " multiCast" :
|
||||
($hF&0xf)==3 ? " ack" : " unknownHeaderType").
|
||||
(($hF&0x10)==0x10 ? " lowSpeed" : "").
|
||||
(($hF&0x20)==0x20 ? " lowPower" : "").
|
||||
(($hF&0x40)==0x40 ? " ackReq" : "").
|
||||
(($hF&0x80)==0x80 ? " routed, rf:$rf hopCount:$hc, hops:$hops" : "");
|
||||
(($hF & 3)==1 ? " singleCast" :
|
||||
($hF & 3)==2 ? " multiCast" :
|
||||
($hF & 3)==3 ? " ack" : " unknownHeaderType:".($hF&0x3)).
|
||||
(($hF & 4) ? " explorer" : "").
|
||||
(($hF & 0x10)==0x10 ? " lowSpeed" : "").
|
||||
(($hF & 0x10)==0x10 ? " lowSpeed" : "").
|
||||
(($hF & 0x20)==0x20 ? " lowPower" : "").
|
||||
(($hF & 0x40)==0x40 ? " ackReq" : "").
|
||||
(($hF & 0x80)==0x80 ? " routed, rf:$rf hopCount:$hc, hops:$hops" : "");
|
||||
my $hf=hex($f);
|
||||
Log3 $hash, 5, " f:".unpack("B*",chr(($hf))).
|
||||
" seqNum:".($hf&0xf).
|
||||
|
Loading…
Reference in New Issue
Block a user