2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

Fixed Issues with PGM2 (Function-Names)

git-svn-id: https://svn.fhem.de/fhem/trunk@1180 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
odroegehorn 2012-01-07 12:07:47 +00:00
parent 9a410b2513
commit d5b289bd96
2 changed files with 196 additions and 200 deletions

View File

@ -1,7 +1,7 @@
#################################################################################
# Copyright notice
#
# (c) 2008-2009
# (c) 2008-2012
# Copyright: Dr. Olaf Droegehorn
# o.droegehorn@dhs-computertechnik.de
# www.dhs-computertechnik.de
@ -52,8 +52,8 @@ sub FHEMRENDERER_setAttr($$);
sub FHEMRENDERER_parseXmlList($);
sub FHEMRENDERER_render($);
sub FHEMRENDERER_fatal($);
sub pF($@);
sub pO(@);
sub FHEMRENDERER_pF($@);
sub FHEMRENDERER_pO(@);
#sub FHEMRENDERER_zoomLink($$$$);
sub FHEMRENDERER_calcWeblink($$);
@ -221,7 +221,7 @@ FHEMRENDERER_Get($@)
if($t eq "fileplot") {
my @va = split(":", $v, 3);
if(@va != 3 || !$__devs{$va[0]}{INT}{currentlogfile}) {
pO "<td>Broken definition: $v</a></td>";
FHEMRENDERER_pO "<td>Broken definition: $v</a></td>";
} else {
if($va[2] eq "CURRENT") {
$__devs{$va[0]}{INT}{currentlogfile}{VAL} =~ m,([^/]*)$,;
@ -295,7 +295,7 @@ FHEMRENDERER_parseXmlList($)
%__types = ();
$__title = "";
foreach my $l (split("\n", fC("xmllist"))) {
foreach my $l (split("\n", FHEMRENDERER_fC("xmllist"))) {
####### Device
if($l =~ m/^\t\t<(.*) name="(.*)" state="(.*)" sets="(.*)" attrs="(.*)">/){
@ -428,7 +428,7 @@ FHEMRENDERER_render($)
my ($f,$t)=($__devs{$d}{from}, $__devs{$d}{to});
my @path = split(" ", fC("get $d $file $FHEMRENDERER_tmpfile$wl $f $t " .
my @path = split(" ", FHEMRENDERER_fC("get $d $file $FHEMRENDERER_tmpfile$wl $f $t " .
join(" ", @filelog)));
my $i = 0;
$plot =~ s/\".*?using 1:[^ ]+ /"\"$path[$i++]\" using 1:2 "/gse;
@ -466,7 +466,7 @@ FHEMRENDERER_render($)
# $f = 0 if(!$f); # From the beginning of time...
# $t = 9 if(!$t); # till the end
#
# my $ret = fC("get $d $file INT $f $t " . join(" ", @filelog));
# my $ret = FHEMRENDERER_fC("get $d $file INT $f $t " . join(" ", @filelog));
# SVG_render($file, $__plotsize, $f, $t, \@data, $internal_data, $plot);
#
# open (FH, ">$FHEMRENDERER_tmpfile$wl.svg");
@ -482,13 +482,13 @@ sub
FHEMRENDERER_fatal($)
{
my ($msg) = @_;
pO "<html><body>$msg</body></html>";
FHEMRENDERER_pO "<html><body>$msg</body></html>";
}
##################
# print formatted
sub
pF($@)
FHEMRENDERER_pF($@)
{
my $fmt = shift;
$__RET .= sprintf $fmt, @_;
@ -497,7 +497,7 @@ pF($@)
##################
# print output
sub
pO(@)
FHEMRENDERER_pO(@)
{
$__RET .= shift;
}
@ -505,7 +505,7 @@ pO(@)
##################
# fhem command
sub
fC($)
FHEMRENDERER_fC($)
{
my ($cmd) = @_;
#Log 0, "Calling $cmd";

View File

@ -7,7 +7,7 @@ Description of the 02_FHEMRENDERER Module:
#################################################################################
# Copyright notice
#
# (c) 2008-2009
# (c) 2008-2011
# Copyright: Dr. Olaf Droegehorn
# All rights reserved
#
@ -33,6 +33,7 @@ Versions:
V1.0: Initial Version
V1.1: Bugfix: Enabled multiple RENERER Instances
V1.2: Bugfix: Corrected Function-Names to avoid collision with PGM2
General Description:
@ -47,15 +48,12 @@ The FHEMRENDERER uses attributes to control the behaviour:
room Unsorted
status off
tmpfile /tmp/
multiprocess off
These attributes have the following meaning:
plotmode, plotsize: Control gnuplot and the desired output
refresh: type HH:MM:SS, is the time-interval in which the re-rendering is done
status: Tells if the timer-based re-rendering is on/off
tmpfile: Is the path (and prefix, if given) of the graphic-files, that will be rendered
multiprocess: You can set "on" or "off". If multiprocess is "on" the time-scheduled renderings will be done in a
mutli-process manner, and FHEM will not be blocked by the rendering process.
NOTE: The timer-based rendering renders ONLY those fileplots, for which you have defined a WebLink !
See WebLink for more details on how to define.
@ -91,7 +89,6 @@ DEFINE
room Unsorted
status off
tmpfile /tmp/
multiprocess off
NOTE: The Logfile will report (with LogLevel 2) that the FHEMRENDERER has been defined.
@ -173,7 +170,6 @@ ATTR
refresh Timer-Interval for rerendering (HH:MM:SS)
status Status of the Timer (off/on)
tmpfile Path and prefix of for the rendered graphics (e.g. /tmp/)
multiprocess on / off