98_structure.pm: add reverse modifier to set (Forum #67445)
git-svn-id: https://svn.fhem.de/fhem/trunk@13462 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -375,6 +375,10 @@ structure_Set($@)
|
|||||||
|
|
||||||
my @devList = split("[ \t][ \t]*", $hash->{DEF});
|
my @devList = split("[ \t][ \t]*", $hash->{DEF});
|
||||||
shift @devList;
|
shift @devList;
|
||||||
|
if(@list > 1 && @list[$#list] eq "reverse") {
|
||||||
|
pop @list;
|
||||||
|
@devList = reverse @devList;
|
||||||
|
}
|
||||||
foreach my $d (@devList) {
|
foreach my $d (@devList) {
|
||||||
next if(!$defs{$d});
|
next if(!$defs{$d});
|
||||||
if($defs{$d}{INSET}) {
|
if($defs{$d}{INSET}) {
|
||||||
@@ -553,9 +557,13 @@ structure_Attr($@)
|
|||||||
Every set command is propagated to the attached devices. Exception: if an
|
Every set command is propagated to the attached devices. Exception: if an
|
||||||
attached device has an attribute structexclude, and the attribute value
|
attached device has an attribute structexclude, and the attribute value
|
||||||
matches (as a regexp) the name of the current structure.<br>
|
matches (as a regexp) the name of the current structure.<br>
|
||||||
If the set is of the form <code>set <structure> [FILTER=<filter>] <type-specific></code>
|
If the set is of the form <code>set <structure>
|
||||||
then :FILTER=<filter> will be appended to the device name in the propagated set for
|
[FILTER=<filter>] <type-specific></code> then
|
||||||
the attached devices like this: <code>set <devN>:FILTER=<filter> <type-specific></code>
|
:FILTER=<filter> will be appended to the device name in the
|
||||||
|
propagated set for the attached devices like this: <code>set
|
||||||
|
<devN>:FILTER=<filter> <type-specific></code><br>
|
||||||
|
If the last set parameter is "reverse", then execute the set commands in
|
||||||
|
the reverse order.
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@@ -719,10 +727,14 @@ structure_Attr($@)
|
|||||||
<ul>
|
<ul>
|
||||||
Jedes set Kommando wird an alle Devices dieser Struktur weitergegeben.<br>
|
Jedes set Kommando wird an alle Devices dieser Struktur weitergegeben.<br>
|
||||||
Aussnahme: das Attribut structexclude ist in einem Device definiert und
|
Aussnahme: das Attribut structexclude ist in einem Device definiert und
|
||||||
dessen Attributwert matched als Regexp zum Namen der aktuellen Struktur.<br>
|
dessen Attributwert matched als Regexp zum Namen der aktuellen
|
||||||
Wenn das set Kommando diese Form hat <code>set <structure> [FILTER=<filter>] <type-specific></code>
|
Struktur.<br> Wenn das set Kommando diese Form hat <code>set
|
||||||
wird :FILTER=<filter> bei der Weitergebe der set an jeden Devicenamen wie folgt angehängt:
|
<structure> [FILTER=<filter>] <type-specific></code> wird
|
||||||
<code>set <devN>:FILTER=<filter> <type-specific></code>
|
:FILTER=<filter> bei der Weitergebe der set an jeden Devicenamen wie
|
||||||
|
folgt angehängt: <code>set <devN>:FILTER=<filter>
|
||||||
|
<type-specific></code><br>
|
||||||
|
Falls der letzte Parameter reverse ist, dann werden die Befehle in der
|
||||||
|
umgekehrten Reihenfolge ausgeführt.
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
<a name="structureget"></a>
|
<a name="structureget"></a>
|
||||||
|
|||||||
Reference in New Issue
Block a user