My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
GrabberControl.h
Go to the documentation of this file.
1 #ifndef GCP_ASSEMBLER_GRABBERCONTROL_H
2 #define GCP_ASSEMBLER_GRABBERCONTROL_H
3 
11 #include "gcp/util/specific/Directives.h"
12 #include "gcp/util/common/GenericTask.h"
13 #include "gcp/util/common/LogMsgHandler.h"
14 #include "gcp/util/common/NetCommHandler.h"
15 #include "gcp/util/common/NetStr.h"
16 #include "gcp/util/common/TcpListener.h"
17 
18 #include "gcp/mediator/specific/GrabberControlMsg.h"
19 
20 namespace gcp {
21 namespace mediator {
22 
27  class Control;
28 
33  public gcp::util::GenericTask<GrabberControlMsg> {
34 
35  public:
36 
40  GrabberControl(Control* parent);
41 
45  virtual ~GrabberControl();
46 
47  private:
48 
52  friend class Control;
53 
54  Control* parent_;
55 
60  gcp::util::TcpListener* listener_;
61 
65  gcp::util::NetCommHandler netHandler_;
66 
67  gcp::util::LogMsgHandler logMsgHandler_;
68 
74  void processMsg(GrabberControlMsg* taskMsg);
75 
79  static NET_READ_HANDLER(netMsgReadHandler);
80 
84  static NET_SEND_HANDLER(netCmdSentHandler);
85 
89  static NET_ERROR_HANDLER(netErrorHandler);
90 
94  void connectGrabber();
95 
99  void disconnectGrabber();
100 
104  void serviceMsgQ();
105 
109  void sendRtcNetCmd(GrabberControlMsg* msg);
110 
114  void readNetMsg();
115 
119  void bufferLogMsg(gcp::util::NetMsg* msg);
120 
125  void forwardNetMsg(gcp::util::NetMsg* msg);
126 
130  void processNetMsg();
131 
135  void listen(bool restartListening);
136 
137  }; // End class GrabberControl
138 
139 } // End namespace mediator
140 } // End namespace gcp
141 
142 #endif // End #ifndef
143 
144 
virtual ~GrabberControl()
Definition: GrabberControl.cc:35
Definition: GrabberControl.h:32
Definition: GrabberControlMsg.h:21
GrabberControl(Control *parent)
Definition: GrabberControl.cc:23
Definition: NetMsg.h:26
Definition: TcpListener.h:14
Definition: Control.h:53
Definition: LogMsgHandler.h:25
Definition: NetCommHandler.h:18
Definition: GenericTask.h:33