]> jspc29.x-matter.uni-frankfurt.de Git - mvdsensorcontrol.git/commitdiff
adcmon.pl now serves as a crude demonstration for plotting system
authorwww@jspc55 <www@jspc55>
Thu, 23 Jan 2014 16:51:34 +0000 (17:51 +0100)
committerwww@jspc55 <www@jspc55>
Thu, 23 Jan 2014 16:51:34 +0000 (17:51 +0100)
tools/adcmon.pl

index 0c9f7fa672a8f4aeee2bfdf1cee7dc759b01efba..ccec34425592ce1738404c2addd0059a07f8b8dd 100755 (executable)
@@ -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 "<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'}
+  ]
+  );
+  
+  
+}
+