00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef DCPS_RTPSTRANSPORTHEADER_H 00009 #define DCPS_RTPSTRANSPORTHEADER_H 00010 00011 #include "dds/DCPS/Definitions.h" 00012 #include "dds/DCPS/SequenceNumber.h" 00013 #include "dds/DCPS/RTPS/RtpsCoreC.h" 00014 00015 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00016 class ACE_Message_Block; 00017 ACE_END_VERSIONED_NAMESPACE_DECL 00018 00019 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00020 00021 namespace OpenDDS { 00022 namespace DCPS { 00023 00024 /// Adapt the TransportReceiveStrategy for RTPS's "transport" (message) Header 00025 struct RtpsTransportHeader { 00026 00027 static size_t max_marshaled_size(); 00028 00029 RtpsTransportHeader(); 00030 explicit RtpsTransportHeader(ACE_Message_Block& mb); 00031 RtpsTransportHeader& operator=(ACE_Message_Block& mb); 00032 00033 bool valid() const; 00034 00035 bool last_fragment(); 00036 void last_fragment(bool frag); 00037 const SequenceNumber& sequence(); 00038 00039 void init(ACE_Message_Block& mb); 00040 void incomplete(ACE_Message_Block& mb); 00041 00042 size_t length_; 00043 OpenDDS::RTPS::Header header_; 00044 bool valid_; 00045 }; 00046 00047 } 00048 } 00049 00050 OPENDDS_END_VERSIONED_NAMESPACE_DECL 00051 00052 #ifdef __ACE_INLINE__ 00053 #include "RtpsTransportHeader.inl" 00054 #endif 00055 00056 #endif 00057