[−][src]Struct packet_loss_classification::MBiaz
Packet loss classifier based on the MBiaz
scheme.
The MBiaz
scheme assumes that wireless errors have less influence on
delays than congestion errors. In case of n
lost packets between
two consecutively received packets the classifier checks if the second
packet arrived "on time". "On time" means that it received in an expected
timeframe defined and bounded by:
- the so far minimal interarrival time
- the number of lost packets
n
- the lower window limit
- the upper window limit
use packet_loss_classification::{MBiaz, PacketLoss}; let mut mbiaz = MBiaz::default(); assert_eq!(mbiaz.classify(1.0, 1), PacketLoss::Congestion); assert_eq!(mbiaz.classify(2.1, 1), PacketLoss::Wireless);
Methods
impl MBiaz
[src]
pub fn new(lower_window_limit: f64, upper_window_limit: f64) -> Self
[src]
Creates a new packet loss classifier based on the MBiaz scheme.
Arguments
lower_window_limit
: bias used to adjust the lower boundary for wireless packet loss classification.upper_window_limit
: bias used to adjust the upper boundary of wireless packet loss detection.
Panics
Panics if lower_window_limit
is bigger than upper_window_limit
.
pub fn classify(
&mut self,
interarrival_time: f64,
num_lost_packets: u32
) -> PacketLoss
[src]
&mut self,
interarrival_time: f64,
num_lost_packets: u32
) -> PacketLoss
Classifies if the n
lost packets are lost due to congestion or wireless errors.
This function classifies the reason of packet loss between two consecutive packets P(i) and P(i + n + 1) where the numbers inside the brackets correspond to some sequence number. Therefor this function should only be called if there has been more than one lost packet.
Arguments
interarrival_time
: interarrival time between packet P(i) and packet P(i + n + 1).num_lost_packets
: number of packets that have been lost.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MBiaz
impl Send for MBiaz
impl Sync for MBiaz
impl Unpin for MBiaz
impl UnwindSafe for MBiaz
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,