lemAutoRun  1.0
Macros | Functions | Variables
lemAutoRunFE.cxx File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>
#include <ctype.h>
#include "midas.h"
#include "msystem.h"
Include dependency graph for lemAutoRunFE.cxx:

Go to the source code of this file.

Macros

#define LAR_STATE_STOPPED   0
 
#define LAR_STATE_PAUSED   1
 
#define LAR_STATE_STARTING   2
 
#define LAR_STATE_RUNNING   3
 
#define LAR_STATE_LOAD   4
 
#define LAR_STATE_LOADING   5
 
#define LAR_STATE_NEXT   6
 

Functions

INT EXPRT ss_system (const char *command)
 
INT ss_daemon_init (BOOL keep_stdout)
 
void lar_fe_syntax ()
 
void lar_fe_ctrlc_handler (int sig)
 
int lar_strip (char *str, char *result, size_t result_size)
 
int lar_seq_name_check (HNDLE hDB)
 
int lar_substr_eq (char *a, char *b)
 
int lar_client_running (HNDLE hDB)
 
void lar_check_auto_run_sequence (INT hDB, INT hKey, void *autoRunSeq)
 
void lar_check_next_autorun (INT hDB, INT hKey, void *next)
 
int main (int argc, char *argv[])
 

Variables

int _done = FALSE
 termination flag for the main loop More...
 

Macro Definition Documentation

#define LAR_STATE_LOAD   4

Definition at line 43 of file lemAutoRunFE.cxx.

Referenced by main().

#define LAR_STATE_LOADING   5

Definition at line 44 of file lemAutoRunFE.cxx.

Referenced by main().

#define LAR_STATE_NEXT   6

Definition at line 45 of file lemAutoRunFE.cxx.

Referenced by main().

#define LAR_STATE_PAUSED   1

Definition at line 40 of file lemAutoRunFE.cxx.

#define LAR_STATE_RUNNING   3

Definition at line 42 of file lemAutoRunFE.cxx.

Referenced by main().

#define LAR_STATE_STARTING   2

Definition at line 41 of file lemAutoRunFE.cxx.

Referenced by main().

#define LAR_STATE_STOPPED   0

Definition at line 39 of file lemAutoRunFE.cxx.

Referenced by main().

Function Documentation

void lar_check_auto_run_sequence ( INT  hDB,
INT  hKey,
void *  autoRunSeq 
)

Definition at line 242 of file lemAutoRunFE.cxx.

References lar_strip().

Referenced by main().

void lar_check_next_autorun ( INT  hDB,
INT  hKey,
void *  next 
)

Definition at line 276 of file lemAutoRunFE.cxx.

References lar_seq_name_check(), and lar_strip().

Referenced by main().

int lar_client_running ( HNDLE  hDB)

Checks if 'lemAutoRun' is present.

return:

  • -1 cannot get ODB key
Parameters
hDBODB handle

Definition at line 201 of file lemAutoRunFE.cxx.

Referenced by main().

void lar_fe_ctrlc_handler ( int  sig)

CTRL-C event handler.

Parameters
sigsignal (not evaluated)

Definition at line 79 of file lemAutoRunFE.cxx.

References _done.

Referenced by main().

void lar_fe_syntax ( )

Prints out the syntax for calling the LEM slowcontrol watchdog.

Definition at line 61 of file lemAutoRunFE.cxx.

Referenced by main().

int lar_seq_name_check ( HNDLE  hDB)

Definition at line 138 of file lemAutoRunFE.cxx.

References lar_strip().

Referenced by lar_check_next_autorun().

int lar_strip ( char *  str,
char *  result,
size_t  result_size 
)
int lar_substr_eq ( char *  a,
char *  b 
)

checks if the shorter of the two strings 'a' or 'b' is equal to the first part of the other string.

Parameters
a
b

Definition at line 173 of file lemAutoRunFE.cxx.

int main ( int  argc,
char *  argv[] 
)
INT ss_daemon_init ( BOOL  keep_stdout)

Referenced by main().

INT EXPRT ss_system ( const char *  command)

Referenced by main().

Variable Documentation

int _done = FALSE

termination flag for the main loop

Definition at line 54 of file lemAutoRunFE.cxx.

Referenced by lar_fe_ctrlc_handler(), and main().