source: hvcontrol/src/ProcessIO.h@ 57

Last change on this file since 57 was 35, checked in by lstark, 16 years ago
Calibration table (DAC - HV values) integrated
File size: 1.6 KB
Line 
1
2#ifndef PROCESSIO_H_SEEN
3#define PROCESSIO_H_SEEN
4
5#include <stdio.h>
6#include <stdlib.h>
7#include <string.h>
8#include <stdarg.h>
9#include <limits.h>
10#include <time.h>
11#include <errno.h>
12#include <unistd.h>
13#include <math.h>
14#include <pthread.h>
15#include <termios.h>
16#include <fcntl.h>
17#include <assert.h>
18#include <dirent.h>
19#include <sys/time.h>
20#include <sys/types.h>
21#include <sys/socket.h>
22#include <sys/ioctl.h>
23#include <sys/select.h>
24#include <signal.h>
25
26#include "Types.h"
27#include "HVStatus.h"
28#include "Log.h"
29#include "HVConfig.h"
30#include "HVCalib.h"
31#include "Utilities.h"
32#include "HV.h"
33
34#include <iostream>
35#include "../../fact_repos.svn/pixelmap/PixelMap.h"
36
37
38class ProcessIO {
39
40 private:
41
42 time_t StartTime;
43
44 char str[MAX_COM_SIZE];
45
46 unsigned char wbuf[BUFFER_LENGTH];
47 unsigned char rbuf[BUFFER_LENGTH];
48
49 char bdata[16];
50
51 PixelMap *pm;
52
53 public:
54
55 HVConfig* config;
56 HVCalib* calib;
57 Status* status;
58 Log* log;
59
60 pthread_mutex_t control_mutex;
61 pthread_cond_t control_cond;
62
63
64 HV *hv;
65 HVBoard *hvboard;
66
67
68 ProcessIO(char *config_file);
69 ~ProcessIO();
70
71 void Scan();
72 void PrintHelp();
73 void PrintDateAndTime();
74 void DoPrompt(char* str);
75 void PrintMessage(char* str);
76 void PrintMessageToLog(char *str);
77 void PrintMessageO(char *Format, ...);
78 int CommandControl();
79 int NBoards();
80 int InitializeHV();
81 void UpdateStatus(int i, unsigned char* rbuf);
82 void StartMonitor();
83 void StopMonitor();
84 void Monitor();
85 void ResetActiveBoards();
86 void ResetAllBoards();
87 void ResetBoard(int i);
88 int SaveHVSettings(char* filename);
89 int IsBoard(int i);
90 int GetBoardIdx(int board);
91
92};
93
94#endif
Note: See TracBrowser for help on using the repository browser.