#include <chrono>
#include <deque>
#include <iostream>
#include <map>
#include <memory>
#include <mutex>
#include <boost/asio.hpp>
#include <boost/date_time.hpp>
#include <boost/interprocess/ipc/message_queue.hpp>
#include <boost/noncopyable.hpp>
#include <boost/thread/thread.hpp>
#include "ChannelEventHandlersImpl.h"
#include "ChannelMessageHandlersImpl.h"
#include "CommandAttachmentImpl.h"
#include "Logger.h"
Go to the source code of this file.
◆ BEGIN_SM_MSG_MAP
#define BEGIN_SM_MSG_MAP |
( |
|
theClass | ) |
|
Value:public: \
friend protocol_api::CBaseSMChannelImpl<theClass>; \
void processMessage(protocol_api::CProtocolMessage::protocolMessagePtr_t _currentMsg) \
{ \
if (!m_started) \
return; \
\
ECmdType currentCmd = static_cast<ECmdType>(_currentMsg->header().m_cmd); \
SSenderInfo sender; \
sender.m_ID = _currentMsg->header().m_ID; \
\
try \
{ \
switch (currentCmd) \
{
Definition: AgentsInfoCmd.h:12
Miscellaneous functions and helpers are located here.
Definition: AgentConnectionManager.h:13
◆ END_SM_MSG_MAP
#define END_SM_MSG_MAP |
( |
| ) |
|
Value:default: \
LOG(
dds::misc::error) <<
"The received SM message doesn't have a handler: " << _currentMsg->toString(); \
} \
} \
catch (std::exception & _e) \
{ \
} \
}
◆ SM_MESSAGE_HANDLER
#define SM_MESSAGE_HANDLER |
( |
|
msg, |
|
|
|
func |
|
) |
| |
Value:case msg: \
{ \
bool processed = func(attachmentPtr, sender); \
if (!processed) \
{ \
if (!handlerExists(msg)) \
{ \
LOG(
dds::misc::error) <<
"The received message was not processed and has no registered handler: " \
<< _currentMsg->toString(); \
} \
else \
{ \
dispatchHandlers(msg, sender, attachmentPtr); \
} \
} \
break; \
}
std::shared_ptr< SEmptyCmd > ptr_t
Definition: CommandAttachmentImpl.h:64
static ptr_t decode(CProtocolMessage::protocolMessagePtr_t)
Definition: CommandAttachmentImpl.h:66
◆ SM_MESSAGE_HANDLER_DISPATCH
#define SM_MESSAGE_HANDLER_DISPATCH |
( |
|
msg | ) |
|
Value:case msg: \
{ \
if (!handlerExists(msg)) \
{ \
LOG(
dds::misc::error) <<
"The received message can't be dispatched, it has no registered handler: " \
<< _currentMsg->toString(); \
} \
else \
{ \
dispatchHandlers<>(msg, sender, attachmentPtr); \
} \
break; \
}
std::shared_ptr< SEmptyCmd > ptr_t
Definition: CommandAttachmentImpl.h:64
static ptr_t decode(CProtocolMessage::protocolMessagePtr_t)
Definition: CommandAttachmentImpl.h:66
◆ SM_RAW_MESSAGE_HANDLER
#define SM_RAW_MESSAGE_HANDLER |
( |
|
theClass, |
|
|
|
func |
|
) |
| |