Special fhtsoftbuffer handling for CUL

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@735 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2010-10-24 18:36:54 +00:00
parent 5425fc6fc3
commit d72ca7703e

View File

@@ -565,7 +565,6 @@ doSoftBuffer($)
$count++; $count++;
my $h = $io->{SOFTBUFFER}{$key}; my $h = $io->{SOFTBUFFER}{$key};
my $name = $h->{HASH}->{NAME}; my $name = $h->{HASH}->{NAME};
if($h->{NSENT}) { if($h->{NSENT}) {
next if($now-$h->{SENDTIME} < $retryafter); next if($now-$h->{SENDTIME} < $retryafter);
my $retry = $attr{$name}{retrycount}; my $retry = $attr{$name}{retrycount};
@@ -575,6 +574,21 @@ doSoftBuffer($)
delete($io->{SOFTBUFFER}{$key}); delete($io->{SOFTBUFFER}{$key});
next; next;
} }
}
# Check if it is still in th CUL buffer.
if($io->{TYPE} eq "CUL") {
my $cul = CallFn($io->{NAME}, "GetFn", $io, (" ", "raw", "T02"));
my $arg = uc($h->{ARG});
$arg =~ s/^020183//;
$arg =~ s/(....)/,$1/g;
$arg =~ s/,(....),/$1:/;
$arg = uc($arg);
if($cul =~ m/$arg/) {
Log GetLogLevel($name,3),
"$name set $h->{CMD}: still in the culfw buffer, wont send";
next;
}
} }
$fhzbuflen = getFhtBuffer($io) if($fhzbuflen == -999); $fhzbuflen = getFhtBuffer($io) if($fhzbuflen == -999);
@@ -587,7 +601,6 @@ doSoftBuffer($)
$fhzbuflen -= $arglen; $fhzbuflen -= $arglen;
$h->{SENDTIME} = $now; $h->{SENDTIME} = $now;
$h->{NSENT}++; $h->{NSENT}++;
} }
if($count && !$io->{SOFTBUFFERTIMER}) { if($count && !$io->{SOFTBUFFERTIMER}) {