[][src]Struct packet_loss_classification::MBiaz

pub struct MBiaz { /* fields omitted */ }

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]

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

impl Debug for MBiaz[src]

impl Default for MBiaz[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.