OpenDDS  Snapshot(2023/04/28-20:55)
TransportSendElement.h
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 
8 #ifndef OPENDDS_DCPS_TRANSPORT_FRAMEWORK_TRANSPORTSENDELEMENT_H
9 #define OPENDDS_DCPS_TRANSPORT_FRAMEWORK_TRANSPORTSENDELEMENT_H
10 
11 #include "dds/DCPS/dcps_export.h"
12 #include "TransportQueueElement.h"
14 
16 
17 namespace OpenDDS {
18 namespace DCPS {
19 
21 public:
22 
23  TransportSendElement(int initial_count,
24  const DataSampleElement* sample);
25 
26  virtual ~TransportSendElement();
27 
28  /// Accessor for the publisher id.
29  virtual GUID_t publication_id() const;
30 
31  virtual GUID_t subscription_id() const;
32 
33  virtual ACE_Message_Block* duplicate_msg() const;
34 
35  /// Accessor for the ACE_Message_Block
36  virtual const ACE_Message_Block* msg() const;
37 
38  virtual const ACE_Message_Block* msg_payload() const;
39 
40  virtual SequenceNumber sequence() const;
41 
42  /// Original sample from send listener.
43  const DataSampleElement* sample() const;
44 
45  virtual bool owned_by_transport();
46 
47  virtual bool is_last_fragment() const { return !element_->get_header().more_fragments(); }
48 
49 protected:
50 
51  virtual void release_element(bool dropped_by_transport);
52 
53 private:
54 
55  /// This is the actual element that the transport framework was
56  /// asked to send.
58 };
59 
60 } // namespace DCPS
61 } // namespace OpenDDS
62 
64 
65 #if defined (__ACE_INLINE__)
66 #include "TransportSendElement.inl"
67 #endif /* __ACE_INLINE__ */
68 
69 #endif /* OPENDDS_DCPS_TRANSPORTSENDELEMENT_H */
#define OpenDDS_Dcps_Export
Definition: dcps_export.h:24
Sequence number abstraction. Only allows positive 64 bit values.
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
virtual bool is_last_fragment() const
Is this QueueElement the last result of fragmentation?
Base wrapper class around a data/control sample to be sent.