69 lines
1.9 KiB
C
69 lines
1.9 KiB
C
|
|
#ifndef FRER_BASE_RECOVERY_FUNCTION_H
|
||
|
|
#define FRER_BASE_RECOVERY_FUNCTION_H
|
||
|
|
|
||
|
|
#include "ns3/object.h"
|
||
|
|
|
||
|
|
#include "ns3/nstime.h"
|
||
|
|
|
||
|
|
|
||
|
|
namespace ns3
|
||
|
|
{
|
||
|
|
|
||
|
|
class BaseRecoveryFunction : public Object
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
/**
|
||
|
|
* \brief Get the TypeId
|
||
|
|
*
|
||
|
|
* \return The TypeId for this class
|
||
|
|
*/
|
||
|
|
static TypeId GetTypeId();
|
||
|
|
|
||
|
|
/**
|
||
|
|
* \brief Create a BaseRecoveryFunction
|
||
|
|
*/
|
||
|
|
BaseRecoveryFunction();
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Destroy a BaseRecoveryFunction
|
||
|
|
*
|
||
|
|
* This is the destructor for the BaseRecoveryFunction.
|
||
|
|
*/
|
||
|
|
~BaseRecoveryFunction();
|
||
|
|
|
||
|
|
// Delete copy constructor and assignment operator to avoid misuse
|
||
|
|
BaseRecoveryFunction& operator=(const BaseRecoveryFunction&) = delete;
|
||
|
|
BaseRecoveryFunction(const BaseRecoveryFunction&) = delete;
|
||
|
|
|
||
|
|
uint GetFrerCpsSeqRcvyPassedPackets();
|
||
|
|
uint GetFrerCpsSeqRcvyDiscardedPackets();
|
||
|
|
|
||
|
|
void resetRecoveryFunction();
|
||
|
|
|
||
|
|
virtual bool DoRecovery(uint16_t seqNumber);
|
||
|
|
|
||
|
|
protected:
|
||
|
|
uint m_recovSeqSpace = 65536; //802.1CB-2017 : 7.4.3.2.1
|
||
|
|
uint16_t m_recovSeqNum = 0; //802.1CB-2017 : 7.4.3.2.3
|
||
|
|
bool m_takeAny = true; //802.1CB-2017 : 7.4.3.2.6
|
||
|
|
Time m_frerSeqRcvyResetMSec; //802.1CB-2017 : 10.4.1.7
|
||
|
|
bool m_frerSeqRcvyIndividualRecovery = false; //802.1CB-2017 : 10.4.1.10
|
||
|
|
|
||
|
|
uint m_frerCpsSeqRcvyOutOfOrderPackets = 0; //802.1CB-2017 : 10.8.3
|
||
|
|
uint m_frerCpsSeqRcvyPassedPackets = 0; //802.1CB-2017 : 10.8.5
|
||
|
|
uint m_frerCpsSeqRcvyDiscardedPackets = 0; //802.1CB-2017 : 10.8.6
|
||
|
|
|
||
|
|
Time m_frerMinSeqRcvyResetMSec;
|
||
|
|
Time m_frerMaxSeqRcvyResetMSec;
|
||
|
|
|
||
|
|
EventId m_resetEvent;
|
||
|
|
|
||
|
|
|
||
|
|
private:
|
||
|
|
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
}
|
||
|
|
#endif /* FRER_BASE_RECOVERY_FUNCTION_H */
|