apps/autocampars/autocampars.php File Reference

Go to the source code of this file.

Functions

 processInit ($initPage)
 processDaemon ()
 processPost ()
 processGet ()
 TODO: Make the contol page aware of stuck sensor (sleep 1, then 5)? and suggest init if frame is not changing.
 startPage ($page_title, $javascript)
 endPage ()
 writeGroupsTable ()
 writePagesTable ()
 mainJavascript ()
 addGammas ($pars)
 Scan commands for possible changing gamma tables, calculate them in advance (driver can only scale gamma, not calculate prototypes).
 setParsFromPage ($page, $mask, $initmode=false)
 readParsToPage ($page)
 saveRotateConfig ($numBackups)
 rotateConfig ($numBackups)
 backupName ($num)
 findNextPage ($page)
 parseConfig ($filename)
 encodeConfig ($config)
 myval ($s)
 createDefaultConfig ($version)

Variables

 $Log = ""
 $cvslog
 $p = strpos ($cvslog,"Revision")
 $version = strtok(substr($cvslog,$p+strlen("Revision"),20)," ")
 $thisScript = $_SERVER['argv'][0]
 $numBackups = 5
 $parseditPath = "/parsedit.php"
 $embedImageScale = 0.15
 $twoColumns = false
 $configPath = "/etc/autocampars.xml"
 $backupConfigPath = "/etc/autocampars.xml.backup"
 $logFilePath = "/var/log/autocampars.log"
 $logFile = fopen($logFilePath,"a")
 $useDefaultPageNumber = 15
 $protectedPage = 0
 $init = false
 ============
 $daemon = false
 $initPage = $useDefaultPageNumber
 $config = parseConfig($configPath)


Function Documentation

addGammas ( pars  ) 

Scan commands for possible changing gamma tables, calculate them in advance (driver can only scale gamma, not calculate prototypes).

duplicates will be eliminated

Definition at line 520 of file autocampars.php.

backupName ( num  ) 

Definition at line 593 of file autocampars.php.

createDefaultConfig ( version  ) 

TODO: Add sensor registers groups, remember not to program more than 64 (better 32 as there could be other writes initiated by the driver) TODO: Trigger modes?

turn on sensor in continuous mode

run compressor in continuous mode

Definition at line 712 of file autocampars.php.

References $thisScript, $version, a, add, ahead, bit, color, data, DEBUG, debug, drivers, error(), frame, frames, free(), full, gamma, green, groups, height, histogram, image, IRQ, jp4, jp46, jp46dc, jp4dc, jp4diff, latency, level, mode, mono, P_AEXP_FRACPIX, P_AEXP_LEVEL, P_WB_WHITELEV, pastpars, raw, read, red, save(), sensor, set, single, size, slave, start, state, stop, test, time, type, units, value, width, window, and write.

encodeConfig ( config  ) 

Definition at line 653 of file autocampars.php.

References $xml, and groups.

endPage (  ) 

Definition at line 376 of file autocampars.php.

Referenced by processGet(), and showLastImages().

findNextPage ( page  ) 

Definition at line 599 of file autocampars.php.

mainJavascript (  ) 

Definition at line 451 of file autocampars.php.

References $config, $embedImageScale, $i, $parseditPath, $protectedPage, $useDefaultPageNumber, and groups.

Referenced by processGet().

myval ( s  ) 

Definition at line 702 of file autocampars.php.

References $s.

Referenced by parseGetNames(), and processDaemon().

parseConfig ( filename  ) 

Definition at line 610 of file autocampars.php.

processDaemon (  ) 

Definition at line 226 of file autocampars.php.

References $config, $numBackups, $protectedPage, $useDefaultPageNumber, myval(), processInit(), readParsToPage(), saveRotateConfig(), and setParsFromPage().

processGet (  ) 

TODO: Make the contol page aware of stuck sensor (sleep 1, then 5)? and suggest init if frame is not changing.

Definition at line 316 of file autocampars.php.

References $_GET, $config, $numBackups, $page_title, $twoColumns, $version, a, data, edit, endPage(), exit, mainJavascript(), saveRotateConfig(), startPage(), write, writeGroupsTable(), and writePagesTable().

Referenced by processPost().

processInit ( initPage  ) 

