16_STACKABLE_CC.pm: fix TCM over SCC Dispatch (Forum #60028)

git-svn-id: https://svn.fhem.de/fhem/trunk@12535 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-11-09 18:49:54 +00:00
parent b40e12a8ef
commit d34f28f8f1

View File

@ -128,7 +128,21 @@ STACKABLE_CC_Parse($$)
return "" if(IsIgnored($name));
my $sh = $defs{$name};
if($sh && $sh->{TCM}) {
my $th = $sh->{TCMHash};
if($th) {
delete $th->{IOReadFn};
$th->{IODevRxBuffer} = pack("H*", $msg);
CallFn($th->{NAME}, "ReadFn", $th);
$th->{IOReadFn} = "STACKABLE_IOReadFn";
} else {
Log 1, "$name: no TCM device assigned";
}
} else {
CUL_Parse($defs{$name}, $iohash, $name, $msg);
}
return "";
}
@ -161,6 +175,7 @@ STACKABLE_IOOpenFn($)
{
my ($hash) = @_;
$hash->{FD} = $hash->{IODev}{IODev}{FD}; # Lets fool the TCM
$hash->{IODev}{TCMHash} = $hash;
$hash->{IOReadFn} = "STACKABLE_IOReadFn";
return 1;
}