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 $cmd=$_GET['cmd'];
00039 switch ($cmd) {
00040 case "run": $cmd=0xa; break;
00041 case "stop": $cmd=0xd; break;
00042 case "reset": $cmd=0x10; break;
00043 }
00044 if (is_numeric ($cmd) && ($cmd >=1) && ($cmd <= 0x10)) {
00045 $cmdfile=fopen('/dev/sensorpars', 'r');
00046 fseek ($cmdfile, $cmd+0, SEEK_END) ;
00047 fclose($cmdfile);
00048 echo <<<STATUS
00049 OK
00050 STATUS;
00051 } else
00052 echo <<<USAGE
00053 <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>
00054 <ul>
00055 <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>
00056 <li><b>cmd=stop</b> - stop compressor (needed before changing of any acquisition (lake image size) or compression (quality) bparameters</li>
00057 <li><b>cmd=reset</b> - reset compressor circuitry, reinitialize circbuf</li>
00058 <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>
00059 </ul>
00060 USAGE;
00061 ?>