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;
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 "<br>";
+ 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'}
+ ]
+ );
+
+
+}
+