DDS  ver. 3.6
ReplyCmd.h
Go to the documentation of this file.
1 // Copyright 2014 GSI, Inc. All rights reserved.
2 //
3 //
4 //
5 #ifndef __DDS__ReplyCmd__
6 #define __DDS__ReplyCmd__
7 
8 // DDS
9 #include "BasicCmd.h"
10 
11 namespace dds
12 {
13  namespace protocol_api
14  {
15  struct SReplyCmd : public SBasicCmd<SReplyCmd>
16  {
17  enum class EStatusCode : uint16_t
18  {
19  OK = 1,
20  ERROR
21  };
22 
23  SReplyCmd();
24  SReplyCmd(const std::string& _msg, uint16_t _statusCode, uint16_t _returnCode, uint16_t _srcCommand);
25  size_t size() const;
26  void _convertFromData(const dds::misc::BYTEVector_t& _data);
27  void _convertToData(dds::misc::BYTEVector_t* _data) const;
28  bool operator==(const SReplyCmd& val) const;
29 
30  uint16_t m_statusCode;
31  uint16_t m_returnCode;
32  uint16_t m_srcCommand;
33  std::string m_sMsg;
34  };
35  std::ostream& operator<<(std::ostream& _stream, const SReplyCmd& val);
36  bool operator!=(const SReplyCmd& lhs, const SReplyCmd& rhs);
37  } // namespace protocol_api
38 } // namespace dds
39 
40 #endif /* defined(__DDS__ReplyCmd__) */
void _convertFromData(const dds::misc::BYTEVector_t &_data)
Definition: ReplyCmd.cpp:39
Definition: BasicCmd.h:475
size_t size() const
Definition: ReplyCmd.cpp:28
uint16_t m_returnCode
Definition: ReplyCmd.h:31
uint16_t m_srcCommand
Definition: ReplyCmd.h:32
bool operator==(const SReplyCmd &val) const
Definition: ReplyCmd.cpp:33
Definition: ReplyCmd.h:15
uint16_t m_statusCode
Definition: ReplyCmd.h:30
SReplyCmd()
Definition: ReplyCmd.cpp:12
std::vector< unsigned char > BYTEVector_t
An STL vector of bytes.
Definition: def.h:124
std::string m_sMsg
Definition: ReplyCmd.h:33
EStatusCode
Definition: ReplyCmd.h:17
Miscellaneous functions and helpers are located here.
Definition: AgentConnectionManager.h:13
std::ostream & operator<<(std::ostream &_stream, const SAgentsInfoCmd &_val)
Definition: AgentsInfoCmd.cpp:38
bool operator!=(const SAgentsInfoCmd &_lhs, const SAgentsInfoCmd &_rhs)
Definition: AgentsInfoCmd.cpp:43
void _convertToData(dds::misc::BYTEVector_t *_data) const
Definition: ReplyCmd.cpp:44