DDS  ver. 3.4
BinaryAttachmentCmd.h
Go to the documentation of this file.
1 // Copyright 2014 GSI, Inc. All rights reserved.
2 //
3 //
4 //
5 #ifndef __DDS__BinaryAttachmentCmd__
6 #define __DDS__BinaryAttachmentCmd__
7 
8 // DDS
9 #include "BasicCmd.h"
10 // BOOST
11 #pragma clang diagnostic push
12 #pragma clang diagnostic ignored "-Wdeprecated-register"
13 #include <boost/uuid/uuid.hpp>
14 #include <boost/uuid/uuid_io.hpp>
15 #pragma clang diagnostic pop
16 
17 namespace dds
18 {
19  namespace protocol_api
20  {
21  struct SBinaryAttachmentCmd : public SBasicCmd<SBinaryAttachmentCmd>
22  {
24  size_t size() const;
25  void _convertFromData(const MiscCommon::BYTEVector_t& _data);
26  void _convertToData(MiscCommon::BYTEVector_t* _data) const;
27  bool operator==(const SBinaryAttachmentCmd& _val) const;
28 
29  boost::uuids::uuid m_fileId;
30  uint32_t m_offset;
31  uint32_t m_size;
32  uint32_t m_crc32;
34  };
35  std::ostream& operator<<(std::ostream& _stream, const SBinaryAttachmentCmd& _val);
36  bool operator!=(const SBinaryAttachmentCmd& lhs, const SBinaryAttachmentCmd& rhs);
37  } // namespace protocol_api
38 }; // namespace dds
39 
40 #endif /* defined(__DDS__BasicCmd__) */
Definition: BasicCmd.h:481
boost::uuids::uuid m_fileId
Unique ID of the file.
Definition: BinaryAttachmentCmd.h:29
bool operator==(const SBinaryAttachmentCmd &_val) const
Definition: BinaryAttachmentCmd.cpp:25
uint32_t m_size
Size of this piece of binary data.
Definition: BinaryAttachmentCmd.h:31
Definition: BinaryAttachmentCmd.h:21
Definition: AgentConnectionManager.h:13
std::ostream & operator<<(std::ostream &_stream, const SAgentsInfoCmd &_val)
Definition: AgentsInfoCmd.cpp:38
uint32_t m_crc32
CRC checksum of this piece of binary data.
Definition: BinaryAttachmentCmd.h:32
uint32_t m_offset
Offset for this piece of binary data.
Definition: BinaryAttachmentCmd.h:30
SBinaryAttachmentCmd()
Definition: BinaryAttachmentCmd.cpp:11
bool operator!=(const SAgentsInfoCmd &_lhs, const SAgentsInfoCmd &_rhs)
Definition: AgentsInfoCmd.cpp:43
MiscCommon::BYTEVector_t m_data
Piece of binary data.
Definition: BinaryAttachmentCmd.h:33
std::vector< unsigned char > BYTEVector_t
An STL vector of bytes.
Definition: def.h:127
void _convertFromData(const MiscCommon::BYTEVector_t &_data)
Definition: BinaryAttachmentCmd.cpp:36
void _convertToData(MiscCommon::BYTEVector_t *_data) const
Definition: BinaryAttachmentCmd.cpp:41
size_t size() const
Definition: BinaryAttachmentCmd.cpp:20