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 <sys/wait.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

◆ LAR_STATE_LOAD

#define LAR_STATE_LOAD   4

Definition at line 44 of file lemAutoRunFE.cxx.

Referenced by main().

◆ LAR_STATE_LOADING

#define LAR_STATE_LOADING   5

Definition at line 45 of file lemAutoRunFE.cxx.

Referenced by main().

◆ LAR_STATE_NEXT

#define LAR_STATE_NEXT   6

Definition at line 46 of file lemAutoRunFE.cxx.

Referenced by main().

◆ LAR_STATE_PAUSED

#define LAR_STATE_PAUSED   1

Definition at line 41 of file lemAutoRunFE.cxx.

◆ LAR_STATE_RUNNING

#define LAR_STATE_RUNNING   3

Definition at line 43 of file lemAutoRunFE.cxx.

Referenced by main().

◆ LAR_STATE_STARTING

#define LAR_STATE_STARTING   2

Definition at line 42 of file lemAutoRunFE.cxx.

Referenced by main().

◆ LAR_STATE_STOPPED

#define LAR_STATE_STOPPED   0

Definition at line 40 of file lemAutoRunFE.cxx.

Referenced by main().

Function Documentation

◆ lar_check_auto_run_sequence()

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

Definition at line 243 of file lemAutoRunFE.cxx.

References lar_strip().

Referenced by main().

◆ lar_check_next_autorun()

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

Definition at line 277 of file lemAutoRunFE.cxx.

References lar_seq_name_check(), and lar_strip().

Referenced by main().

◆ lar_client_running()

int lar_client_running ( HNDLE  hDB)

Checks if 'lemAutoRun' is present.

return:

  • -1 cannot get ODB key
Parameters
hDBODB handle

Definition at line 202 of file lemAutoRunFE.cxx.

Referenced by main().

◆ lar_fe_ctrlc_handler()

void lar_fe_ctrlc_handler ( int  sig)

CTRL-C event handler.

Parameters
sigsignal (not evaluated)

Definition at line 80 of file lemAutoRunFE.cxx.

References _done.

Referenced by main().

◆ lar_fe_syntax()

void lar_fe_syntax ( )

Prints out the syntax for calling the LEM slowcontrol watchdog.

Definition at line 62 of file lemAutoRunFE.cxx.

Referenced by main().

◆ lar_seq_name_check()

int lar_seq_name_check ( HNDLE  hDB)

Definition at line 139 of file lemAutoRunFE.cxx.

References lar_strip().

Referenced by lar_check_next_autorun().

◆ lar_strip()

int lar_strip ( char *  str,
char *  result,
size_t  result_size 
)

◆ lar_substr_eq()

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 174 of file lemAutoRunFE.cxx.

◆ main()

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

◆ ss_daemon_init()

INT ss_daemon_init ( BOOL  keep_stdout)

Referenced by main().

◆ ss_system()

INT EXPRT ss_system ( const char *  command)

Referenced by main().

Variable Documentation

◆ _done

int _done = FALSE

termination flag for the main loop

Definition at line 55 of file lemAutoRunFE.cxx.

Referenced by lar_fe_ctrlc_handler(), and main().