00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 $cmd=$_GET['cmd'];
00042 switch ($cmd) {
00043 case "run": $cmd=0xa; break;
00044 case "stop": $cmd=0xd; break;
00045 case "reset": $cmd=0x10; break;
00046 }
00047 if (is_numeric ($cmd) && ($cmd >=1) && ($cmd <= 0x10)) {
00048 $cmdfile=fopen('/dev/sensorpars', 'r');
00049 fseek ($cmdfile, $cmd+0, SEEK_END) ;
00050 fclose($cmdfile);
00051 echo <<<STATUS
00052 OK
00053 STATUS;
00054 } else
00055 echo <<<USAGE
00056 <p>This script controls FPGA compressor on the 10353 board. Sensor and input circuitry are supposed to be already programmed (for now use ccam.cgi).It accepts 3 mnemonic commands and numbers from 1 to 16 defined in <a href="http://elphel.cvs.sourceforge.net/elphel/elphel353-7.1/os/linux-2.6-tag--devboard-R2_10-4/include/asm-cris/elphel/c313a.h">os/linux-2.6/include/asm-cris/elphel/c313a.h</a>.</p>
00057 <ul>
00058 <li><b>cmd=run</b> - turn compressor on - it will compress all incoming sensor data and store it in circbuf, advancing write pointer and generating interrupts (that finish waits in imgsrv)</li>
00059 <li><b>cmd=stop</b> - stop compressor (needed before changing of any acquisition (lake image size) or compression (quality) bparameters</li>
00060 <li><b>cmd=reset</b> - reset compressor circuitry, reinitialize circbuf</li>
00061 <li><b>cmd=1...16</b> - run command as described in c313.h, some commands may be outdated and/or not (yet) applicable to all sensors</li>
00062 </ul>
00063 USAGE;
00064 ?>