Definition at line 193 of file autocampars.php.

References $config, $framepars_file, $initPage, $logFile, SEEK_END, and setParsFromPage().

Referenced by processDaemon().

processPost (  ) 

Definition at line 267 of file autocampars.php.

References $config, $numBackups, exit, processGet(), readParsToPage(), saveRotateConfig(), and setParsFromPage().

readParsToPage ( page  ) 

Definition at line 559 of file autocampars.php.

Referenced by processDaemon(), and processPost().

rotateConfig ( numBackups  ) 

Definition at line 586 of file autocampars.php.

saveRotateConfig ( numBackups  ) 

Definition at line 577 of file autocampars.php.

Referenced by processDaemon(), processGet(), and processPost().

setParsFromPage ( page,
mask,
initmode = false 
)

Definition at line 535 of file autocampars.php.

Referenced by processDaemon(), processInit(), and processPost().

startPage ( page_title,
javascript 
)

Definition at line 350 of file autocampars.php.

References $page_title, method, and type.

Referenced by processGet(), and showLastImages().

writeGroupsTable (  ) 

Definition at line 380 of file autocampars.php.

References $config.

Referenced by processGet().

writePagesTable (  ) 

Definition at line 400 of file autocampars.php.

References $config, $i, $protectedPage, and $useDefaultPageNumber.

Referenced by processGet().


Variable Documentation

$backupConfigPath = "/etc/autocampars.xml.backup"

Definition at line 93 of file autocampars.php.

$config = parseConfig($configPath)

Definition at line 115 of file autocampars.php.

Referenced by mainJavascript(), processDaemon(), processGet(), processInit(), processPost(), writeGroupsTable(), and writePagesTable().

$configPath = "/etc/autocampars.xml"

Definition at line 92 of file autocampars.php.

Referenced by getParDescriptions().

$cvslog

Definition at line 28 of file autocampars.php.

$daemon = false

Definition at line 102 of file autocampars.php.

$embedImageScale = 0.15

Definition at line 88 of file autocampars.php.

Referenced by mainJavascript(), parseGetNames(), and printPage().

$init = false

============

change to -1 to enable saving to page 0

Definition at line 101 of file autocampars.php.

$initPage = $useDefaultPageNumber

Definition at line 103 of file autocampars.php.

Referenced by processInit().

$Log = ""

! PHP script ! FILE NAME : autocampars.php ! DESCRIPTION: Save/restore/initialize camera parameters ! AUTHOR : Elphel, Inc. ! Copyright (C) 2008 Elphel, Inc ! -----------------------------------------------------------------------------** ! ! This program is free software: you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation, either version 3 of the License, or ! (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program. If not, see <http://www.gnu.org/licenses/>. ! -----------------------------------------------------------------------------** ! !

Definition at line 27 of file autocampars.php.

Referenced by create_templates().

$logFile = fopen($logFilePath,"a")

Definition at line 95 of file autocampars.php.

Referenced by processInit().

$logFilePath = "/var/log/autocampars.log"

Definition at line 94 of file autocampars.php.

$numBackups = 5

Definition at line 86 of file autocampars.php.

Referenced by processDaemon(), processGet(), and processPost().

$p = strpos ($cvslog,"Revision")

Definition at line 79 of file autocampars.php.

Referenced by parse_seq(), and ps().

$parseditPath = "/parsedit.php"

Definition at line 87 of file autocampars.php.

Referenced by mainJavascript().

$protectedPage = 0

Definition at line 97 of file autocampars.php.

Referenced by mainJavascript(), processDaemon(), and writePagesTable().

$thisScript = $_SERVER['argv'][0]

Definition at line 85 of file autocampars.php.

Referenced by createDefaultConfig().

$twoColumns = false

Definition at line 89 of file autocampars.php.

Referenced by processGet().

$useDefaultPageNumber = 15

Definition at line 96 of file autocampars.php.

Referenced by mainJavascript(), processDaemon(), and writePagesTable().

$version = strtok(substr($cvslog,$p+strlen("Revision"),20)," ")

Definition at line 80 of file autocampars.php.

Referenced by createDefaultConfig(), gen_static_xml(), and processGet().


Generated on Fri Nov 28 00:06:40 2008 for elphel by  doxygen 1.5.1