Update README and add contrib dir
This commit is contained in:
61
contrib/tsn/model/psfp-flow-meter-instance.h
Normal file
61
contrib/tsn/model/psfp-flow-meter-instance.h
Normal file
@@ -0,0 +1,61 @@
|
||||
#ifndef FLOW_METER_INSTANCE_H
|
||||
#define FLOW_METER_INSTANCE_H
|
||||
|
||||
#include "ns3/object.h"
|
||||
#include "ns3/nstime.h"
|
||||
#include "ns3/packet.h"
|
||||
#include "ns3/data-rate.h"
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
|
||||
class FlowMeterInstance: public Object
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* \brief Get the TypeId
|
||||
*
|
||||
* \return The TypeId for this class
|
||||
*/
|
||||
static TypeId GetTypeId();
|
||||
|
||||
/**
|
||||
* \brief Create a FlowMeterInstance
|
||||
*/
|
||||
FlowMeterInstance();
|
||||
|
||||
/**
|
||||
* Destroy a FlowMeterInstance
|
||||
*
|
||||
* This is the destructor for the Tas.
|
||||
*/
|
||||
~FlowMeterInstance();
|
||||
|
||||
// Delete copy constructor and assignment operator to avoid misuse
|
||||
FlowMeterInstance& operator=(const FlowMeterInstance&) = delete;
|
||||
FlowMeterInstance(const FlowMeterInstance&) = delete;
|
||||
|
||||
void updateTokenBuckets();
|
||||
|
||||
bool Test(Ptr<Packet>);
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
DataRate m_cir;
|
||||
uint32_t m_cbs;
|
||||
DataRate m_eir;
|
||||
uint32_t m_ebs;
|
||||
bool m_cf;
|
||||
bool m_dropOnYellow;
|
||||
bool m_markAllFramesRedEnable;
|
||||
bool m_markAllFramesRed;
|
||||
|
||||
Time m_lastTokenUpdateTime;
|
||||
double m_committedToken = 0;
|
||||
double m_excessToken = 0;
|
||||
};
|
||||
|
||||
}
|
||||
#endif /* FLOW_METER_INSTANCE_H */
|
||||
Reference in New Issue
Block a user