]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
added putbitrange.pl command on webpage to access the loadbit function of trbcmd...
authorJan Michel <j.michel@gsi.de>
Wed, 29 Jan 2014 16:28:55 +0000 (17:28 +0100)
committerJan Michel <j.michel@gsi.de>
Wed, 29 Jan 2014 16:31:05 +0000 (17:31 +0100)
web/htdocs/commands/HPlot.pm
web/htdocs/commands/get.pl
web/htdocs/commands/getmultreg.pl
web/htdocs/commands/getpadiwa.pl
web/htdocs/commands/nettrace.pl
web/htdocs/commands/put.pl
web/htdocs/commands/putbit.pl
web/htdocs/commands/putbitrange.pl [new file with mode: 0755]
web/htdocs/commands/spiexec.pl

index 0b4798efcb6f6c70e7f627e10834126bf2d7105a..bc3a2ef42ef3b8bbad204edf36b363279a52bd49 100644 (file)
@@ -1,6 +1,6 @@
 package HPlot;
 use POSIX qw/floor ceil strftime/;
-use Data::Dumper;
+use Data::Dumper;
 use warnings;
 use strict;
 use FileHandle;
index b01ebe002cb823f24e2572b718e63e9f78855e92..79aa13f7fd49f780d0000fb81e56e3c7c169dd15 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 use CGI::Carp qw(warningsToBrowser fatalsToBrowser); 
 use HADES::TrbNet;
-use Data::Dumper;
+use Data::Dumper;
 if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
   print "HTTP/1.0 200 OK\n";
   print "Content-type: text/html\r\n\r\n";
index eb663713ea747d4cbec3162f0caffc682240f236..bbca99516eb1165b1cfe96cf7ed69cc87eac2b55 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 use HADES::TrbNet;
-use Data::Dumper;
+use Data::Dumper;
 if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
   print "HTTP/1.0 200 OK\n";
   print "Content-type: text/html\r\n\r\n";
index 675dbe0843b6d98327ae1fc262e23bcba09c9ab6..6ebbcdc228162718b4bf638108c4a6a599f6cfeb 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 use HADES::TrbNet;
-use Data::Dumper;
+use Data::Dumper;
 if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
   print "HTTP/1.0 200 OK\n";
   print "Content-type: text/html\r\n\r\n";
index c508b375ef1a4408f07ebae9eb9665949cec05c2..9674615eacd29d5835696fbb43c9a04ec2cd4abf 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 use Date::Format;
 use HADES::TrbNet;
-use Data::Dumper;
+use Data::Dumper;
 if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
   print "HTTP/1.0 200 OK\n";
   print "Content-type: text/html\r\n\r\n";
index 091cd7c08dd73255cea57ec5202793af713c7321..9a9dfabd811d3a42acc8a6fa766a986d1d8d04de 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 use HADES::TrbNet;
-use Data::Dumper;
 if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
   print "HTTP/1.0 200 OK\n";
   print "Content-type: text/html\r\n\r\n";
index 20422757a428a2538a92ee3160bf8942eb62b322..1da3013e096bb61f9bcf429b706947a0a0f71e54 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 use HADES::TrbNet;
-use Data::Dumper;
 if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
   print "HTTP/1.0 200 OK\n";
   print "Content-type: text/html\r\n\r\n";
diff --git a/web/htdocs/commands/putbitrange.pl b/web/htdocs/commands/putbitrange.pl
new file mode 100755 (executable)
index 0000000..22ad557
--- /dev/null
@@ -0,0 +1,33 @@
+#!/usr/bin/perl
+use HADES::TrbNet;
+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";
+  }
+
+
+ if (!defined &trb_init_ports()) {
+   die("can not connect to trbnet-daemon on the $ENV{'DAQOPSERVER'}");
+ }
+
+my ($board,$addr,$mask,$value) = split('-',$ENV{'QUERY_STRING'}); 
+
+if(!defined $board || !defined $addr || !defined $mask || !defined $value) {exit -1;}
+$board = hex($board);
+$addr = hex($addr);
+$mask = hex($mask);
+$value = hex($value);
+
+print "$board $addr $mask $value\n";
+
+
+trb_register_loadbit($board,$addr,$mask,$value);
+
+
+  
+exit 1;
index 02560ce21197c3ff6a786c53aea89f2c3e40ca03..915fa4c7bd0fabd216f084232e5a1c78cc699e9b 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 use HADES::TrbNet;
-use Data::Dumper;
+
 if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
   print "HTTP/1.0 200 OK\n";
   print "Content-type: text/html\r\n\r\n";
@@ -12,10 +12,6 @@ else {
   }
 
 
-
-use HADES::TrbNet;
-use Data::Dumper;
-
  if (!defined &trb_init_ports()) {
    die("can not connect to trbnet-daemon on the $ENV{'DAQOPSERVER'}");
  }