5 #ifndef __DDS__CAgentChannel__ 6 #define __DDS__CAgentChannel__ 14 namespace commander_cmd
22 const std::array<std::string, 3>
g_agentStates = { {
"unknown",
"idle",
"executing" } };
44 std::lock_guard<std::mutex> lock(m_mtxSlot);
45 m_slots.insert(std::make_pair(_slot.
m_id, _slot));
54 std::lock_guard<std::mutex> lock(m_mtxSlot);
55 auto it = m_slots.find(_slotID);
56 if (it == m_slots.end())
59 ss <<
"getSlotByID: slot " << _slotID <<
" does not exist.";
60 throw std::runtime_error(ss.str());
79 CAgentChannel(boost::asio::io_context& _context, uint64_t _protocolHeaderID = 0);
112 uint64_t getId()
const;
113 void setId(uint64_t _id);
124 bool on_cmdREPLY_HOST_INFO(
127 bool on_cmdBINARY_ATTACHMENT_RECEIVED(
132 bool on_cmdWATCHDOG_HEARTBEAT(
135 bool on_cmdREPLY_ADD_SLOT(
139 std::string _remoteEndIDString();
142 std::string m_sCurrentTopoFile;
144 std::mutex m_mtxInfo;
Definition: ProtocolCommands.h:66
Definition: ProtocolCommands.h:54
Definition: dds-commander/src/AgentChannel.h:77
Definition: BaseEventHandlersImpl.h:48
uint64_t taskID_t
Definition: dds-commander/src/AgentChannel.h:25
Definition: ProtocolCommands.h:61
EAgentState
Definition: dds-commander/src/AgentChannel.h:16
std::chrono::milliseconds m_startUpTime
Definition: dds-commander/src/AgentChannel.h:70
Definition: ProtocolCommands.h:65
uint64_t m_id
Definition: dds-commander/src/AgentChannel.h:68
Definition: ProtocolCommands.h:47
protocol_api::SHostInfoCmd m_remoteHostInfo
Definition: dds-commander/src/AgentChannel.h:69
std::shared_ptr< SEmptyCmd > ptr_t
Definition: CommandAttachmentImpl.h:64
slotID_t m_id
Definition: dds-commander/src/AgentChannel.h:28
protocol_api::SHostInfoCmd getRemoteHostInfo(const dds::protocol_api::SSenderInfo &_sender)
Definition: dds-commander/src/AgentChannel.cpp:70
on_cmdREPLY_HOST_INFO MESSAGE_HANDLER(cmdSUBMIT, on_cmdSUBMIT) MESSAGE_HANDLER_DISPATCH(cmdUSER_TASK_DONE) MESSAGE_HANDLER_DISPATCH(cmdGET_AGENTS_INFO) MESSAGE_HANDLER_DISPATCH(cmdGET_IDLE_AGENTS_COUNT) MESSAGE_HANDLER_DISPATCH(cmdREPLY_ID) MESSAGE_HANDLER(cmdBINARY_ATTACHMENT_RECEIVED
EAgentState m_state
Definition: dds-commander/src/AgentChannel.h:30
uint64_t slotID_t
Definition: dds-commander/src/AgentChannel.h:24
const std::array< std::string, 3 > g_agentStates
Definition: dds-commander/src/AgentChannel.h:22
Definition: ProtocolCommands.h:59
std::map< slotID_t, SSlotInfo > SlotContainer_t
Definition: dds-commander/src/AgentChannel.h:35
Definition: dds-commander/src/AgentChannel.h:26
on_cmdREPLY_HOST_INFO on_cmdBINARY_ATTACHMENT_RECEIVED on_cmdREPLY on_cmdWATCHDOG_HEARTBEAT on_cmdREPLY_ADD_SLOT END_MSG_MAP() public void setId(uint64_t _id)
Definition: dds-commander/src/AgentChannel.cpp:65
#define END_MSG_MAP()
Definition: BaseChannelImpl.h:148
Definition: ProtocolCommands.h:32
Miscellaneous functions and helpers are located here.
Definition: AgentConnectionManager.h:13
Definition: ProtocolCommands.h:62
SlotContainer_t & getSlots()
Definition: dds-commander/src/AgentChannel.h:47
Definition: ProtocolCommands.h:55
Definition: dds-commander/src/AgentChannel.h:19
Definition: ProtocolCommands.h:56
std::chrono::milliseconds getStartupTime(const dds::protocol_api::SSenderInfo &_sender)
Definition: dds-commander/src/AgentChannel.cpp:75
Definition: dds-commander/src/AgentChannel.h:33
BEGIN_MSG_MAP(CAgentChannel) MESSAGE_HANDLER(cmdREPLY_HOST_INFO
Definition: dds-commander/src/AgentChannel.h:20
on_cmdREPLY_HOST_INFO on_cmdBINARY_ATTACHMENT_RECEIVED MESSAGE_HANDLER_DISPATCH(cmdTRANSPORT_TEST) MESSAGE_HANDLER(cmdREPLY
Definition: HostInfoCmd.h:15
SSlotInfo & getSlotByID(slotID_t _slotID)
Definition: dds-commander/src/AgentChannel.h:52
Definition: BaseChannelImpl.h:37
Definition: ProtocolCommands.h:44
taskID_t m_taskID
slot ID
Definition: dds-commander/src/AgentChannel.h:29
void addSlot(const SSlotInfo &_slot)
Definition: dds-commander/src/AgentChannel.h:42
SAgentInfo & getAgentInfo()
Definition: dds-commander/src/AgentChannel.cpp:55
Definition: ProtocolCommands.h:37
Definition: ProtocolCommands.h:46
Definition: ProtocolCommands.h:69
Definition: ProtocolCommands.h:41
Definition: ProtocolCommands.h:53
Definition: dds-commander/src/AgentChannel.h:18
SAgentInfo()
Definition: dds-commander/src/AgentChannel.h:37
Definition: ProtocolCommands.h:57