RtpsSampleHeader.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef DCPS_RTPSSAMPLEHEADER_H
00009 #define DCPS_RTPSSAMPLEHEADER_H
00010
00011 #include "Rtps_Udp_Export.h"
00012
00013 #include "ace/Basic_Types.h"
00014 #include "dds/DCPS/RTPS/RtpsCoreC.h"
00015 #include "dds/DCPS/transport/framework/TransportSendControlElement.h"
00016 #include "dds/DCPS/transport/framework/TransportSendListener.h"
00017
00018 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00019 class ACE_Message_Block;
00020 ACE_END_VERSIONED_NAMESPACE_DECL
00021
00022 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00023
00024 namespace OpenDDS {
00025 namespace DCPS {
00026
00027 class ReceivedDataSample;
00028 class DataSampleElement;
00029 class DisjointSequence;
00030
00031
00032 class OpenDDS_Rtps_Udp_Export RtpsSampleHeader {
00033 public:
00034
00035
00036
00037
00038
00039 static size_t max_marshaled_size() { return 4; }
00040
00041
00042
00043
00044 static bool partial(const ACE_Message_Block&) { return false; }
00045
00046
00047
00048
00049 static SequenceRange split(const ACE_Message_Block& orig, size_t size,
00050 Message_Block_Ptr& head,
00051 Message_Block_Ptr& tail);
00052
00053 RtpsSampleHeader();
00054 explicit RtpsSampleHeader(ACE_Message_Block& mb);
00055 RtpsSampleHeader& operator=(ACE_Message_Block& mn);
00056
00057 void pdu_remaining(size_t size);
00058 size_t marshaled_size();
00059 ACE_UINT32 message_length();
00060
00061 bool valid() const;
00062
00063 bool into_received_data_sample(ReceivedDataSample& rds);
00064
00065 static bool payload_byte_order(const ReceivedDataSample& rds);
00066
00067 bool more_fragments() const;
00068
00069 RTPS::Submessage submessage_;
00070
00071 private:
00072 void init(ACE_Message_Block& mb);
00073
00074 bool valid_, frag_;
00075 size_t marshaled_size_, message_length_;
00076
00077 public:
00078
00079
00080
00081
00082 static void populate_data_sample_submessages(RTPS::SubmessageSeq& subm,
00083 const DataSampleElement& dsle,
00084 bool requires_inline_qos);
00085 static void populate_data_control_submessages(RTPS::SubmessageSeq& subm,
00086 const TransportSendControlElement& tsce,
00087 bool requires_inline_qos);
00088 static void populate_inline_qos(const TransportSendListener::InlineQosData& qos_data,
00089 RTPS::ParameterList& plist);
00090 static bool control_message_supported(char message_id);
00091
00092
00093
00094
00095
00096
00097
00098 static const ACE_CDR::UShort FRAG_SIZE = 1024;
00099
00100 private:
00101 static void process_iqos(DataSampleHeader& opendds,
00102 const OpenDDS::RTPS::ParameterList& iqos);
00103 };
00104
00105 }
00106 }
00107
00108 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00109
00110 #ifdef __ACE_INLINE__
00111 #include "RtpsSampleHeader.inl"
00112 #endif
00113
00114 #endif