Last change
on this file since 9472 was 200, checked in by ogrimm, 15 years ago |
Added vchvtest to repository
|
-
Property svn:executable
set to
*
|
File size:
1.1 KB
|
Line | |
---|
1 | #ifndef HV_H_SEEN
|
---|
2 | #define HV_H_SEEN
|
---|
3 |
|
---|
4 | #include <stdio.h>
|
---|
5 | #include <stdlib.h>
|
---|
6 | #include <string.h>
|
---|
7 | #include <errno.h>
|
---|
8 |
|
---|
9 | #include <termios.h> // POSIX terminal control definitions
|
---|
10 | #include <fcntl.h> // File control definitions
|
---|
11 | #include <unistd.h>
|
---|
12 | #include <sys/ioctl.h>
|
---|
13 |
|
---|
14 | #define MAX_COM_SIZE 1000 // Maximum text buffer size
|
---|
15 | #define RBUF_LEN 10 // Maximum read buffer length
|
---|
16 | #define BAUDRATE B115200 // Baudrate for serial communication
|
---|
17 |
|
---|
18 | #define MAX_NUM_BOARDS 13 // Maximum number of boards per crate
|
---|
19 | #define NUM_CHANNELS 32 // Channels per bias board
|
---|
20 |
|
---|
21 | class HVBoard {
|
---|
22 |
|
---|
23 | public:
|
---|
24 | HVBoard(int, char *);
|
---|
25 | ~HVBoard();
|
---|
26 |
|
---|
27 | struct {
|
---|
28 | int BoardNumber;
|
---|
29 | bool WrapOK;
|
---|
30 | int WrapCounter;
|
---|
31 | bool Acknowledge;
|
---|
32 | int Current;
|
---|
33 | bool Overcurrent;
|
---|
34 | bool Reset;
|
---|
35 | } Status;
|
---|
36 |
|
---|
37 | int fDescriptor;
|
---|
38 | int LastWrapCount;
|
---|
39 | double fTimeOut; // [s] timeout to return from read
|
---|
40 |
|
---|
41 | char *BoardName;
|
---|
42 | int BoardNumber;
|
---|
43 |
|
---|
44 | int SystemReset();
|
---|
45 | int ReadChannel(int, int);
|
---|
46 | int GlobalSet(int);
|
---|
47 | int ChannelSet(int, int, int);
|
---|
48 | bool SynchBoard();
|
---|
49 | int Communicate(unsigned char*, int);
|
---|
50 | };
|
---|
51 |
|
---|
52 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.