2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 01:09:47 +00:00

vccu IO performance improvement, BM trigger/state verify removed

git-svn-id: https://svn.fhem.de/fhem/trunk@6194 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2014-07-04 06:30:01 +00:00
parent 6d4f359c7e
commit 5e2b66fb32

View File

@ -452,6 +452,8 @@ sub CUL_HM_Define($$) {##############################
$hash->{helper}{q}{qReqStat} = ""; # queue statusRequest for this device $hash->{helper}{q}{qReqStat} = ""; # queue statusRequest for this device
$hash->{helper}{mRssi}{mNo} = ""; $hash->{helper}{mRssi}{mNo} = "";
CUL_HM_prtInit ($hash); CUL_HM_prtInit ($hash);
$hash->{helper}{io}{vccu} = "";
$hash->{helper}{io}{prefIO} = "";
CUL_HM_assignIO($hash)if (!$init_done && $HMid ne "000000"); CUL_HM_assignIO($hash)if (!$init_done && $HMid ne "000000");
} }
$modules{CUL_HM}{defptr}{$HMid} = $hash; $modules{CUL_HM}{defptr}{$HMid} = $hash;
@ -688,12 +690,23 @@ sub CUL_HM_Attr(@) {#################################
} }
} }
elsif($attrName eq "IOList"){ elsif($attrName eq "IOList"){
if ($cmd eq "set"){
return "use $attrName only for ccu device" return "use $attrName only for ccu device"
if (!$hash->{helper}{role}{dev} if (!$hash->{helper}{role}{dev}
|| AttrVal($name,"model","CCU-FHEM") !~ "CCU-FHEM"); || AttrVal($name,"model","CCU-FHEM") !~ "CCU-FHEM");
delete $attr{$name}{$attrName};
CUL_HM_UpdtCentral($name); CUL_HM_UpdtCentral($name);
} }
elsif($attrName eq "IOgrp" ){
if ($cmd eq "set"){
return "use $attrName only for devices" if (!$hash->{helper}{role}{dev});
my ($ioCCU,$prefIO) = split(":",$attrVal,2);
$hash->{helper}{io}{vccu} = $ioCCU;
$hash->{helper}{io}{prefIO} = $prefIO;
}
else{
$hash->{helper}{io}{vccu} = "";
$hash->{helper}{io}{prefIO} = "";
}
} }
elsif($attrName eq "autoReadReg"){ elsif($attrName eq "autoReadReg"){
if ($cmd eq "set"){ if ($cmd eq "set"){
@ -2458,7 +2471,7 @@ sub CUL_HM_parseCommon(@){#####################################################
push @evtEt,[$defs{$pName},1,"trig_$cName:$level"]; push @evtEt,[$defs{$pName},1,"trig_$cName:$level"];
push @evtEt,[$defs{$pName},1,"trigLast:$cName ".(($level ne "-")?":$level":"")]; push @evtEt,[$defs{$pName},1,"trigLast:$cName ".(($level ne "-")?":$level":"")];
CUL_HM_stateUpdatDly($pName,10); CUL_HM_stateUpdatDly($pName,10) if($mTp eq "40");
} }
return ""; return "";
} }
@ -6497,6 +6510,9 @@ sub CUL_HM_UpdtCentral($){
} }
} }
} }
my @ioList = split(",",AttrVal($name,"IOList",""));
$defs{$name}{helper}{io}{ioList} = \@ioList;
CUL_HM_UpdtCentralState($name); CUL_HM_UpdtCentralState($name);
} }
sub CUL_HM_UpdtCentralState($){ sub CUL_HM_UpdtCentralState($){
@ -6532,9 +6548,9 @@ sub CUL_HM_assignIO($){ #check and assign IO
return; return;
} }
my ($ioCCU,$prefIO) = split(":",AttrVal($hash->{NAME},"IOgrp","_"),2); my ($ioCCU,$prefIO) = ($hash->{helper}{io}{vccu},$hash->{helper}{io}{prefIO});
if (defined $defs{$ioCCU} && AttrVal($ioCCU,"model","") eq "CCU-FHEM"){ if (defined $defs{$ioCCU} && AttrVal($ioCCU,"model","") eq "CCU-FHEM"){
my @ioccu =split(",", AttrVal($ioCCU,"IOList","")); my @ioccu = @{$defs{$ioCCU}{helper}{io}{ioList}};
my @ios = ((sort {$hash->{helper}{mRssi}{io}{$b} <=> my @ios = ((sort {$hash->{helper}{mRssi}{io}{$b} <=>
$hash->{helper}{mRssi}{io}{$a} } $hash->{helper}{mRssi}{io}{$a} }
grep {defined $hash->{helper}{mRssi}{io}{$_}} @ioccu) grep {defined $hash->{helper}{mRssi}{io}{$_}} @ioccu)