1 #ifndef GCP_MEDIATOR_CONTROL_H
2 #define GCP_MEDIATOR_CONTROL_H
16 #include "gcp/control/code/unix/libunix_src/specific/rtcnetcoms.h"
20 #include "gcp/util/common/ArrayRegMapDataFrameManager.h"
21 #include "gcp/util/common/FdSet.h"
22 #include "gcp/util/common/GenericTask.h"
23 #include "gcp/util/common/Logger.h"
24 #include "gcp/util/common/LogMsgHandler.h"
25 #include "gcp/util/common/NetCommHandler.h"
26 #include "gcp/util/common/TcpClient.h"
28 #include "gcp/mediator/specific/ControlMsg.h"
29 #include "gcp/mediator/specific/TransNetCmdForwarder.h"
31 #define CONTROL_TASK_FWD_FN(fn) void (fn)(ControlMsg* msg)
46 class ReceiverControl;
106 Master* parent() {
return parent_;}
108 std::string wxHost();
149 static THREAD_START(startAntennaControl);
154 static THREAD_START(startGrabberControl);
159 static THREAD_START(startReceiverControl);
164 static THREAD_START(startWxControl);
173 static THREAD_CLEAN(cleanAntennaControl);
178 static THREAD_CLEAN(cleanGrabberControl);
183 static THREAD_CLEAN(cleanReceiverControl);
188 static THREAD_CLEAN(cleanWxControl);
197 static THREAD_PING(pingAntennaControl);
202 static THREAD_PING(pingGrabberControl);
207 static THREAD_PING(pingReceiverControl);
212 static THREAD_PING(pingWxControl);
266 void connectControl(
bool reEnable);
271 void disconnectControl();
281 void sendHeartBeat();
286 void sendControlConnectedMsg(
bool connected);
291 void sendScriptDoneMsg(
unsigned seq);
296 void sendAntennaInitMsg(
bool start);
301 static void sendNetLogMsg(std::string logStr,
bool isErr);
306 static LOG_HANDLER_FN(sendLogMsg);
312 static LOG_HANDLER_FN(sendErrMsg);
324 void respondToHeartBeat();
334 static NET_READ_HANDLER(readNetCmdHandler);
339 static NET_SEND_HANDLER(sendNetMsgHandler);
345 static NET_ERROR_HANDLER(networkErrorHandler);
352 #endif // End #ifndef
Definition: TcpClient.h:18
Definition: LogMsgHandler.h:25
Definition: NetCommHandler.h:18
Definition: RegMapDataFrameManager.h:26
Definition: GenericTask.h:33