5 #ifndef COMMANDATTACHMENTIMPL_H 6 #define COMMANDATTACHMENTIMPL_H 28 #define REGISTER_CMD_ATTACHMENT(_class, _cmd) \ 30 struct SCommandAttachmentImpl<_cmd> \ 32 typedef std::shared_ptr<_class> ptr_t; \ 34 static ptr_t decode(CProtocolMessage::protocolMessagePtr_t _msg) \ 36 ptr_t p = std::make_shared<_class>(); \ 37 p->convertFromData(_msg->bodyToContainer()); \ 41 static CProtocolMessage::protocolMessagePtr_t encode(const _class& _attachment, uint64_t _ID) \ 43 dds::misc::BYTEVector_t data; \ 44 _attachment.convertToData(&data); \ 45 return std::make_shared<CProtocolMessage>(_cmd, data, _ID); \ 51 namespace protocol_api
61 template <ECmdType _cmd>
64 typedef std::shared_ptr<SEmptyCmd>
ptr_t;
74 return std::make_shared<CProtocolMessage>(_cmd, data, _ID);
Definition: ProtocolCommands.h:64
Definition: ProtocolCommands.h:49
Definition: ProtocolCommands.h:61
Definition: ProtocolCommands.h:45
Definition: ProtocolCommands.h:68
Definition: ProtocolCommands.h:65
Definition: CommandAttachmentImpl.h:59
Definition: ProtocolCommands.h:48
Definition: ProtocolCommands.h:63
Definition: CommandAttachmentImpl.h:54
std::shared_ptr< SEmptyCmd > ptr_t
Definition: CommandAttachmentImpl.h:64
static CProtocolMessage::protocolMessagePtr_t encode(const SEmptyCmd &, uint64_t _ID)
Definition: CommandAttachmentImpl.h:71
Definition: ProtocolCommands.h:35
Definition: ProtocolCommands.h:58
std::vector< unsigned char > BYTEVector_t
An STL vector of bytes.
Definition: def.h:124
Definition: ProtocolCommands.h:33
Definition: ProtocolCommands.h:42
Definition: ProtocolCommands.h:32
Definition: ProtocolCommands.h:67
Miscellaneous functions and helpers are located here.
Definition: AgentConnectionManager.h:13
Definition: ProtocolCommands.h:62
Definition: ProtocolCommands.h:55
static ptr_t decode(CProtocolMessage::protocolMessagePtr_t)
Definition: CommandAttachmentImpl.h:66
Definition: ProtocolCommands.h:51
Definition: ProtocolCommands.h:44
Definition: ProtocolCommands.h:37
Definition: ProtocolCommands.h:39
REGISTER_CMD_ATTACHMENT(SVersionCmd, cmdHANDSHAKE) REGISTER_CMD_ATTACHMENT(SSimpleMsgCmd
Definition: ProtocolCommands.h:69
Definition: ProtocolCommands.h:41
Definition: ProtocolCommands.h:53
Definition: ProtocolCommands.h:40
Definition: ProtocolCommands.h:31
Definition: ProtocolCommands.h:57
std::shared_ptr< CProtocolMessage > protocolMessagePtr_t
Definition: ProtocolMessage.h:81