19 #include "class/multi.h"
46 #define SCS2001M_OUPUT_CH 12
47 #define SCS2001M_RELAY_FIRST 8
49 #define SCS2001M_MC_INTERLOCK_RESET 8
50 #define SCS2001M_TC_INTERLOCK_RESET 9
51 #define SCS2001M_SC_INTERLOCK_RESET 10
59 {
"SCS2001m", scs2001m_in, 44, null, DF_INPUT },
60 {
"SCS2001m", scs2001m_out, 12, null, DF_OUTPUT },
104 INT
poll_event(INT source, INT count, BOOL test) {
return 1;};
124 cm_deregister_transition(TR_START);
125 cm_deregister_transition(TR_STOP);
126 cm_deregister_transition(TR_PAUSE);
127 cm_deregister_transition(TR_RESUME);
130 cm_get_experiment_database(&hDB, NULL);
133 strcpy(str,
"/Equipment/SCS2001M/Variables/Output");
134 status = db_find_key(hDB, 0, str, &hKey);
135 if (status != DB_SUCCESS) {
136 cm_msg(MERROR,
"frontend_init",
"scs2001m_scfe: Couldn't find %s", str);
141 if (status != DB_SUCCESS) {
142 cm_msg(MERROR,
"frontend_init",
"scs2001m_scfe: Couldn't establish hotlink to %s", str);
161 cm_get_experiment_database(&hDB, NULL);
164 strcpy(str,
"/Equipment/SCS2001M/Variables/Output");
165 status = db_find_key(hDB, 0, str, &hKey);
166 if (status != DB_SUCCESS) {
167 cm_msg(MERROR,
"frontend_exit",
"scs2001m_scfe: Couldn't find %s, status=%d", str, status);
170 db_close_record(hDB, hKey);
192 cm_get_experiment_database(&hDB, NULL);
194 strcpy(str,
"/Equipment/SCS2001M/Variables/Output");
195 status = db_find_key(hDB, 0, str, &hKey);
196 if (status != DB_SUCCESS) {
197 cm_msg(MERROR,
"frontend_loop",
"scs2001m_scfe: Couldn't find %s, status=%d", str, status);
204 db_set_data_index(hDB, hKey, &fval,
sizeof(
float), i, TID_FLOAT);
207 strcpy(str,
"scs2001m_scfe: attempt to remotely reset MC HV interlock.");
210 strcpy(str,
"scs2001m_scfe: attempt to remotely reset TC HV interlock.");
213 strcpy(str,
"scs2001m_scfe: attempt to remotely reset SC HV interlock.");
216 strcpy(str,
"scs2001m_scfe: ??");
219 cm_msg(MINFO,
"scs2001m_scfe", str);
const char * frontend_name
< created by ODBedit, command "make"
INT max_event_size
maximum event size produced by this frontend
float scs2001m_output[SCS2001M_OUPUT_CH]
BOOL frontend_call_loop
frontend_loop is called periodically if this variable is TRUE
INT display_period
a frontend status page is displayed with this frequency in ms
INT event_buffer_size
buffer size to hold events
#define SCS2001M_SC_INTERLOCK_RESET
#define SCS2001M_TC_INTERLOCK_RESET
INT begin_of_run(INT run_number, char *error)
void scs2001m_output_changed(INT hDB, INT hKey, void *data)
#define SCS2001M_OUPUT_CH
INT interrupt_configure(INT cmd, INT source, PTYPE adr)
INT resume_run(INT run_number, char *error)
INT max_event_size_frag
maximum event size for fragmented events (EQ_FRAGMENTED)
#define SCS2001M_RELAY_FIRST
#define SCS2001M_MC_INTERLOCK_RESET
BOOL equipment_common_overwrite
INT end_of_run(INT run_number, char *error)
INT poll_event(INT source, INT count, BOOL test)
INT pause_run(INT run_number, char *error)
const char * frontend_file_name
The frontend file name, don't change it.
DEVICE_DRIVER scs2001m_driver[]