OpenDDS  Snapshot(2023/04/28-20:55)
RtpsSampleHeader.inl
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
9 
10 namespace OpenDDS {
11 namespace DCPS {
12 
15  : valid_(false)
16  , frag_(false)
17  , data_(false)
18  , serialized_size_(0)
19  , message_length_(0)
20 {
21 }
22 
25  : valid_(false)
26  , frag_(false)
27  , data_(false)
28  , serialized_size_(0)
29  , message_length_(0)
30 {
31  init(mb);
32 }
33 
36 {
37  valid_ = false;
38  frag_ = false;
39  data_ = false;
40  // message_length_ should not be reset here
41  // serialized_size_ doesn't need to be reset, init() will set it (if valid_)
42  init(mb);
43  return *this;
44 }
45 
46 ACE_INLINE bool
48 {
49  return valid_;
50 }
51 
52 ACE_INLINE void
54 {
55  message_length_ = size;
56 }
57 
58 ACE_INLINE size_t
60 {
61  return serialized_size_;
62 }
63 
64 ACE_INLINE ACE_UINT32
66 {
67  return static_cast<ACE_UINT32>(message_length_);
68 }
69 
70 ACE_INLINE bool
72 {
73  return frag_;
74 }
75 
76 ACE_INLINE bool
78 {
79  switch (message_id) {
82  case DISPOSE_INSTANCE:
84  return true;
85  default:
86  return false;
87  }
88 }
89 
90 }
91 }
92 
static bool control_message_supported(char message_id)
RtpsSampleHeader & operator=(ACE_Message_Block &mn)
Adapt the TransportReceiveStrategy for RTPS&#39;s "sample" (submessage) Header.
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
#define ACE_INLINE
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
void init(ACE_Message_Block &mb)