From: www@jspc55 Date: Thu, 23 Jan 2014 16:51:34 +0000 (+0100) Subject: adcmon.pl now serves as a crude demonstration for plotting system X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=d863cd95ffc5d1155b6b5a1049c72e4d50682f05;p=mvdsensorcontrol.git adcmon.pl now serves as a crude demonstration for plotting system --- diff --git a/tools/adcmon.pl b/tools/adcmon.pl index 0c9f7fa..ccec344 100755 --- a/tools/adcmon.pl +++ b/tools/adcmon.pl @@ -5,12 +5,12 @@ my $me = "adcmon.pl"; use strict; use warnings; -# use XML::LibXML; +use XML::LibXML; use POSIX; -# use CGI ':standard'; -# use CGI::Carp qw(fatalsToBrowser); -# use HTML::Entities; -# use Widgets; +use CGI ':standard'; +use CGI::Carp qw(fatalsToBrowser); +use HTML::Entities; +use Widgets; use Data::Dumper; use PlotScheduler; use AccessXmlDb; @@ -27,24 +27,54 @@ use FindBin; use lib "$FindBin::Bin/.."; use Environment; +$ENV{'DAQOPSERVER'} = "jspc55:88"; +init_html(); my $ps = PlotScheduler->new( shm => "/dev/shm/DQ55" ); # $ps->addRequest( FPGA => "0xd882", CB => "0", chip => "1", channel => "TEMP"); # $ps->storeRequests(); $ps->startPlotService() unless $ps->plotServiceRunning(); -while(1){ +# while(1){ $ps->retrieveRequests(); $ps->addRequest( FPGA => "0xd882", CB => "0", chip => "0", channel => "CurrentDigital"); + $ps->addRequest( FPGA => "0xd882", CB => "0", chip => "0", channel => "CurrentAnalog"); + $ps->addRequest( FPGA => "0xd882", CB => "0", chip => "0", channel => "VoltageDigital"); + $ps->addRequest( FPGA => "0xd882", CB => "0", chip => "0", channel => "VoltageAnalog"); $ps->listRequests(); $ps->storeRequests(); - sleep 1; +# sleep 1; +# } + +for my $plot ( keys $ps->{requests}) { + print "
"; + print img {src => "../shm/DQ55_plots/".$plot.".png"}; } +sub init_html{ + + print header; + print start_html( + -title=>'ADC Monitor', + -style=>[{'src'=>'../layout/styles.css'}, + {'src'=>'../layout/jtageditor_blue.css'}, + {'src'=>'../layout/testgui.css'} + ], + -script=>[ + { -type => 'text/javascript', -src => './testgui.js'}, + { -type => 'text/javascript', -src => './hideAndShow.js'}, + { -type => 'text/javascript', -src => './getdata.js'}, + { -type => 'text/javascript', -src => './xmlOperations.js'} + ] + ); + + +} +