source: fact/tools/FSC/simple_daq/simple_daq.h@ 15461

Last change on this file since 15461 was 10918, checked in by neise, 13 years ago
File size: 839 bytes
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
25class SimpleDaqConfiguration {
26public:
27 char FADIPAddress[IP_ADDR_LENGTH];
28 char outfilepath[200];
29 char outfilename[50];
30 char outfileext[10];
31};
32
33void cmd_send (const char* Buffer, int Socket); // Send commands to socket
34void int_handler (int sig); // Handle signal SIGINT (CTRL-C)
35void exit_program (int exit_status); // Cleanup and exit
36SimpleDaqConfiguration *getConfig (const char *path, int verbose = 0);
37
38#endif /*SOCKETCLIENT_H_*/
Note: See TracBrowser for help on using the repository browser.