DDS  ver. 1.6
TestChannel.h
Go to the documentation of this file.
1 // Copyright 2014 GSI, Inc. All rights reserved.
2 //
3 //
4 //
5 #ifndef __DDS__TestChannel__
6 #define __DDS__TestChannel__
7 // DDS
8 #include "ClientChannelImpl.h"
9 #include "Options.h"
10 
11 namespace dds
12 {
13  namespace test_cmd
14  {
16  {
17  CTestChannel(boost::asio::io_service& _service)
18  : CClientChannelImpl<CTestChannel>(_service, protocol_api::EChannelType::UI)
19  {
22  LOG(MiscCommon::info) << "The Agent [" << this->socket().remote_endpoint().address().to_string()
23  << "] has closed the connection.";
24  });
25 
27  [this](CTestChannel* _channel) { pushMsg<protocol_api::cmdTRANSPORT_TEST>(); });
28  }
29 
31 
32  public:
34  MESSAGE_HANDLER(cmdSIMPLE_MSG, on_cmdSIMPLE_MSG)
35  MESSAGE_HANDLER(cmdSHUTDOWN, on_cmdSHUTDOWN)
36  MESSAGE_HANDLER(cmdPROGRESS, on_cmdPROGRESS)
38 
39  void setOptions(const SOptions& _options)
40  {
41  m_options = _options;
42  }
43 
44  private:
45  // Message Handlers
49 
50  private:
51  SOptions m_options;
52  };
53  }
54 }
55 #endif /* defined(__DDS__TalkToAgent__) */
#define REGISTER_DEFAULT_REMOTE_ID_STRING
Definition: BaseChannelImpl.h:133
dds-getlog&#39;s container of options
Definition: dds-test/src/Options.h:23
Definition: TestChannel.h:15
Definition: BaseChannelImpl.h:148
std::shared_ptr< SEmptyCmd > ptr_t
Definition: CommandAttachmentImpl.h:65
Definition: ProtocolCommands.h:29
#define LOG(severity)
Definition: Logger.h:54
Definition: ProtocolCommands.h:58
Definition: ProtocolCommands.h:32
Definition: ChannelEventsImpl.h:21
Definition: dds-agent/src/AgentConnectionManager.h:16
connection_t subscribeOnEvent(EChannelEvents _type, typename signal_t::slot_function_type _subscriber)
Definition: ChannelEventsImpl.h:45
on_cmdSIMPLE_MSG MESSAGE_HANDLER(cmdSHUTDOWN, on_cmdSHUTDOWN) MESSAGE_HANDLER(cmdPROGRESS
BEGIN_MSG_MAP(CTestChannel) MESSAGE_HANDLER(cmdSIMPLE_MSG
Definition: BaseChannelImpl.h:40
boost::asio::ip::tcp::socket & socket()
Definition: BaseChannelImpl.h:265
Definition: ChannelEventsImpl.h:20
Definition: def.h:150
on_cmdSIMPLE_MSG on_cmdPROGRESS END_MSG_MAP() void setOptions(const SOptions &_options)
Definition: TestChannel.h:37