|
From: <sic...@us...> - 2012-08-27 19:18:39
|
Revision: 986
http://openautomation.svn.sourceforge.net/openautomation/?rev=986&view=rev
Author: sicariusx
Date: 2012-08-27 19:18:33 +0000 (Mon, 27 Aug 2012)
Log Message:
-----------
transmit_changes_only als Parameter erg?\195?\164nzt.
Modified Paths:
--------------
wiregate/plugin/generic/Logikprozessor.pl
Modified: wiregate/plugin/generic/Logikprozessor.pl
===================================================================
--- wiregate/plugin/generic/Logikprozessor.pl 2012-08-25 10:21:27 UTC (rev 985)
+++ wiregate/plugin/generic/Logikprozessor.pl 2012-08-27 19:18:33 UTC (rev 986)
@@ -257,6 +257,7 @@
}
# Aufruf der Logik-Engine
+ my $prevResult=$plugin_info{$plugname.'_'.$t.'_result'};
my $result=execute_logic($t, $receive, $ga, $in);
# war Wiregate der Sender des Telegramms?
@@ -277,6 +278,11 @@
next;
}
+ if($logic{$t}{transmit_changes_only} && ($result eq $prevResult)) {
+ $retval.="$ga:$in -> \$logic{$t}{receive}(Logik) -> $transmit:$result unver\xE4ndert -> nichts zu senden " if $debug;
+ next;
+ }
+
# Falls delay spezifiziert, wird ein "Wecker" gestellt, um in einem spaeteren Aufruf den Wert zu senden
if($logic{$t}{delay})
{
@@ -828,15 +834,17 @@
%prowlParametersSource = ( event => $logic{$t}{prowl} );
}
- sendProwl((
- debug => $debug,
- priority => $prowlParametersSource{priority} || $settings{prowl}{priority},
- event => $prowlParametersSource{event} || $settings{prowl}{event},
- description => $prowlParametersSource{description} || $settings{prowl}{description},
- application => $prowlParametersSource{application} || $settings{prowl}{application},
- url => $prowlParametersSource{url} || $settings{prowl}{url},
- apikey => $prowlParametersSource{url} || $settings{prowl}{apikey}
- ));
+ if (defined %prowlParametersSource) {
+ sendProwl((
+ debug => $debug,
+ priority => $prowlParametersSource{priority} || $settings{prowl}{priority},
+ event => $prowlParametersSource{event} || $settings{prowl}{event},
+ description => $prowlParametersSource{description} || $settings{prowl}{description},
+ application => $prowlParametersSource{application} || $settings{prowl}{application},
+ url => $prowlParametersSource{url} || $settings{prowl}{url},
+ apikey => $prowlParametersSource{url} || $settings{prowl}{apikey}
+ ));
+ }
}
return $result;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|