]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
add xml page for spill monitor control
authorhadaq <hadaq@hades33.gsi.de>
Thu, 28 Dec 2023 10:25:41 +0000 (11:25 +0100)
committerhadaq <hadaq@hades33.gsi.de>
Thu, 28 Dec 2023 10:25:41 +0000 (11:25 +0100)
web/htdocs/tools/spillmonitor.pl [new file with mode: 0755]

diff --git a/web/htdocs/tools/spillmonitor.pl b/web/htdocs/tools/spillmonitor.pl
new file mode 100755 (executable)
index 0000000..1b08af7
--- /dev/null
@@ -0,0 +1,43 @@
+#!/usr/bin/perl
+if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
+  print "HTTP/1.0 200 OK\n";
+  print "Content-type: text/html\r\n\r\n";
+  }
+else {
+  use lib '..';
+  use if (!($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i)), apacheEnv;
+  print "Content-type: text/html\n\n";
+  }
+
+use CGI ':standard';
+use XML::LibXML;
+use POSIX;
+use CGI::Carp qw(fatalsToBrowser);
+
+use lib qw|../commands htdocs/commands|;
+use xmlpage;
+
+my $page;
+
+$page->{title} = "Spillmonitor";
+$page->{link}  = "../";
+
+my @setup;
+my $i = 0;
+
+$setup[$i]->{name}    = "Register";
+$setup[$i]->{cmd}     = "Spillmonitor-0xffff-SpillMonRegisters";
+$setup[$i]->{period}  = 1000;
+$setup[$i]->{address} = 1;
+
+$i++;
+$setup[$i]->{name}    = "Counter";
+$setup[$i]->{cmd}     = "Spillmonitor-0xffff-SpillMonCounts";
+$setup[$i]->{period}  = 1000;
+$setup[$i]->{address} = 1;
+
+xmlpage::initPage(\@setup,$page);
+
+1;
+
+