Files
eden-sim/contrib/tsn/model/stream-identity-entry.h

68 lines
1.8 KiB
C
Raw Permalink Normal View History

2025-12-01 15:56:02 +01:00
#ifndef STREAM_IDENTITY_ENTRY_H
#define STREAM_IDENTITY_ENTRY_H
#include "ns3/object.h"
#include "ns3/ptr.h"
#include "ns3/packet.h"
#include "tsn-net-device.h"
#include "stream-identification-function.h"
namespace ns3
{
class TsnNetDevice;
class StreamIdEntry : public Object
{
public:
/**
* \brief Get the TypeId
*
* \return The TypeId for this class
*/
static TypeId GetTypeId();
/**
* \brief Create a StreamIdEntry
*/
StreamIdEntry();
/**
* Destroy a StreamIdEntry
*
* This is the destructor for the StreamIdEntry.
*/
~StreamIdEntry();
// Delete copy constructor and assignment operator to avoid misuse
StreamIdEntry& operator=(const StreamIdEntry&) = delete;
StreamIdEntry(const StreamIdEntry&) = delete;
void SetStreamIdentificationFunction(Ptr<StreamIdentificationFunction> func);
void SetOutFacInputPortList(std::vector<Ptr<TsnNetDevice>> portList);
void SetInFacInputPortList(std::vector<Ptr<TsnNetDevice>> portList);
void SetInFacOutputPortList(std::vector<Ptr<TsnNetDevice>> portList);
void SetOutFacOutputPortList(std::vector<Ptr<TsnNetDevice>> portList);
bool Match(Ptr<TsnNetDevice> net, bool infacing, bool input, Ptr<Packet> p);
uint32_t GetStreamHandle();
void DoActiveUpdate(Ptr<Packet> p);
Time GetHardwareLatency();
protected:
private:
uint32_t m_tsnStreamIdHandle;
std::vector<Ptr<TsnNetDevice>> m_tsnStreamIdInFacOutputPortList;
std::vector<Ptr<TsnNetDevice>> m_tsnStreamIdOutFacOutputPortList;
std::vector<Ptr<TsnNetDevice>> m_tsnStreamIdInFacInputPortList;
std::vector<Ptr<TsnNetDevice>> m_tsnStreamIdOutFacInputPortList;
Ptr<StreamIdentificationFunction> m_tsnStreamIdIdentificationFunction;
};
}
#endif /* STREAM_IDENTITY_ENTRY_H */