Electric Tiger DAQ  1.0.0
Data Acquisition Software for the Electric Tiger Experiment
qsocketintermitten.h
1 #ifndef QSOCKETINTERMITTEN_H
2 #define QSOCKETINTERMITTEN_H
3 
4 //C System-Headers
5 //
6 //C++ System headers
7 //
8 //Boost Headers
9 //
10 //Qt Headers
11 #include <QObject>
12 #include <QTcpSocket>
13 #include <QUdpSocket>
14 #include <QDataStream>
15 //Project specific headers
16 //
17 
18 class QSocketIntermitten : public QObject {
19 
20  public:
21  explicit QSocketIntermitten( std::string host_name, uint port_number, QObject *parent = 0 );
23 
24  void OpenConnection();
25  void CloseConnection();
26 
27  void Send( std::string command, std::string terminator="\n" );
28  void SendScl( std::string command );
29 
30  std::string Receive();
31  std::string ReceiveSafe();
32 
33  private:
34  QString ip_addr;
35  uint port;
36  bool connection_open = false;
37 
38  QTcpSocket *socket;
39 
40 };
41 
42 #endif // QSOCKETINTERMITTEN_H
Definition: qsocketintermitten.h:18