.
*! -----------------------------------------------------------------------------**
*! $Log: camvars.php,v $
*! Revision 1.1.1.1 2008/11/27 20:04:03 elphel
*!
*!
*! Revision 1.2 2008/11/22 05:58:24 elphel
*! modifying to match elphel_set_P_value()
*!
*! Revision 1.2 2008/04/17 22:37:57 elphel
*! bug fix
*!
*! Revision 1.1 2008/03/22 04:41:07 elphel
*! Script to set/get camera parameters with HTTP GET (result as XML)
*!
*!
*/
if (count($_GET)==0) {
echo <<
The variable names to be read are specified without values (like camvar.php?WOI_WIDTH&WOI_HEIGHT ), the ones to be written - with the values (camvar.php?QUALITY=75). It is also possible to mix both types in the same request.
USAGE; exit (0); } $toRead=array(); $toWrite=array(); foreach($_GET as $key=>$value) { if ($value==="") $toRead[$key]=$value; else $toWrite[$key]=(integer) $value; } $npars=(count($toWrite)>0)?elphel_set_P_arr($toWrite):0; if (count($toRead)>0) $toRead=elphel_get_P_arr($toRead); if ($_GET["STATE"]!==NULL) $toRead["STATE"]=elphel_get_state(); $xml = new SimpleXMLElement("