#include "satellite-arq-sequence-number.h"
Public Member Functions | |
SatArqSequenceNumber () | |
Default constructor. More... | |
SatArqSequenceNumber (uint8_t windowSize) | |
Constructor with initialization parameters. More... | |
virtual | ~SatArqSequenceNumber () |
uint8_t | NextSequenceNumber () |
Returns the next free sequence number. More... | |
void | Release (uint8_t seqNo) |
Release a sequence number if either ACK is received or maximum retransmissions have been reached. More... | |
bool | SeqNoAvailable () const |
Check whether there are free (released) sequence numbers. More... | |
Private Member Functions | |
void | CleanUp () |
Clean ups the sequence number map. More... | |
Private Attributes | |
int | m_currSeqNo |
uint32_t | m_maxSn |
std::map< uint32_t, bool > | m_seqNoMap |
uint32_t | m_windowSize |
Definition at line 42 of file satellite-arq-sequence-number.h.
ns3::SatArqSequenceNumber::SatArqSequenceNumber | ( | ) |
Default constructor.
Default constructor is not meant to be used!
Definition at line 33 of file satellite-arq-sequence-number.cc.
ns3::SatArqSequenceNumber::SatArqSequenceNumber | ( | uint8_t | windowSize | ) |
Constructor with initialization parameters.
windowSize |
Definition at line 47 of file satellite-arq-sequence-number.cc.
|
inlinevirtual |
Definition at line 56 of file satellite-arq-sequence-number.h.
|
private |
Clean ups the sequence number map.
Definition at line 102 of file satellite-arq-sequence-number.cc.
References m_seqNoMap.
Referenced by Release().
uint8_t ns3::SatArqSequenceNumber::NextSequenceNumber | ( | ) |
Returns the next free sequence number.
Definition at line 64 of file satellite-arq-sequence-number.cc.
References m_currSeqNo, m_maxSn, m_seqNoMap, and SeqNoAvailable().
void ns3::SatArqSequenceNumber::Release | ( | uint8_t | seqNo | ) |
Release a sequence number if either ACK is received or maximum retransmissions have been reached.
seqNo | Sequence number to be released |
Definition at line 77 of file satellite-arq-sequence-number.cc.
References CleanUp(), m_currSeqNo, m_maxSn, and m_seqNoMap.
bool ns3::SatArqSequenceNumber::SeqNoAvailable | ( | ) | const |
Check whether there are free (released) sequence numbers.
If a sequence number is not available, ARQ may not send any new packets.
Definition at line 57 of file satellite-arq-sequence-number.cc.
References m_seqNoMap, and m_windowSize.
Referenced by NextSequenceNumber().
|
private |
Definition at line 87 of file satellite-arq-sequence-number.h.
Referenced by NextSequenceNumber(), and Release().
|
private |
Definition at line 89 of file satellite-arq-sequence-number.h.
Referenced by NextSequenceNumber(), and Release().
|
private |
Definition at line 86 of file satellite-arq-sequence-number.h.
Referenced by CleanUp(), NextSequenceNumber(), Release(), and SeqNoAvailable().
|
private |
Definition at line 88 of file satellite-arq-sequence-number.h.
Referenced by SeqNoAvailable().