apps/autocampars/autocampars.c File Reference

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <fcntl.h>
#include <errno.h>
#include <asm/elphel/c313a.h>

Include dependency graph for autocampars.c:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])


Function Documentation

int main ( int  argc,
char *  argv[] 
)

*************************************************************************** ! FILE NAME : autocampars.c ! DESCRIPTION: Daemon to save/restore parameter (calls autocampars.php) ! This program is needed not to have an extra instance of ! PHP (2+ MB) just waiting as a daemon. ! 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/>. ! -----------------------------------------------------------------------------** ! !

Log
autocampars.c,v
! Revision 1.1.1.1 2008/11/27 20:04:01 elphel ! ! ! Revision 1.4 2008/11/22 05:52:47 elphel ! added TODO ! ! Revision 1.3 2008/11/18 07:37:10 elphel ! snapshot ! ! Revision 1.2 2008/11/17 23:42:59 elphel ! snapshot ! ! Revision 1.1 2008/11/17 06:41:20 elphel ! 8.0.alpha18 - started autocampars - camera parameters save/restore/init manager ! !

TODO: Use it to re-running ccamftp.php see if any arguments are provided. If they are - they are bit number, sleep time in seconds and command/arguments of an external program to be launched. Usually - a php script, so it makes sense not to keep the php instance in memory if it is not used most of the time (done so for ccamftp.php)

Daemon loop - waiting for being enabled, run autocampars.php NOTE: Requires sequencers and sensor to be running, to reset everything if stuck - use autocampars.php directly

wait for autoexposure daemon to be enabled (let it sleep if not)

do we need any fork at all if we now serve images to one client at a time?

We do not need to pass any parameters here, but if we had to - first argument is lost (probably to "-q" in the script line 1

comes here only if error

skip 1 frame before returning

Definition at line 48 of file autocampars.c.

References DAEMON_BIT_AUTOCAMPARS, ELP_FERR, exit, fd_fparmsall, FRAMEPARS_SETFRAMEREL, LSEEK_DAEMON_FRAME, LSEEK_FRAME_WAIT_REL, P_DAEMON_EN_AUTOCAMPARS, SEEK_END, stderr, stdout, and write.


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