00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef STRAP_H
00012 #define STRAP_H
00013
00014
00015 #include "strapDbPublic.h"
00016 #include "strapErrors.h"
00017
00018 #define strapMAX_DATA_SIZE 58248
00019 #define STRAP "strap"
00020 #define strapAPD_NUMB 4
00021
00022
00023 #define strapAUTO_FILTER 0
00024 #define strapADAPTIVE_FILTER 1
00025 #define strapMANUAL_FILTER 2
00026
00027
00028 #define strapDIAG_OFF 1
00029 #define strapDIAG_EVENT 2
00030 #define strapDIAG_POLL 3
00031
00032
00033 #define strapCHOPPING_OFF 0
00034 #define strapCHOPPING_ON 1
00035
00036
00037 #define strapSERVER_OFF 1
00038 #define strapSERVER_ON 2
00039
00040
00041 #define strapRT_GUIDE_CENTROID 1
00042 #define strapRT_GUIDE_COMMANDS 2
00043
00044
00045 #define strapRT_CENTROID 1
00046 #define strapRT_APD_COUNTS 2
00047
00048
00049 #define strapMIN_TEMP -40
00050 #define strapMAX_TEMP 20
00051
00052
00053
00054 #define strapSIMUL_NONE 0
00055 #define strapSIMUL_DSP 1
00056 #define strapSIMUL_LCU 2
00057
00058
00059
00060 #define strapSS_OPEN_LOOP 10
00061 #define strapSS_CLOSED_LOOP 11
00062 #define strapSS_CALIB 12
00063 #define strapSS_CHOPPING 13
00064 #define strapSS_NOT_INIT 14
00065 #define strapSS_HV_RAISE 15
00066 #define strapSS_SET_TEMP 16
00067 #define strapSS_OPTIMIZE 17
00068 #define strapSS_OPEN_GATE 18
00069 #define strapSS_CLOSED_GATE 19
00070 #define strapSS_HV_ON 20
00071 #define strapSS_HV_OFF 21
00072 #define strapSS_NDF_MOVE 22
00073
00074
00075
00076
00077
00078
00079 #define strapSS_STRAP_STATUS -1
00080
00081 #define strapSTR_ERROR "ERROR"
00082 #define strapSTR_IDLE "IDLE"
00083 #define strapSTR_INIT "INITIALIZING"
00084 #define strapSTR_OPEN_LOOP "OPEN LOOP"
00085 #define strapSTR_CLOSED_LOOP "CLOSED LOOP"
00086 #define strapSTR_CALIB "CALIBRATING"
00087 #define strapSTR_CHOP "CHOPPING"
00088 #define strapSTR_NOT_INIT "NOT INITIALIZED"
00089 #define strapSTR_HV_RAISE "HV RAISING"
00090 #define strapSTR_SET_TEMP "SET TEMPERATURE"
00091 #define strapSTR_UNKNOWN "UNKNOWN"
00092 #define strapSTR_OPTIMIZE "OPTIMIZING"
00093 #define strapSTR_OPEN_GATE "OPEN GATE"
00094 #define strapSTR_CLOSED_GATE "CLOSED GATE"
00095 #define strapSTR_HV_ON "HIGH VOLTAGE ON"
00096 #define strapSTR_HV_OFF "HIGH VOLTAGE OFF"
00097 #define strapSTR_NDF_MOVE "SETTING FILTER"
00098
00099
00100
00101 #define strapERR_RETURN(error,errId,params...) \
00102 errAdd(error,STRAP,errId,__FILE__,"", ##params); \
00103 return(FAILURE);
00104
00105 #define strapERR_ADD(error,errId,params...) \
00106 errAdd(error,STRAP,errId,__FILE__,"", ##params);
00107
00108
00109
00110 #define strapFITS_ONLINE 1
00111 #define strapFITS_ONLINE_FAIL 2
00112 #define strapFITS_OPEN_GATE 3
00113 #define strapFITS_CLOSE_LOOP 4
00114
00115 #define strapOPS_DICT "STRAP_OPS"
00116 #define strapCAT "STP"
00117
00118 #define strapOPS_INT(sys,param,value) \
00119 logIntParRecord (STRAP,strapOPS_DICT,strapCAT,sys,param,value)
00120
00121 #define strapOPS_STR(sys,param,value) \
00122 logStringParRecord (STRAP,strapOPS_DICT,strapCAT,sys,param,value)
00123
00124 #define strapOPS_REAL(sys,param,value) \
00125 logRealParRecord (STRAP,strapOPS_DICT,strapCAT,sys,param,value)
00126
00127 #define strapFITS_ACTION(sys,action) \
00128 logFitsAction(STRAP,strapOPS_DICT,strapCAT,sys,action)
00129
00130 #define strapFITS_ARRAY(sys,param,first,last,size,buffer) \
00131 logFitsParArray(STRAP,strapOPS_DICT,strapCAT,sys,param,first,last,size,buffer)
00132
00133 #ifdef MAKE_VXWORKS
00134 #include "strapLcu.h"
00135 #else
00136 #include "strapWs.h"
00137 #endif
00138
00139 #endif