iCub-main
portthread.h
Go to the documentation of this file.
1 #ifndef PORTTHREAD_H
2 #define PORTTHREAD_H
3 
4 #include <QThread>
5 
6 #include <string>
7 #include <sstream>
8 #include <iomanip> // io manipulator (setw, setfill)
9 #include <cstdarg>
10 //#include <cstdlib>
11 #include <math.h>
12 #include <vector>
13 
14 
15 #include <yarp/os/Time.h>
16 #include <yarp/os/Port.h>
17 #include <yarp/os/BufferedPort.h>
18 #include <yarp/os/Bottle.h>
19 #include <yarp/sig/Vector.h>
20 #include <yarp/os/Network.h>
21 #include <yarp/os/RFModule.h>
22 
24 
25 using namespace std;
26 using namespace yarp::os;
27 using namespace yarp::sig;
28 using namespace iCub::skinManager;
29 
30 class PortThread : public QThread
31 {
32  Q_OBJECT
33 public:
34  explicit PortThread(QObject *parent = 0);
35  void closePorts();
36  void stop();
37  Bottle sendRpcCommand(bool responseExpected, SkinManagerCommand cmd);
38 
39 protected:
40  void run();
41 
42 public:
43  Port *guiRpcPort; // to send rpc command to the module
44  BufferedPort<Vector> *driftCompMonitorPort; // for reading streaming data (frequency, drift)
45  BufferedPort<Bottle> *driftCompInfoPort; // for reading sporadic msgs (errors, warnings)
46 
47 signals:
48 
49  void portCreated();
50  void openErrorDialog(QString);
51 
52 public slots:
53 
54 };
55 
56 #endif // PORTTHREAD_H
void portCreated()
Port * guiRpcPort
Definition: portthread.h:43
void openErrorDialog(QString)
BufferedPort< Vector > * driftCompMonitorPort
Definition: portthread.h:44
BufferedPort< Bottle > * driftCompInfoPort
Definition: portthread.h:45
cmd
Definition: dataTypes.h:30