Go to the documentation of this file.
69 #define PER_UPDATE_PERIOD_MILLISECONDS (10000)
70 #define INVALID_PACKET_RATE (-1)
84 , m_receivedPacketCount(0)
85 , m_packetErrorRate(0)
86 , m_previousUpdateTime(0)
136 const int64_t now = XsTimeStamp::nowMs();
142 if (msSinceLastUpdate > 0)
147 if (packetDeliveryRate > 100.0
f)
148 packetDeliveryRate = 100.0f;
uint8_t m_packetErrorRate
uint16_t m_receivedPacketCount
#define PER_UPDATE_PERIOD_MILLISECONDS
void XSTYPES_DLL_API xsNameThisThread(const char *threadName)
Set the name of the current thread to threadName.
int32_t m_expectedPacketsPerSecond
#define INVALID_PACKET_RATE
virtual int32_t innerFunction(void)
Updates the packet error rate estimate periodically.
PacketErrorRateEstimator()
Constructor.
void setExpectedPacketsPerSecond(int16_t packetsPerSecond)
Set the expected packet reception rate in packets per second.
virtual ~PacketErrorRateEstimator()
Destructor.
uint8_t packetErrorRate(void) const
Return the currently estimated packet error rate.
void packetReceived(void)
Indicate that a packet has been received.
virtual void initFunction(void)
Initializes the estimation parameters.
int64_t m_previousUpdateTime