source: fact/BIASctrl/ProcessIO.h@ 10038

Last change on this file since 10038 was 9917, checked in by ogrimm, 14 years ago
Initial commit of BIASctrl
File size: 1.2 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 ProcessIO: public EvidenceServer {
25
26 PixelMap *pm;
27 DimCommand *DIMCommand;
28 DimService *ConsoleOut;
29 char *ConsoleText;
30 pthread_t Thread;
31 std::vector<std::string> Parameter;
32
33 std::vector<class Crate *> Crates;
34
35 void commandHandler();
36
37 public:
38 double fTimeOut;
39 float fStatusRefreshRate;
40 unsigned int fMaxDiff;
41
42 ProcessIO();
43 ~ProcessIO();
44
45 void PrintMessage(const char *, ...);
46 bool RampVoltage(unsigned int, int, int, int);
47 void Monitor();
48 static void LaunchMonitor(ProcessIO *);
49
50 void cmd_hv();
51 void cmd_status();
52 void cmd_load(); void cmd_save();
53 void cmd_exit(); void cmd_rate();
54 void cmd_timeout(); void cmd_reset();
55 void cmd_help();
56};
57
58struct Range {
59 int Min;
60 int Max;
61};
62
63bool Match(std::string, const char *);
64bool ConvertToDouble(std::string, double *);
65bool ConvertToInt(std::string, int *);
66struct Range ConvertToRange(std::string);
67
68#endif
Note: See TracBrowser for help on using the repository browser.