BeobotLauncher.C File Reference

#include "Component/ModelManager.H"
#include "Devices/BeoChip.H"
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
Include dependency graph for BeobotLauncher.C:

Go to the source code of this file.

Classes

struct  BeobotLauncherApp
 Description of applications which we handle: More...
class  BeobotLauncherListener
 Our own little BeoChipListener. More...

Functions

int main (const int argc, const char **argv)
 Launch various programs on the Beobot.

Variables

BeobotLauncherApp apps [100]
 List of applications which we handle.
int napps = 0

Detailed Description

File template for developing a new class

Definition in file BeobotLauncher.C.


Function Documentation

int main ( const int  argc,
const char **  argv 
)

Launch various programs on the Beobot.

This launcher should be placed in a cron or init script so that it will permanently be running. To prevent multiple copies of it from running at the same time, we use an flock on a file in /tmp, as suggested on a linuxquestions.org post (so even if the launcher dies badly, which may leave the temp file behind, it will be unlocked and will not prevent a new instance from starting). Here we use the BeoChip to let the user decide what to run. Just before we launch and monitor a new program, we clear and release the BeoChip so that the launched program can use it. Once the launched program terminates, we take the BeoChip over again and show our launch menu.

Definition at line 115 of file BeobotLauncher.C.


Variable Documentation

List of applications which we handle.

Definition at line 55 of file BeobotLauncher.C.

Generated on Sun May 8 08:42:38 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3