Low-Energy Muon (LEM) Experiment  0.5.2
scs2001m_scfe.cxx File Reference
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include "midas.h"
#include "mfe.h"
#include "class/multi.h"
#include "scs2001m.h"
#include "bus/null.h"
Include dependency graph for scs2001m_scfe.cxx:

Go to the source code of this file.

Macros

#define SCS2001M_OUPUT_CH   12
 
#define SCS2001M_RELAY_FIRST   8
 
#define SCS2001M_MC_INTERLOCK_RESET   8
 
#define SCS2001M_TC_INTERLOCK_RESET   9
 
#define SCS2001M_SC_INTERLOCK_RESET   10
 

Functions

INT poll_event (INT source, INT count, BOOL test)
 
INT interrupt_configure (INT cmd, INT source, POINTER_T adr)
 
void scs2001m_output_changed (INT hDB, INT hKey, void *data)
 
INT frontend_init ()
 
INT frontend_exit ()
 
INT frontend_loop ()
 
INT begin_of_run (INT run_number, char *error)
 
INT end_of_run (INT run_number, char *error)
 
INT pause_run (INT run_number, char *error)
 
INT resume_run (INT run_number, char *error)
 

Variables

const char * frontend_name = "SCS2001M_SC"
 The frontend name (client name) as seen by other MIDAS clients. More...
 
const char * frontend_file_name = __FILE__
 The frontend file name, don't change it. More...
 
BOOL frontend_call_loop = TRUE
 frontend_loop is called periodically if this variable is TRUE More...
 
INT display_period = 1000
 a frontend status page is displayed with this frequency in ms More...
 
INT max_event_size = 10000
 maximum event size produced by this frontend More...
 
INT max_event_size_frag = 5*1024*1024
 maximum event size for fragmented events (EQ_FRAGMENTED) More...
 
INT event_buffer_size = 10*10000
 buffer size to hold events More...
 
float scs2001m_output [SCS2001M_OUPUT_CH]
 
DWORD scs2001m_start
 
DEVICE_DRIVER scs2001m_driver []
 
BOOL equipment_common_overwrite = FALSE
 
EQUIPMENT equipment []
 equipment structure for the mfe.c More...
 

Macro Definition Documentation

#define SCS2001M_MC_INTERLOCK_RESET   8

Definition at line 49 of file scs2001m_scfe.cxx.

Referenced by frontend_loop().

#define SCS2001M_OUPUT_CH   12

Definition at line 46 of file scs2001m_scfe.cxx.

Referenced by frontend_init(), and frontend_loop().

#define SCS2001M_RELAY_FIRST   8

Definition at line 47 of file scs2001m_scfe.cxx.

Referenced by frontend_loop().

#define SCS2001M_SC_INTERLOCK_RESET   10

Definition at line 51 of file scs2001m_scfe.cxx.

Referenced by frontend_loop().

#define SCS2001M_TC_INTERLOCK_RESET   9

Definition at line 50 of file scs2001m_scfe.cxx.

Referenced by frontend_loop().

Function Documentation

INT begin_of_run ( INT  run_number,
char *  error 
)

Called by the mfe at the begin of the run. Here it is only a dummy.

Definition at line 233 of file scs2001m_scfe.cxx.

INT end_of_run ( INT  run_number,
char *  error 
)

Called by the mfe at the end of the run. Here it is only a dummy.

Definition at line 243 of file scs2001m_scfe.cxx.

INT frontend_exit ( )

Called by the mfe at exiting stage.

Definition at line 154 of file scs2001m_scfe.cxx.

References hDB, and hKey.

INT frontend_init ( )

Called by the master frontend (mfe) at initializing stage.

Definition at line 117 of file scs2001m_scfe.cxx.

References hDB, hKey, SCS2001M_OUPUT_CH, scs2001m_output, scs2001m_output_changed(), and scs2001m_start.

INT frontend_loop ( )
INT interrupt_configure ( INT  cmd,
INT  source,
POINTER_T  adr 
)

Definition at line 105 of file scs2001m_scfe.cxx.

INT pause_run ( INT  run_number,
char *  error 
)

Called by the mfe when the run is paused. Here it is only a dummy.

Definition at line 253 of file scs2001m_scfe.cxx.

INT poll_event ( INT  source,
INT  count,
BOOL  test 
)

Definition at line 104 of file scs2001m_scfe.cxx.

INT resume_run ( INT  run_number,
char *  error 
)

Called by the mfe when the run is resumed. Here it is only a dummy.

Definition at line 263 of file scs2001m_scfe.cxx.

void scs2001m_output_changed ( INT  hDB,
INT  hKey,
void *  data 
)

Definition at line 108 of file scs2001m_scfe.cxx.

References scs2001m_start.

Referenced by frontend_init().

Variable Documentation

INT display_period = 1000

a frontend status page is displayed with this frequency in ms

Definition at line 34 of file scs2001m_scfe.cxx.

EQUIPMENT equipment[]
Initial value:
= {
{ "SCS2001M",
{97, 0,
"SYSTEM",
EQ_SLOW,
0,
"FIXED",
TRUE,
RO_RUNNING |
RO_TRANSITIONS,
30000,
0,
0,
1,
"", "", "",},
cd_multi_read,
cd_multi,
NULL,
},
{ "" }
}
DEVICE_DRIVER scs2001m_driver[]

equipment structure for the mfe.c

Definition at line 75 of file scs2001m_scfe.cxx.

BOOL equipment_common_overwrite = FALSE

equipment_common_overwrite:

  • If that flag is TRUE, then the contents of the "equipment" structure is copied to the ODB on each start of the front-end.
  • If the flag is FALSE, then the ODB values are kept on the start of the front-end

Definition at line 72 of file scs2001m_scfe.cxx.

INT event_buffer_size = 10*10000

buffer size to hold events

Definition at line 43 of file scs2001m_scfe.cxx.

BOOL frontend_call_loop = TRUE

frontend_loop is called periodically if this variable is TRUE

Definition at line 31 of file scs2001m_scfe.cxx.

const char* frontend_file_name = __FILE__

The frontend file name, don't change it.

Definition at line 28 of file scs2001m_scfe.cxx.

const char* frontend_name = "SCS2001M_SC"

The frontend name (client name) as seen by other MIDAS clients.

Definition at line 26 of file scs2001m_scfe.cxx.

INT max_event_size = 10000

maximum event size produced by this frontend

Definition at line 37 of file scs2001m_scfe.cxx.

INT max_event_size_frag = 5*1024*1024

maximum event size for fragmented events (EQ_FRAGMENTED)

Definition at line 40 of file scs2001m_scfe.cxx.

DEVICE_DRIVER scs2001m_driver[]
Initial value:
= {
{ "SCS2001m", scs2001m_in, 44, null, DF_INPUT },
{ "SCS2001m", scs2001m_out, 12, null, DF_OUTPUT },
{ "" }
}

Definition at line 58 of file scs2001m_scfe.cxx.

float scs2001m_output[SCS2001M_OUPUT_CH]

Definition at line 53 of file scs2001m_scfe.cxx.

Referenced by frontend_init(), and frontend_loop().

DWORD scs2001m_start

Definition at line 54 of file scs2001m_scfe.cxx.

Referenced by frontend_init(), frontend_loop(), and scs2001m_output_changed().