DDS  ver. 3.6
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 #include <boost/uuid/uuid.hpp>
12 #include <boost/uuid/uuid_io.hpp>
13 
14 namespace dds
15 {
16  namespace protocol_api
17  {
18  struct SBinaryAttachmentCmd : public SBasicCmd<SBinaryAttachmentCmd>
19  {
21  size_t size() const;
22  void _convertFromData(const dds::misc::BYTEVector_t& _data);
23  void _convertToData(dds::misc::BYTEVector_t* _data) const;
24  bool operator==(const SBinaryAttachmentCmd& _val) const;
25 
26  boost::uuids::uuid m_fileId;
27  uint32_t m_offset;
28  uint32_t m_size;
29  uint32_t m_crc32;
31  };
32  std::ostream& operator<<(std::ostream& _stream, const SBinaryAttachmentCmd& _val);
33  bool operator!=(const SBinaryAttachmentCmd& lhs, const SBinaryAttachmentCmd& rhs);
34  } // namespace protocol_api
35 }; // namespace dds
36 
37 #endif /* defined(__DDS__BasicCmd__) */
Definition: BasicCmd.h:475
boost::uuids::uuid m_fileId
Unique ID of the file.
Definition: BinaryAttachmentCmd.h:26
void _convertToData(dds::misc::BYTEVector_t *_data) const
Definition: BinaryAttachmentCmd.cpp:42
bool operator==(const SBinaryAttachmentCmd &_val) const
Definition: BinaryAttachmentCmd.cpp:26
uint32_t m_size
Size of this piece of binary data.
Definition: BinaryAttachmentCmd.h:28
Definition: BinaryAttachmentCmd.h:18
std::vector< unsigned char > BYTEVector_t
An STL vector of bytes.
Definition: def.h:124
Miscellaneous functions and helpers are located here.
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:29
uint32_t m_offset
Offset for this piece of binary data.
Definition: BinaryAttachmentCmd.h:27
SBinaryAttachmentCmd()
Definition: BinaryAttachmentCmd.cpp:12
bool operator!=(const SAgentsInfoCmd &_lhs, const SAgentsInfoCmd &_rhs)
Definition: AgentsInfoCmd.cpp:43
dds::misc::BYTEVector_t m_data
Piece of binary data.
Definition: BinaryAttachmentCmd.h:30
void _convertFromData(const dds::misc::BYTEVector_t &_data)
Definition: BinaryAttachmentCmd.cpp:37
size_t size() const
Definition: BinaryAttachmentCmd.cpp:21