function ADEIServiceGetUpdateInfo(REQUEST $req) { if ($req->CheckData()) { $query = $req->GetQueryString($extra = array("target" => "alarms_summary", "time_format" => "text")); return array("xml" => "services/control.php?{$query}", "xslt" => "alarms"); } return false; }
function ADEIServiceGetUpdateInfo(REQUEST $req) { if ($req->CheckData()) { if ($req->GetProp("target", false)) { $query = $req->GetQueryString($extra = array("time_format" => "text")); } else { $query = $req->GetQueryString($extra = array("target" => "status", "time_format" => "text")); } return array("xml" => "services/control.php?{$query}", "xslt" => "controlinfo"); } return false; }
<?php require "../../adei.php"; header("Content-type: application/json"); header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); $_POST['props'] = "{\"db_server\": \"autogen\", \"db_name\": \"minutely\", \"db_group\": \"default\", \"db_mask\": \"6\", \"experiment\": \"0-0\", \"window\": \"1104537600-1262304000,-2:2\", \"width\": 1024, \"height\": 768, \"hide_axes\": 0, \"show_gaps\": \"POINTS\"}"; try { $req = new REQUEST(); if ($req->CheckData()) { $req = $req->CreateDataRequest(); $time[1] = gettimeofday(true); $draw = $req->CreatePlotter(); // print_r($draw->cache->req); $time[2] = gettimeofday(true); $draw->Create(); $time[3] = gettimeofday(true); $file = $draw->Save(); $time[4] = gettimeofday(true); $scale = $draw->GetScaleInfo(); $time[5] = gettimeofday(true); foreach ($time as $i => $tm) { echo $tm . " - " . $i . "\n"; } echo "Main computations: " . ($time[4] - $time[3]) . "\n"; echo time() . " - 3\n"; echo time() . " - Starting\n"; } } catch (ADEIException $e) { $error = $e->getMessage(); }