72 lines
2.1 KiB
C++
72 lines
2.1 KiB
C++
#ifndef FRER_LATENT_ERROR_DETECTION_FUNCTION_H
|
|
#define FRER_LATENT_ERROR_DETECTION_FUNCTION_H
|
|
|
|
#include "ns3/object.h"
|
|
|
|
#include "ns3/nstime.h"
|
|
|
|
#include "frer-base-recovery-function.h"
|
|
|
|
|
|
namespace ns3
|
|
{
|
|
|
|
class LatentErrorDetectionFunction : public Object
|
|
{
|
|
public:
|
|
/**
|
|
* \brief Get the TypeId
|
|
*
|
|
* \return The TypeId for this class
|
|
*/
|
|
static TypeId GetTypeId();
|
|
|
|
/**
|
|
* \brief Create a LatentErrorDetectionFunction
|
|
*/
|
|
LatentErrorDetectionFunction();
|
|
|
|
/**
|
|
* Destroy a LatentErrorDetectionFunction
|
|
*
|
|
* This is the destructor for the LatentErrorDetectionFunction.
|
|
*/
|
|
~LatentErrorDetectionFunction();
|
|
|
|
// Delete copy constructor and assignment operator to avoid misuse
|
|
LatentErrorDetectionFunction& operator=(const LatentErrorDetectionFunction&) = delete;
|
|
LatentErrorDetectionFunction(const LatentErrorDetectionFunction&) = delete;
|
|
|
|
void SetRecoveryFunction(Ptr<BaseRecoveryFunction> recoveryFunction);
|
|
void LatentErrorReset(); //802.1CB-2017 : 7.4.4.3
|
|
void LatentErrorTest(); //802.1CB-2017 : 7.4.4.4
|
|
|
|
protected:
|
|
Ptr<BaseRecoveryFunction> m_recoveryFunction = nullptr;
|
|
|
|
int m_curBaseDifference = 0; //802.1CB-2017 : 7.4.4.2.1
|
|
|
|
uint m_frerSeqRcvyLatentErrorDifference; //802.1CB-2017 : 10.4.1.12.1
|
|
Time m_frerSeqRcvyLatentErrorPeriod; //802.1CB-2017 : 10.4.1.12.2
|
|
Time m_frerSeqRcvyLatentResetPeriod; //802.1CB-2017 : 10.4.1.12.4
|
|
|
|
uint m_frerSeqRcvyLatentErrorPaths; //802.1CB-2017 : 10.4.1.12.3
|
|
uint m_frerCpsSeqRcvyLatentErrorResets = 0; //802.1CB-2017 : 10.8.10
|
|
|
|
Time m_frerSeqRcvyMinLatentErrorPeriod;
|
|
Time m_frerSeqRcvyMaxLatentErrorPeriod;
|
|
Time m_frerSeqRcvyMinLatentResetPeriod;
|
|
Time m_frerSeqRcvyMaxLatentResetPeriod;
|
|
|
|
EventId m_testEvent;
|
|
EventId m_resetEvent;
|
|
|
|
|
|
private:
|
|
|
|
|
|
};
|
|
|
|
}
|
|
#endif /* FRER_LATENT_ERROR_DETECTION_FUNCTION_H */
|