OpenDDS  Snapshot(2023/04/28-20:55)
ReliableSession.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_MULTICAST_RELIABLESESSION_H
9 #define OPENDDS_DCPS_TRANSPORT_MULTICAST_RELIABLESESSION_H
10 
11 #include "Multicast_Export.h"
12 
13 #include "MulticastSession.h"
14 #include "MulticastTypes.h"
15 
16 #include "ace/Synch_Traits.h"
17 
19 #include "dds/DCPS/PoolAllocator.h"
21 
23 
24 namespace OpenDDS {
25 namespace DCPS {
26 
28  : public MulticastSession {
29 public:
31  MulticastDataLink* link,
32  MulticastPeer remote_peer);
33 
34  ~ReliableSession();
35 
36  virtual bool check_header(const TransportHeader& header);
37  virtual void record_header_received(const TransportHeader& header);
38 
39  virtual bool ready_to_deliver(const TransportHeader& header,
40  const ReceivedDataSample& data);
41  void deliver_held_data();
42  virtual void release_remote(const GUID_t& remote);
43 
44  virtual bool control_received(char submessage_id,
45  const Message_Block_Ptr& control);
46 
47  void expire_naks();
48  void send_naks();
49 
50  void nak_received(const Message_Block_Ptr& control);
51  void send_naks(DisjointSequence& found);
52 
53  void nakack_received(const Message_Block_Ptr& control);
54  virtual void send_nakack(SequenceNumber low);
55 
56  virtual bool start(bool active, bool acked);
57  virtual void stop();
58  virtual bool is_reliable() { return true;}
59 
60  virtual void syn_hook(const SequenceNumber& seq);
61 
62 private:
65  TimeDuration nak_delay();
66  void process_naks(const MonotonicTimePoint& /*now*/);
67 
69 
70  typedef OPENDDS_MAP(MonotonicTimePoint, SequenceNumber) NakRequestMap;
71  NakRequestMap nak_requests_;
72 
75  OPENDDS_MULTIMAP(TransportHeaderSN, ReceivedDataSample) held_;
76 
77  typedef OPENDDS_SET(SequenceRange) NakPeerSet;
78  NakPeerSet nak_peers_;
79 };
80 
81 } // namespace DCPS
82 } // namespace OpenDDS
83 
85 
86 #endif /* DCPS_RELIABLESESSION_H */
ACE_INT64 MulticastPeer
PmfSporadicTask< ReliableSession > Sporadic
RcHandle< Sporadic > nak_watchdog_
#define OpenDDS_Multicast_Export
#define OPENDDS_MULTIMAP(K, T)
Christopher Diggins *renamed files *fixing compilation errors *adding Visual C project file *removed make Max Lybbert *removed references to missing and unused header
Definition: CHANGELOG.txt:8
Holds a data sample received by the transport.
Defines class that represents a transport packet header.
std::pair< SequenceNumber, SequenceNumber > SequenceRange
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
typedef OPENDDS_MAP(OPENDDS_STRING, OPENDDS_STRING) ValueMap
Helper types and functions for config file parsing.
typedef OPENDDS_SET(NetworkAddress) AddrSet