Skip to main content

duplicate_in_window

Function duplicate_in_window 

Source
pub fn duplicate_in_window(
    sequence_number: u8,
    initial_sequence_number: u8,
    last_sequence_number: u8,
) -> bool
Expand description

Return whether sequence_number is a duplicate in the current incomplete window.

This is the modulo-256 predicate from ANSI/ASHRAE 135-2020 Clause 5.4.2.2, as corrected by Addendum 135-2020ch. initial_sequence_number is the last sequence number in the previously completed window, and last_sequence_number is the last segment accepted in order. When those values are equal, no segment has been accepted in the current window and the predicate returns false.