Skip to content
Snippets Groups Projects
Commit b3ba1e7c authored by Lucio Zambon's avatar Lucio Zambon
Browse files

Add new file

parent ef56b5ad
No related branches found
No related tags found
No related merge requests found
door.php 0 → 100644
<?php
$debug = false;
if (!isset($_REQUEST['debug'])) header('Content-type: application/json; charset=utf-8');
$machine = empty($_REQUEST['machine'])? 'elettra': $_REQUEST['machine'];
if (isset($_REQUEST['src']) && strpos($machine, 'elettra')!==false) die('{"sr":["A2","A3","E4","E5","T1", "I2D", "DR_BRG"],'.
'"booster":["","","","A1","DR_A4.1","DR_A5.1","DR_A6.1","DR_A6.2","A0","DR_CS4.2","DR_CS4.1","DR_A10.1","DR_A8.1","DR_A12.1","DR_R3.1","DR_R3.2","DR_BSA3.1","DR_BSA4.1","DR_BSA1.1","DR_R"]}');
$src = "srv-tango-sre-01.ecs.elettra.trieste.it:20000/sr/accessi/pss";
$bsrc = "srv-tango-sre-01.ecs.elettra.trieste.it:20000/booster/accessi/plc_accessi";
$d = file_get_contents("http://puma-01.elettra.eu/rchan.php?json&valueOnly&src=$src/Doors_all");
$old = file_get_contents("http://puma-01.elettra.eu/rchan.php?json&valueOnly&src=$src/old_Doors_all");
$bd = file_get_contents("http://puma-01.elettra.eu/rchan.php?json&valueOnly&src=$bsrc/Doors_all");
$bold = file_get_contents("http://puma-01.elettra.eu/rchan.php?json&valueOnly&src=$bsrc/old_Doors_all");
if ($debug) {$de = json_decode($d, true);$de[$debug] = 0;$d = json_encode($de);}
die('{"sr":{"door":'.$d.',"hold":'.$old.'},"booster":{"door":'.$bd.',"hold":'.$bold.'}}');
/*
booster
08 - A0
03 - A1
19 - DR_R
yard
18 - DR_BSA1.1
16 - DR_BSA3.1
17 - DR_BSA4.1
roof
15 - DR_R3.2
left
09 - DR_CS4.2
04 - DR_A4.1
05 - DR_A5.1
07 - DR_A6.2
06 - DR_A6.1
12 - DR_A8.1
11 - DR_A10.1
right
10 - DR_CS4.1
13 - DR_A12.1
15 - DR_R3.2
14 - DR_R3.1
*/
?>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment