RtpsSampleHeader.inl

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00009 
00010 namespace OpenDDS {
00011 namespace DCPS {
00012 
00013 ACE_INLINE
00014 RtpsSampleHeader::RtpsSampleHeader()
00015   : valid_(false)
00016   , frag_(false)
00017   , marshaled_size_(0)
00018   , message_length_(0)
00019 {
00020 }
00021 
00022 ACE_INLINE
00023 RtpsSampleHeader::RtpsSampleHeader(ACE_Message_Block& mb)
00024   : valid_(false)
00025   , frag_(false)
00026   , marshaled_size_(0)
00027   , message_length_(0)
00028 {
00029   init(mb);
00030 }
00031 
00032 ACE_INLINE RtpsSampleHeader&
00033 RtpsSampleHeader::operator=(ACE_Message_Block& mb)
00034 {
00035   frag_ = false;
00036   valid_ = false;
00037   // message_length_ should not be reset here
00038   // marshaled_size_ doesn't need to be reset, init() will set it (if valid_)
00039   init(mb);
00040   return *this;
00041 }
00042 
00043 ACE_INLINE bool
00044 RtpsSampleHeader::valid() const
00045 {
00046   return valid_;
00047 }
00048 
00049 ACE_INLINE void
00050 RtpsSampleHeader::pdu_remaining(size_t size)
00051 {
00052   message_length_ = size;
00053 }
00054 
00055 ACE_INLINE size_t
00056 RtpsSampleHeader::marshaled_size()
00057 {
00058   return marshaled_size_;
00059 }
00060 
00061 ACE_INLINE ACE_UINT32
00062 RtpsSampleHeader::message_length()
00063 {
00064   return static_cast<ACE_UINT32>(message_length_);
00065 }
00066 
00067 ACE_INLINE bool
00068 RtpsSampleHeader::more_fragments() const
00069 {
00070   return frag_;
00071 }
00072 
00073 ACE_INLINE bool
00074 RtpsSampleHeader::control_message_supported(char message_id)
00075 {
00076   switch (message_id) {
00077   case INSTANCE_REGISTRATION:
00078   case UNREGISTER_INSTANCE:
00079   case DISPOSE_INSTANCE:
00080   case DISPOSE_UNREGISTER_INSTANCE:
00081     return true;
00082   default:
00083     return false;
00084   }
00085 }
00086 
00087 }
00088 }
00089 
00090 OPENDDS_END_VERSIONED_NAMESPACE_DECL
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1