DDS  ver. 2.0
dds-intercom-lib/src/AgentChannel.h
Go to the documentation of this file.
1 // Copyright 2014 GSI, Inc. All rights reserved.
2 //
3 //
4 //
5 
6 #ifndef __DDS__API__CAgentChannel__
7 #define __DDS__API__CAgentChannel__
8 // DDS
9 #include "ClientChannelImpl.h"
10 
11 namespace dds
12 {
13  namespace internal_api
14  {
15  struct SSyncHelper;
16 
17  class CAgentChannel : public protocol_api::CClientChannelImpl<CAgentChannel>
18  {
19  public:
21  MESSAGE_HANDLER(cmdSIMPLE_MSG, on_cmdSIMPLE_MSG)
22  MESSAGE_HANDLER(cmdSHUTDOWN, on_cmdSHUTDOWN)
23  MESSAGE_HANDLER(cmdCUSTOM_CMD, on_cmdCUSTOM_CMD)
24  // MESSAGE_HANDLER(cmdUPDATE_KEY, on_cmdUPDATE_KEY)
25  END_MSG_MAP()
26 
27  public:
28  SSyncHelper* m_syncHelper;
29 
30  public:
31  void reconnectAgentWithErrorHandler(const std::function<void(const std::string&)>& callback);
32 
33  private:
34  CAgentChannel(boost::asio::io_service& _service, uint64_t _protocolHeaderID = 0);
35 
36  std::string _remoteEndIDString()
37  {
38  return "DDS agent";
39  }
40 
41  private:
42  // Message Handlers
44  const protocol_api::SSenderInfo& _sender);
46  const protocol_api::SSenderInfo& _sender);
48  const protocol_api::SSenderInfo& _sender);
49  // bool on_cmdUPDATE_KEY(protocol_api::SCommandAttachmentImpl<protocol_api::cmdUPDATE_KEY>::ptr_t
50  // _attachment);
51 
52  uint16_t m_connectionAttempts;
53  };
54  }
55 }
56 
57 #endif /* defined(__DDS__API__CAgentChannel__) */
Definition: BaseEventHandlersImpl.h:48
Definition: dds-intercom-lib/src/AgentChannel.h:17
std::shared_ptr< SEmptyCmd > ptr_t
Definition: CommandAttachmentImpl.h:66
Definition: ProtocolCommands.h:30
Definition: ProtocolCommands.h:33
BEGIN_MSG_MAP(CAgentChannel) MESSAGE_HANDLER(cmdSIMPLE_MSG
#define END_MSG_MAP()
Definition: BaseChannelImpl.h:134
Definition: dds-agent/src/AgentConnectionManager.h:18
Definition: ProtocolCommands.h:66
void reconnectAgentWithErrorHandler(const std::function< void(const std::string &)> &callback)
Definition: dds-intercom-lib/src/AgentChannel.cpp:36
on_cmdSIMPLE_MSG MESSAGE_HANDLER(cmdSHUTDOWN, on_cmdSHUTDOWN) MESSAGE_HANDLER(cmdCUSTOM_CMD
Definition: BaseChannelImpl.h:41