#ifndef FRER_SEQUENCE_RECOVERY_FUNCTION_H #define FRER_SEQUENCE_RECOVERY_FUNCTION_H #include "ns3/object.h" #include "tsn-net-device.h" #include "frer-base-recovery-function.h" #include "frer-latent-error-detection-function.h" namespace ns3 { class SequenceRecoveryFunction : public Object { public: /** * \brief Get the TypeId * * \return The TypeId for this class */ static TypeId GetTypeId(); /** * \brief Create a SequenceRecoveryFunction */ SequenceRecoveryFunction(); /** * Destroy a SequenceRecoveryFunction * * This is the destructor for the SequenceRecoveryFunction. */ ~SequenceRecoveryFunction(); // Delete copy constructor and assignment operator to avoid misuse SequenceRecoveryFunction& operator=(const SequenceRecoveryFunction&) = delete; SequenceRecoveryFunction(const SequenceRecoveryFunction&) = delete; void SetStreamHandle(std::vector frerSeqRcvyStreamList); void SetPorts(std::vector> frerSeqRcvyPortList); void SetRecoveryFunction(Ptr frerSeqRcvyAlgorithm); void SetLatentErrorDetectionFunction(Ptr frerSeqRcvyLatentErrorDetection); bool IsApplicable(uint32_t streamHandle, Ptr port, bool direction, bool hasSeqNumber, bool individualRecovery); bool Recovery(uint16_t seqNumber); Time GetHardwareLatency(); protected: private: std::vector m_frerSeqRcvyStreamList; //802.1CB-2017 : 10.4.1.1 std::vector> m_frerSeqRcvyPortList; //802.1CB-2017 : 10.4.1.2 bool m_frerSeqRcvyDirection; //802.1CB-2017 : 10.4.1.3 Ptr m_frerSeqRcvyAlgorithm = nullptr; //802.1CB-2017 : 10.4.1.5 bool m_frerSeqRcvyTakeNoSequence; //802.1CB-2017 : 10.4.1.9 bool m_frerSeqRcvyIndividualRecovery; //802.1CB-2017 : 10.4.1.10 Ptr m_frerSeqRcvyLatentErrorDetection = nullptr; //802.1CB-2017 : 10.4.1.11 Time m_minLatencyOverhead; Time m_maxLatencyOverhead; }; } #endif /* FRER_SEQUENCE_RECOVERY_FUNCTION_H */