| Line | |
|---|
| 1 | #ifndef SOCKETCLIENT_H_
|
|---|
| 2 | #define SOCKETCLIENT_H_
|
|---|
| 3 |
|
|---|
| 4 | #include <stdlib.h>
|
|---|
| 5 | #include <string.h>
|
|---|
| 6 | #include <stdio.h>
|
|---|
| 7 | #include <unistd.h>
|
|---|
| 8 | #include <sys/socket.h>
|
|---|
| 9 | #include <arpa/inet.h>
|
|---|
| 10 | #include <netdb.h>
|
|---|
| 11 | #include <signal.h>
|
|---|
| 12 |
|
|---|
| 13 | #define MAX_COM_SIZE 476
|
|---|
| 14 | #define IP_ADDR_LENGTH 16
|
|---|
| 15 |
|
|---|
| 16 | #define FIRST_PORT 5000
|
|---|
| 17 | #define NUMBER_OF_SOCKETS 1
|
|---|
| 18 | #define CONFIG_FILE_PATH "./config.txt"
|
|---|
| 19 |
|
|---|
| 20 | // Commands for Board
|
|---|
| 21 | // to be done
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 | class SimpleDaqConfiguration {
|
|---|
| 26 | public:
|
|---|
| 27 | char FADIPAddress[IP_ADDR_LENGTH];
|
|---|
| 28 | char outfilepath[200];
|
|---|
| 29 | char outfilename[50];
|
|---|
| 30 | char outfileext[10];
|
|---|
| 31 | };
|
|---|
| 32 |
|
|---|
| 33 | void cmd_send (const char* Buffer, int Socket); // Send commands to socket
|
|---|
| 34 | void int_handler (int sig); // Handle signal SIGINT (CTRL-C)
|
|---|
| 35 | void exit_program (int exit_status); // Cleanup and exit
|
|---|
| 36 | SimpleDaqConfiguration *getConfig (const char *path, int verbose = 0);
|
|---|
| 37 |
|
|---|
| 38 | #endif /*SOCKETCLIENT_H_*/
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.