Fixed Issues with PGM2 (Function-Names)
git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1180 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#################################################################################
|
#################################################################################
|
||||||
# Copyright notice
|
# Copyright notice
|
||||||
#
|
#
|
||||||
# (c) 2008-2009
|
# (c) 2008-2012
|
||||||
# Copyright: Dr. Olaf Droegehorn
|
# Copyright: Dr. Olaf Droegehorn
|
||||||
# o.droegehorn@dhs-computertechnik.de
|
# o.droegehorn@dhs-computertechnik.de
|
||||||
# www.dhs-computertechnik.de
|
# www.dhs-computertechnik.de
|
||||||
@@ -52,8 +52,8 @@ sub FHEMRENDERER_setAttr($$);
|
|||||||
sub FHEMRENDERER_parseXmlList($);
|
sub FHEMRENDERER_parseXmlList($);
|
||||||
sub FHEMRENDERER_render($);
|
sub FHEMRENDERER_render($);
|
||||||
sub FHEMRENDERER_fatal($);
|
sub FHEMRENDERER_fatal($);
|
||||||
sub pF($@);
|
sub FHEMRENDERER_pF($@);
|
||||||
sub pO(@);
|
sub FHEMRENDERER_pO(@);
|
||||||
#sub FHEMRENDERER_zoomLink($$$$);
|
#sub FHEMRENDERER_zoomLink($$$$);
|
||||||
sub FHEMRENDERER_calcWeblink($$);
|
sub FHEMRENDERER_calcWeblink($$);
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ FHEMRENDERER_Get($@)
|
|||||||
if($t eq "fileplot") {
|
if($t eq "fileplot") {
|
||||||
my @va = split(":", $v, 3);
|
my @va = split(":", $v, 3);
|
||||||
if(@va != 3 || !$__devs{$va[0]}{INT}{currentlogfile}) {
|
if(@va != 3 || !$__devs{$va[0]}{INT}{currentlogfile}) {
|
||||||
pO "<td>Broken definition: $v</a></td>";
|
FHEMRENDERER_pO "<td>Broken definition: $v</a></td>";
|
||||||
} else {
|
} else {
|
||||||
if($va[2] eq "CURRENT") {
|
if($va[2] eq "CURRENT") {
|
||||||
$__devs{$va[0]}{INT}{currentlogfile}{VAL} =~ m,([^/]*)$,;
|
$__devs{$va[0]}{INT}{currentlogfile}{VAL} =~ m,([^/]*)$,;
|
||||||
@@ -295,7 +295,7 @@ FHEMRENDERER_parseXmlList($)
|
|||||||
%__types = ();
|
%__types = ();
|
||||||
$__title = "";
|
$__title = "";
|
||||||
|
|
||||||
foreach my $l (split("\n", fC("xmllist"))) {
|
foreach my $l (split("\n", FHEMRENDERER_fC("xmllist"))) {
|
||||||
|
|
||||||
####### Device
|
####### Device
|
||||||
if($l =~ m/^\t\t<(.*) name="(.*)" state="(.*)" sets="(.*)" attrs="(.*)">/){
|
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 ($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)));
|
join(" ", @filelog)));
|
||||||
my $i = 0;
|
my $i = 0;
|
||||||
$plot =~ s/\".*?using 1:[^ ]+ /"\"$path[$i++]\" using 1:2 "/gse;
|
$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...
|
# $f = 0 if(!$f); # From the beginning of time...
|
||||||
# $t = 9 if(!$t); # till the end
|
# $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);
|
# SVG_render($file, $__plotsize, $f, $t, \@data, $internal_data, $plot);
|
||||||
#
|
#
|
||||||
# open (FH, ">$FHEMRENDERER_tmpfile$wl.svg");
|
# open (FH, ">$FHEMRENDERER_tmpfile$wl.svg");
|
||||||
@@ -482,13 +482,13 @@ sub
|
|||||||
FHEMRENDERER_fatal($)
|
FHEMRENDERER_fatal($)
|
||||||
{
|
{
|
||||||
my ($msg) = @_;
|
my ($msg) = @_;
|
||||||
pO "<html><body>$msg</body></html>";
|
FHEMRENDERER_pO "<html><body>$msg</body></html>";
|
||||||
}
|
}
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# print formatted
|
# print formatted
|
||||||
sub
|
sub
|
||||||
pF($@)
|
FHEMRENDERER_pF($@)
|
||||||
{
|
{
|
||||||
my $fmt = shift;
|
my $fmt = shift;
|
||||||
$__RET .= sprintf $fmt, @_;
|
$__RET .= sprintf $fmt, @_;
|
||||||
@@ -497,7 +497,7 @@ pF($@)
|
|||||||
##################
|
##################
|
||||||
# print output
|
# print output
|
||||||
sub
|
sub
|
||||||
pO(@)
|
FHEMRENDERER_pO(@)
|
||||||
{
|
{
|
||||||
$__RET .= shift;
|
$__RET .= shift;
|
||||||
}
|
}
|
||||||
@@ -505,7 +505,7 @@ pO(@)
|
|||||||
##################
|
##################
|
||||||
# fhem command
|
# fhem command
|
||||||
sub
|
sub
|
||||||
fC($)
|
FHEMRENDERER_fC($)
|
||||||
{
|
{
|
||||||
my ($cmd) = @_;
|
my ($cmd) = @_;
|
||||||
#Log 0, "Calling $cmd";
|
#Log 0, "Calling $cmd";
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Description of the 02_FHEMRENDERER Module:
|
|||||||
#################################################################################
|
#################################################################################
|
||||||
# Copyright notice
|
# Copyright notice
|
||||||
#
|
#
|
||||||
# (c) 2008-2009
|
# (c) 2008-2011
|
||||||
# Copyright: Dr. Olaf Droegehorn
|
# Copyright: Dr. Olaf Droegehorn
|
||||||
# All rights reserved
|
# All rights reserved
|
||||||
#
|
#
|
||||||
@@ -33,6 +33,7 @@ Versions:
|
|||||||
|
|
||||||
V1.0: Initial Version
|
V1.0: Initial Version
|
||||||
V1.1: Bugfix: Enabled multiple RENERER Instances
|
V1.1: Bugfix: Enabled multiple RENERER Instances
|
||||||
|
V1.2: Bugfix: Corrected Function-Names to avoid collision with PGM2
|
||||||
|
|
||||||
General Description:
|
General Description:
|
||||||
|
|
||||||
@@ -47,15 +48,12 @@ The FHEMRENDERER uses attributes to control the behaviour:
|
|||||||
room Unsorted
|
room Unsorted
|
||||||
status off
|
status off
|
||||||
tmpfile /tmp/
|
tmpfile /tmp/
|
||||||
multiprocess off
|
|
||||||
|
|
||||||
These attributes have the following meaning:
|
These attributes have the following meaning:
|
||||||
plotmode, plotsize: Control gnuplot and the desired output
|
plotmode, plotsize: Control gnuplot and the desired output
|
||||||
refresh: type HH:MM:SS, is the time-interval in which the re-rendering is done
|
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
|
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
|
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 !
|
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.
|
See WebLink for more details on how to define.
|
||||||
@@ -91,7 +89,6 @@ DEFINE
|
|||||||
room Unsorted
|
room Unsorted
|
||||||
status off
|
status off
|
||||||
tmpfile /tmp/
|
tmpfile /tmp/
|
||||||
multiprocess off
|
|
||||||
|
|
||||||
|
|
||||||
NOTE: The Logfile will report (with LogLevel 2) that the FHEMRENDERER has been defined.
|
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)
|
refresh Timer-Interval for rerendering (HH:MM:SS)
|
||||||
status Status of the Timer (off/on)
|
status Status of the Timer (off/on)
|
||||||
tmpfile Path and prefix of for the rendered graphics (e.g. /tmp/)
|
tmpfile Path and prefix of for the rendered graphics (e.g. /tmp/)
|
||||||
multiprocess on / off
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user