Last change
on this file since 20 was 14, checked in by lstark, 16 years ago |
first version of hvcontrol added
|
File size:
1.5 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 "Utilities.h"
|
---|
31 | #include "HV.h"
|
---|
32 |
|
---|
33 |
|
---|
34 | class ProcessIO {
|
---|
35 |
|
---|
36 | private:
|
---|
37 |
|
---|
38 | time_t StartTime;
|
---|
39 |
|
---|
40 | char str[MAX_COM_SIZE];
|
---|
41 |
|
---|
42 | unsigned char wbuf[BUFFER_LENGTH];
|
---|
43 | unsigned char rbuf[BUFFER_LENGTH];
|
---|
44 |
|
---|
45 | char bdata[16];
|
---|
46 |
|
---|
47 | public:
|
---|
48 |
|
---|
49 | HVConfig* config;
|
---|
50 | Status* status;
|
---|
51 | Log* log;
|
---|
52 |
|
---|
53 | pthread_mutex_t control_mutex;
|
---|
54 | pthread_cond_t control_cond;
|
---|
55 |
|
---|
56 |
|
---|
57 | HV *hv;
|
---|
58 | HVBoard *hvboard;
|
---|
59 |
|
---|
60 |
|
---|
61 | ProcessIO(char *config_file);
|
---|
62 | ~ProcessIO();
|
---|
63 |
|
---|
64 | void Scan();
|
---|
65 | void PrintHelp();
|
---|
66 | void PrintDateAndTime();
|
---|
67 | void DoPrompt(char* str);
|
---|
68 | void PrintMessage(char* str);
|
---|
69 | void PrintMessageToLog(char *str);
|
---|
70 | void PrintMessageO(char *Format, ...);
|
---|
71 | int CommandControl();
|
---|
72 | int NBoards();
|
---|
73 | int InitializeHV();
|
---|
74 | void UpdateStatus(int i, unsigned char* rbuf);
|
---|
75 | void StartMonitor();
|
---|
76 | void StopMonitor();
|
---|
77 | void Monitor();
|
---|
78 | void ResetActiveBoards();
|
---|
79 | void ResetAllBoards();
|
---|
80 | void ResetBoard(int i);
|
---|
81 | int SaveHVSettings(char* filename);
|
---|
82 | int IsBoard(int i);
|
---|
83 | int GetBoardIdx(int board);
|
---|
84 |
|
---|
85 | };
|
---|
86 |
|
---|
87 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.