source: fact/BIASctrl/User.h@ 10113

Last change on this file since 10113 was 10070, checked in by ogrimm, 14 years ago
Updates to bias
File size: 1.4 KB
Line 
1
2#ifndef PROCESSIO_H_SEEN
3#define PROCESSIO_H_SEEN
4
5#include <stdarg.h>
6#include <errno.h>
7#include <math.h>
8#include <signal.h>
9#include <string>
10#include <pthread.h>
11#include <limits>
12
13#define SERVER_NAME "Bias" // Name to use in DIM
14#include "Evidence.h"
15
16#include "Crate.h"
17#include "../pixelmap/PixelMap.h"
18
19#define MAX_COM_SIZE 5000
20
21#define MIN_RATE 0.01
22#define MAX_RATE 50.0
23
24class User: public EvidenceServer {
25
26 enum RunMode {mode_static, mode_dynamic};
27
28 PixelMap *pm;
29 DimCommand *DIMCommand;
30 DimService *ConsoleOut;
31 char *ConsoleText;
32 pthread_t Thread;
33 std::vector<std::string> Parameter;
34 RunMode Mode;
35
36 std::vector<class Crate *> Crates;
37
38 void commandHandler();
39
40 struct Range {
41 int Min;
42 int Max;
43 };
44
45 bool Match(std::string, const char *);
46 bool ConvertToDouble(std::string, double *);
47 bool ConvertToInt(std::string, int *);
48 bool ConvertToRange(std::string, struct Range &);
49
50 public:
51 double fTimeOut;
52 float fStatusRefreshRate;
53 double fMaxDiff;
54
55 User();
56 ~User();
57
58 void PrintMessage(const char *, ...);
59 unsigned int RampVoltages(int, std::map<unsigned int, double>);
60 void Monitor();
61 static void LaunchMonitor(User *);
62
63 void cmd_hv(); void cmd_synch();
64 void cmd_status(); void cmd_gs();
65 void cmd_load(); void cmd_save();
66 void cmd_exit(); void cmd_rate();
67 void cmd_timeout(); void cmd_reset();
68 void cmd_help(); void cmd_ccal();
69 void cmd_mode();
70};
71
72#endif
Note: See TracBrowser for help on using the repository browser.