Low-Energy Muon (LEM) Experiment  0.5.1
mod_cryo_scfe.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "midas.h"
#include "class/multi.h"
#include "LakeShore336.h"
#include "west6100.h"
#include "eurotherm2416.h"
#include "xtc.h"
#include "twickenham.h"
#include "tcpip_rs232.h"
Include dependency graph for mod_cryo_scfe.c:

Go to the source code of this file.

Macros

#define MOD_CF1_DEMAND   9
 
#define MOD_CF1_MEASURED   0
 
#define MOD_HE_SHIELD_DEMAND   17
 
#define MOD_HE_SHIELD_MEASURED   3
 

Functions

INT poll_event (INT source[], INT count, BOOL test)
 
INT interrupt_configure (INT cmd, INT source[], PTYPE adr)
 
void mod_cryo_checks (HNDLE hDB, HNDLE hKey, void *dummy)
 
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

char * frontend_name = "ModCryo"
 The frontend name (client name) as seen by other MIDAS clients. More...
 
char * frontend_file_name = __FILE__
 The frontend file name, don't change it. More...
 
BOOL frontend_call_loop = FALSE
 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 * input
 
DEVICE_DRIVER mod_cryo_driver []
 device driver list More...
 
EQUIPMENT equipment []
 equipment structure for the mfe.c More...
 

Macro Definition Documentation

#define MOD_CF1_DEMAND   9

Definition at line 25 of file mod_cryo_scfe.c.

Referenced by mod_cryo_checks().

#define MOD_CF1_MEASURED   0

Definition at line 26 of file mod_cryo_scfe.c.

Referenced by mod_cryo_checks().

#define MOD_HE_SHIELD_DEMAND   17

Definition at line 27 of file mod_cryo_scfe.c.

Referenced by mod_cryo_checks().

#define MOD_HE_SHIELD_MEASURED   3

Definition at line 28 of file mod_cryo_scfe.c.

Referenced by mod_cryo_checks().

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 238 of file mod_cryo_scfe.c.

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 248 of file mod_cryo_scfe.c.

INT frontend_exit ( )

Called by the mfe at exiting stage. Here it is only a dummy.

Definition at line 199 of file mod_cryo_scfe.c.

References hDB, hKey, and input.

INT frontend_init ( )

Called by the master frontend (mfe) at initializing stage. Here it is only a dummy.

Definition at line 154 of file mod_cryo_scfe.c.

References hDB, hKey, input, and mod_cryo_checks().

INT frontend_loop ( )

Called by the mfe in the main loop. Here it is only a dummy.

Definition at line 228 of file mod_cryo_scfe.c.

INT interrupt_configure ( INT  cmd,
INT  source[],
PTYPE  adr 
)

Definition at line 100 of file mod_cryo_scfe.c.

void mod_cryo_checks ( HNDLE  hDB,
HNDLE  hKey,
void *  dummy 
)
Parameters
hDBmain ODB handle
hKeyhandle to the DB50 sc_status
dummynot used

Definition at line 110 of file mod_cryo_scfe.c.

References input, MOD_CF1_DEMAND, MOD_CF1_MEASURED, MOD_HE_SHIELD_DEMAND, and MOD_HE_SHIELD_MEASURED.

Referenced by frontend_init().

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 258 of file mod_cryo_scfe.c.

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

Definition at line 99 of file mod_cryo_scfe.c.

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 268 of file mod_cryo_scfe.c.

Variable Documentation

INT display_period = 1000

a frontend status page is displayed with this frequency in ms

Definition at line 41 of file mod_cryo_scfe.c.

EQUIPMENT equipment[]
Initial value:
= {
{ "ModCryo",
{71, 0,
"SYSTEM",
EQ_SLOW,
0,
"FIXED",
TRUE,
RO_RUNNING |
RO_TRANSITIONS,
30000,
0,
0,
1,
"", "", "",},
cd_multi_read,
cd_multi,
NULL,
},
{ "" }
}
DEVICE_DRIVER mod_cryo_driver[]
device driver list
Definition: mod_cryo_scfe.c:57

equipment structure for the mfe.c

Definition at line 70 of file mod_cryo_scfe.c.

INT event_buffer_size = 10*10000

buffer size to hold events

Definition at line 50 of file mod_cryo_scfe.c.

BOOL frontend_call_loop = FALSE

frontend_loop is called periodically if this variable is TRUE

Definition at line 38 of file mod_cryo_scfe.c.

char* frontend_file_name = __FILE__

The frontend file name, don't change it.

Definition at line 35 of file mod_cryo_scfe.c.

char* frontend_name = "ModCryo"

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

Definition at line 33 of file mod_cryo_scfe.c.

float* input

Definition at line 52 of file mod_cryo_scfe.c.

Referenced by frontend_exit(), frontend_init(), and mod_cryo_checks().

INT max_event_size = 10000

maximum event size produced by this frontend

Definition at line 44 of file mod_cryo_scfe.c.

INT max_event_size_frag = 5*1024*1024

maximum event size for fragmented events (EQ_FRAGMENTED)

Definition at line 47 of file mod_cryo_scfe.c.

DEVICE_DRIVER mod_cryo_driver[]
Initial value:
= {
{ "Lake336_Moderator", ls336_in, 24, tcpip_rs232, DF_INPUT },
{ "Lake336_Moderator", ls336_out, 14, tcpip_rs232, DF_OUTPUT },
{ "Eurotherm2416_In", eurotherm2416_in, 8, tcpip_rs232, DF_INPUT },
{ "Eurotherm2416_Out", eurotherm2416_out, 7, tcpip_rs232, DF_OUTPUT },
{ "W6100_In", w6100_in, 6, tcpip_rs232, DF_INPUT },
{ "W6100_Out", w6100_out, 8, tcpip_rs232, DF_OUTPUT },
{ "XTC", xtc, 2, tcpip_rs232, DF_INPUT },
{ "LN2_Moddy", twickenham, 1, tcpip_rs232, DF_INPUT },
{ "" }
}
INT w6100_in(INT cmd,...)
Definition: west6100.c:1058
INT xtc(INT cmd,...)
Definition: xtc.c:342
INT twickenham(INT cmd,...)
Definition: twickenham.c:275
INT w6100_out(INT cmd,...)
Definition: west6100.c:1108

device driver list

Definition at line 57 of file mod_cryo_scfe.c.