OpenDDS  Snapshot(2023/04/28-20:55)
Public Member Functions | Private Attributes | List of all members
OpenDDS::DCPS::SingleSendBuffer::Proxy Class Reference

#include <TransportSendBuffer.h>

Collaboration diagram for OpenDDS::DCPS::SingleSendBuffer::Proxy:
Collaboration graph
[legend]

Public Member Functions

 Proxy (SingleSendBuffer &ssb)
 
 ~Proxy ()
 
SequenceNumber low () const
 
SequenceNumber high () const
 
bool empty () const
 
bool contains (SequenceNumber seq) const
 
bool contains (SequenceNumber seq, GUID_t &destination) const
 
SequenceNumber pre_low () const
 
SequenceNumber pre_high () const
 
bool pre_empty () const
 
bool pre_contains (SequenceNumber sequence) const
 
bool resend_i (const SequenceRange &range, DisjointSequence *gaps=0)
 
bool resend_i (const SequenceRange &range, DisjointSequence *gaps, const GUID_t &destination)
 
void resend_fragments_i (SequenceNumber sequence, const DisjointSequence &fragments, size_t &cumulative_send_count)
 
bool has_frags (const SequenceNumber &seq) const
 

Private Attributes

SingleSendBufferssb_
 

Detailed Description

Definition at line 102 of file TransportSendBuffer.h.

Constructor & Destructor Documentation

◆ Proxy()

OpenDDS::DCPS::SingleSendBuffer::Proxy::Proxy ( SingleSendBuffer ssb)
inline

Definition at line 104 of file TransportSendBuffer.h.

105  : ssb_(ssb)
106  {
107  ssb_.mutex_.acquire();
108  }
int acquire(void)

◆ ~Proxy()

OpenDDS::DCPS::SingleSendBuffer::Proxy::~Proxy ( )
inline

Definition at line 110 of file TransportSendBuffer.h.

111  {
112  ssb_.mutex_.release();
113  }
int release(void)

Member Function Documentation

◆ contains() [1/2]

bool OpenDDS::DCPS::SingleSendBuffer::Proxy::contains ( SequenceNumber  seq) const
inline

Definition at line 132 of file TransportSendBuffer.h.

Referenced by OpenDDS::DCPS::RtpsUdpDataLink::RtpsWriter::process_acknack().

133  {
134  return ssb_.buffers_.count(seq);
135  }

◆ contains() [2/2]

bool OpenDDS::DCPS::SingleSendBuffer::Proxy::contains ( SequenceNumber  seq,
GUID_t destination 
) const
inline

Definition at line 137 of file TransportSendBuffer.h.

References OpenDDS::DCPS::GUID_UNKNOWN.

138  {
139  if (ssb_.buffers_.count(seq)) {
140  DestinationMap::const_iterator pos = ssb_.destinations_.find(seq);
141  destination = pos == ssb_.destinations_.end() ? GUID_UNKNOWN : pos->second;
142  return true;
143  }
144  return false;
145  }
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59

◆ empty()

bool OpenDDS::DCPS::SingleSendBuffer::Proxy::empty ( void  ) const
inline

◆ has_frags()

bool OpenDDS::DCPS::SingleSendBuffer::Proxy::has_frags ( const SequenceNumber seq) const
inline

Definition at line 188 of file TransportSendBuffer.h.

189  {
190  return ssb_.has_frags(seq);
191  }
bool has_frags(const SequenceNumber &seq) const

◆ high()

SequenceNumber OpenDDS::DCPS::SingleSendBuffer::Proxy::high ( ) const
inline

Definition at line 121 of file TransportSendBuffer.h.

Referenced by OpenDDS::DCPS::RtpsUdpDataLink::RtpsWriter::max_data_seq().

122  {
123  if (ssb_.buffers_.empty()) throw std::exception();
124  return ssb_.buffers_.rbegin()->first;
125  }

◆ low()

SequenceNumber OpenDDS::DCPS::SingleSendBuffer::Proxy::low ( ) const
inline

Definition at line 115 of file TransportSendBuffer.h.

Referenced by OpenDDS::DCPS::ReliableSession::nak_received(), and OpenDDS::DCPS::RtpsUdpDataLink::RtpsWriter::non_durable_first_sn().

116  {
117  if (ssb_.buffers_.empty()) throw std::exception();
118  return ssb_.buffers_.begin()->first;
119  }

◆ pre_contains()

bool OpenDDS::DCPS::SingleSendBuffer::Proxy::pre_contains ( SequenceNumber  sequence) const
inline

Definition at line 164 of file TransportSendBuffer.h.

Referenced by OpenDDS::DCPS::RtpsUdpDataLink::RtpsWriter::process_acknack().

165  {
166  return ssb_.pre_seq_.count(sequence);
167  }

◆ pre_empty()

bool OpenDDS::DCPS::SingleSendBuffer::Proxy::pre_empty ( ) const
inline

◆ pre_high()

SequenceNumber OpenDDS::DCPS::SingleSendBuffer::Proxy::pre_high ( ) const
inline

Definition at line 153 of file TransportSendBuffer.h.

Referenced by OpenDDS::DCPS::RtpsUdpDataLink::RtpsWriter::max_data_seq().

154  {
155  if (ssb_.pre_seq_.empty()) throw std::exception();
156  return *ssb_.pre_seq_.rbegin();
157  }

◆ pre_low()

SequenceNumber OpenDDS::DCPS::SingleSendBuffer::Proxy::pre_low ( ) const
inline

Definition at line 147 of file TransportSendBuffer.h.

Referenced by OpenDDS::DCPS::RtpsUdpDataLink::RtpsWriter::non_durable_first_sn().

148  {
149  if (ssb_.pre_seq_.empty()) throw std::exception();
150  return *ssb_.pre_seq_.begin();
151  }

◆ resend_fragments_i()

void OpenDDS::DCPS::SingleSendBuffer::Proxy::resend_fragments_i ( SequenceNumber  sequence,
const DisjointSequence fragments,
size_t &  cumulative_send_count 
)
inline

Definition at line 181 of file TransportSendBuffer.h.

184  {
185  ssb_.resend_fragments_i(sequence, fragments, cumulative_send_count);
186  }
void resend_fragments_i(SequenceNumber sequence, const DisjointSequence &fragments, size_t &cumulative_send_count)

◆ resend_i() [1/2]

bool OpenDDS::DCPS::SingleSendBuffer::Proxy::resend_i ( const SequenceRange range,
DisjointSequence gaps = 0 
)
inline

Definition at line 170 of file TransportSendBuffer.h.

171  {
172  return ssb_.resend_i(range, gaps);
173  }
bool resend_i(const SequenceRange &range, DisjointSequence *gaps=0)

◆ resend_i() [2/2]

bool OpenDDS::DCPS::SingleSendBuffer::Proxy::resend_i ( const SequenceRange range,
DisjointSequence gaps,
const GUID_t destination 
)
inline

Definition at line 175 of file TransportSendBuffer.h.

177  {
178  return ssb_.resend_i(range, gaps, destination);
179  }
bool resend_i(const SequenceRange &range, DisjointSequence *gaps=0)

Member Data Documentation

◆ ssb_

SingleSendBuffer& OpenDDS::DCPS::SingleSendBuffer::Proxy::ssb_
private

Definition at line 195 of file TransportSendBuffer.h.


The documentation for this class was generated from the following file: