MIDAS
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <math.h>
#include <ctype.h>
#include <assert.h>
#include <string.h>
#include "midas.h"
#include "mrpc.h"
#include "mfe.h"
Go to the source code of this file.
Macros | |
#define | FE_NAME "fejrpc" |
#define | EQ_NAME "RpcExample" |
#define | EQ_EVID 1 |
Functions | |
INT | frontend_init () |
Frontend initialization. | |
INT | frontend_exit () |
Frontend exit. | |
INT | begin_of_run (INT run_number, char *error) |
Begin of Run. | |
INT | end_of_run (INT run_number, char *error) |
End of Run. | |
INT | pause_run (INT run_number, char *error) |
Pause Run. | |
INT | resume_run (INT run_number, char *error) |
Resume Run. | |
INT | frontend_loop () |
Frontend loop. | |
int | read_slow_event (char *pevent, int off) |
static int | configure () |
INT | rpc_callback (INT index, void *prpc_param[]) |
INT | poll_event (INT source, INT count, BOOL test) |
INT | interrupt_configure (INT cmd, INT source, PTYPE adr) |
double | get_time () |
Variables | |
const char * | frontend_name = FE_NAME |
const char * | frontend_file_name = __FILE__ |
BOOL | frontend_call_loop = TRUE |
INT | display_period = 0 |
INT | max_event_size = 2000 |
INT | max_event_size_frag = 0 |
INT | event_buffer_size = 10*2000 |
INT | gbl_run_number |
EQUIPMENT | equipment [] |
int | count_slow = 0 |
#define EQ_EVID 1 |
Definition at line 30 of file fejrpc.cxx.
#define EQ_NAME "RpcExample" |
Definition at line 29 of file fejrpc.cxx.
#define FE_NAME "fejrpc" |
Definition at line 28 of file fejrpc.cxx.
Begin of Run.
Called every run start transition. Set equipment status in ODB, start acquisition on the modules.
[in] | run_number | Number of the run being started |
[out] | error | Can be used to write a message string to midas.log |
Definition at line 188 of file fejrpc.cxx.
Definition at line 122 of file fejrpc.cxx.
End of Run.
Called every stop run transition. Set equipment status in ODB, stop acquisition on the modules.
[in] | run_number | Number of the run being ended |
[out] | error | Can be used to write a message string to midas.log |
Definition at line 203 of file fejrpc.cxx.
Frontend exit.
Runs at frontend shutdown. Disconnect hardware and set equipment status in ODB
Definition at line 180 of file fejrpc.cxx.
Frontend initialization.
Runs once at application startup. We initialize the hardware and optical interfaces and set the equipment status in ODB. We also lock the frontend to once physical cpu core.
Definition at line 162 of file fejrpc.cxx.
Frontend loop.
If frontend_call_loop is true, this routine gets called when the frontend is idle or once between every event.
Definition at line 230 of file fejrpc.cxx.
double get_time | ( | ) |
Definition at line 260 of file fejrpc.cxx.
Pause Run.
Called every pause run transition.
[in] | run_number | Number of the run being ended |
[out] | error | Can be used to write a message string to midas.log |
Definition at line 214 of file fejrpc.cxx.
Definition at line 247 of file fejrpc.cxx.
Definition at line 285 of file fejrpc.cxx.
Resume Run.
Called every resume run transition.
[in] | run_number | Number of the run being ended |
[out] | error | Can be used to write a message string to midas.log |
Definition at line 222 of file fejrpc.cxx.
Definition at line 136 of file fejrpc.cxx.
int count_slow = 0 |
Definition at line 120 of file fejrpc.cxx.
INT display_period = 0 |
Definition at line 46 of file fejrpc.cxx.
EQUIPMENT equipment[] |
Definition at line 72 of file fejrpc.cxx.
INT event_buffer_size = 10*2000 |
Definition at line 53 of file fejrpc.cxx.
Definition at line 42 of file fejrpc.cxx.
Definition at line 39 of file fejrpc.cxx.
Definition at line 36 of file fejrpc.cxx.
INT gbl_run_number |
Definition at line 66 of file fejrpc.cxx.
INT max_event_size = 2000 |
Definition at line 49 of file fejrpc.cxx.
INT max_event_size_frag = 0 |
Definition at line 50 of file fejrpc.cxx.