|
RTP Trace System
1.0
|
Sequence Number Validator. More...
#include <seqnumvalidator.h>
Sequence Number Validator.
This class is a validator for sequence numbers. It is based on the algorithm described in RFC 1889. It can use sequence numbers up to a size of 64 bits. Jitter and fraction loss calculation is also done by this class.
| Coral::SeqNumValidator::SeqNumValidator | ( | const cardinal | minSequential = 2, |
| const cardinal | maxMisorder = 100, |
||
| const cardinal | maxDropout = 3000, |
||
| const card64 | seqMod = (1 << 16) |
||
| ) |
Constructor for new sequence number validator.
| minSequential | Minimum number of packets in sequence for the source to be valid. |
| maxMisorder | Maximum difference for packets to be misordered. |
| maxDropout | Maximum gap. |
| seqMod | Sequence number modulo. |
Calculate and get fraction of packets lost.
| double Coral::SeqNumValidator::getFractionLost | ( | ) | const [inline] |
Get fraction of packets lost. Note: No calculation of the fraction lost is done here! The fraction lost value is the value of the last call of calculateFractionLost()!
| double Coral::SeqNumValidator::getJitter | ( | ) | const [inline] |
Get jitter.
| card64 Coral::SeqNumValidator::getLastSeqNum | ( | ) | const [inline] |
Get extended last sequence number. This number is extended by the calculated number of sequence number cycles!
| card64 Coral::SeqNumValidator::getPacketsLost | ( | ) | const [inline] |
Get number of packets lost. The loss is calculated by the number of sequence number cycles and gaps.
| card64 Coral::SeqNumValidator::getPacketsReceived | ( | ) | const [inline] |
Get number of packets received.
| void Coral::SeqNumValidator::init | ( | const card64 | sequenceNumber | ) | [inline, private] |
| void Coral::SeqNumValidator::reset | ( | ) |
Reset SeqNumValidator.
Reimplemented in Coral::SourceStateInfo.
| SeqNumValidator::ValidationResult Coral::SeqNumValidator::validate | ( | const card64 | sequenceNumber, |
| const card32 | packetTimeStamp = 0 |
||
| ) |
Validate a new sequence number. If the packet is valid, jitter value will be calculated using packetTimeStamp. To disable jitter calculation, set packetTimeStamp to 0.
| sequenceNumber | Sequence number to be validated. |
| packetTimeStamp | Time stamp of the packet for jitter calculation. |
card64 Coral::SeqNumValidator::BadSeq [private] |
card64 Coral::SeqNumValidator::BaseSeq [private] |
card64 Coral::SeqNumValidator::Cycles [private] |
card64 Coral::SeqNumValidator::ExpectedPrior [private] |
Reimplemented in Coral::SourceStateInfo.
double Coral::SeqNumValidator::FractionLost [private] |
Reimplemented in Coral::SourceStateInfo.
double Coral::SeqNumValidator::Jitter [private] |
cardinal Coral::SeqNumValidator::MaxDropout [private] |
cardinal Coral::SeqNumValidator::MaxMisorder [private] |
card64 Coral::SeqNumValidator::MaxSeq [private] |
card32 Coral::SeqNumValidator::Probation [private] |
card64 Coral::SeqNumValidator::Received [private] |
card64 Coral::SeqNumValidator::ReceivedPrior [private] |
Reimplemented in Coral::SourceStateInfo.
card64 Coral::SeqNumValidator::SeqMod [private] |
bool Coral::SeqNumValidator::Uninitialized [private] |