#ifndef FRER_SEQUENCE_ENCODE_DECODE_FUNCTION_H #define FRER_SEQUENCE_ENCODE_DECODE_FUNCTION_H #include "ns3/object.h" #include "ns3/packet.h" #include "tsn-net-device.h" namespace ns3 { class TsnNetDevice; class SequenceEncodeDecodeFunction : public Object { public: /** * \brief Get the TypeId * * \return The TypeId for this class */ static TypeId GetTypeId(); /** * \brief Create a SequenceEncodeDecodeFunction */ SequenceEncodeDecodeFunction(); /** * Destroy a SequenceEncodeDecodeFunction * * This is the destructor for the SequenceEncodeDecodeFunction. */ ~SequenceEncodeDecodeFunction(); void SetStreamHandle(std::vector seqEncStreamList); void SetPort(Ptr seqEncPort); bool IsApplicable(uint32_t streamHandle, Ptr port, bool direction); void Encode(Ptr p, uint16_t seqNumber); uint16_t Decode(Ptr p); protected: private: std::vector m_frerSeqEncStreamList; Ptr m_frerSeqEncPort; bool m_frerSeqEncDirection; bool m_frerSeqEncActive; uint8_t m_frerSeqEncEncapsType = 1; //RTAG encoding (802.1CB-2017 section 10.5.1.5) }; } #endif /* FRER_SEQUENCE_ENCODE_DECODE_FUNCTION_H */