fdhwlib
2.0.25
|
00001 /*************************************************************************** 00002 Subrack.h - description 00003 00004 begin : Thu Jun 29 2000 00005 copyright : (C) 2000 by Andreas Kopmann 00006 email : kopmann@hpe.fzk.de 00007 ***************************************************************************/ 00008 00009 00010 #if defined (_MSC_VER) && (_MSC_VER >= 1000) 00011 #pragma once 00012 #endif 00013 #ifndef _INC_SUBRACK_385640CA0093_INCLUDED 00014 #define _INC_SUBRACK_385640CA0093_INCLUDED 00015 00016 00017 00018 #define SUBRACK_VER 100 00019 00020 #include <cstdio> 00021 00022 #include <akutil/akinifile.h> 00023 00024 #include <Hw/subrackbase.h> 00025 00026 #include <Hw/Slt.h> 00027 #include <Hw/Flt.h> 00028 00029 00030 // --- forward declaration(s) 00031 00032 class SimpleSocket; 00033 00034 class Slt; 00035 class Flt; 00036 00064 //##ModelId=3991220A01C6 00065 class Subrack : public SubrackBase { 00066 00067 public: 00075 Subrack(const char *inifile="FE.ini",int mode=0); 00076 00077 //~Subrack(); 00078 00079 00082 //unsigned long checkSlot(); 00083 00086 //bool checkSlot(int slot); 00087 00092 //bool isPresent(int slot); 00093 00094 //unsigned long isPresent(); 00095 00099 void reset(); 00100 00104 void configure(); 00105 00113 void dumpRegisters(FILE *fout=stdout, int cols = 8); 00114 00115 00148 void init(FILE *fout, char *inifile); 00149 00154 #ifdef __linux__ 00155 int handleErrors(); 00156 #endif 00157 00160 #ifdef __linux__ 00161 int closeHandler(); 00162 #endif 00163 00164 Slt * theSlt; 00165 00166 Flt * theFlt[20]; 00167 00168 00169 //protected: 00171 int initIRHandler(const char *inifile=""); 00172 00174 int closeIRHandler(); 00175 00177 int waitForInterrupt(unsigned long *irVector); 00178 00179 00191 int testFltConfig(FILE *fout, int level=1, bool header=false); 00192 00197 int testFltStatistic(FILE *fout, int level=1, bool header=false); 00198 00199 00202 int testFltHitrateController(FILE *fout, int level=1, bool useStat=false, bool header=false); 00203 00204 00206 int testSltConfiguration(FILE *fout, int level=1, bool header=true); 00207 00208 private: 00209 00210 SimpleSocket *s; 00211 00212 #ifdef __linux__ 00213 pid_t pHandler; 00214 #endif 00215 00216 //bool initPbus; 00217 00219 float meanADCVar; 00220 00221 }; 00222 00223 #endif /* _INC_SUBRACK_385640CA0093_INCLUDED */ 00224