fdhwlib
2.0.25
|
00001 /*************************************************************************** 00002 tsbackgroundreader.h - description 00003 00004 begin : Thu Oct 31 2002 00005 copyright : (C) 2002 by A Kopmann 00006 email : kopmann@ipe.fzk.de 00007 status : 00008 test : 00009 history : 00010 ***************************************************************************/ 00011 00012 00013 #ifndef TSBACKGROUNDREADER_H 00014 #define TSBACKGROUNDREADER_H 00015 00016 #include <cstdio> 00017 #include <string> 00018 00019 #define BGLOOP_PORT 5103 00020 00021 00022 class procDuration; 00023 class SimpleSocket; 00024 class Subrack; 00025 class keyboard; 00026 00051 class TsBackgroundReader { 00052 public: 00053 TsBackgroundReader(); 00054 ~TsBackgroundReader(); 00055 00062 void getParameter(int telId, FILE *fout=0); 00063 00068 void setParameter(FILE *fout=0, float tSample = 5.0, int select=0, int telescope=0); 00069 00073 void record(bool interactive = 0); 00074 00079 void wait(keyboard *kb = 0); 00080 00081 int connect(std::string ipaddr, int port=BGLOOP_PORT); 00082 void disconnect(); 00083 00085 int shutdown(); 00086 00087 //void remoteCall(short cmdid, unsigned long *args, short argc, 00088 // unsigned long *data, short ndata, 00089 // unsigned long *ackn, short len); 00090 00091 private: 00092 00093 FILE *fout; 00094 00095 bool connected; 00096 SimpleSocket *sock; 00097 00098 bool running; 00099 00100 00101 procDuration tRef; 00102 00103 float tSample; 00104 00105 int select; 00106 00107 int telescope; 00108 00109 std::string ipaddr; 00110 00111 int port; 00112 00113 }; 00114 00115 #endif