C# Class MiniUDP.NetTraffic.SequenceCounter

Sliding bit array keeping a history of received sequence numbers.
Mostrar archivo Open project: ashoulson/MiniUDP Class Usage Examples

Public Methods

Method Description
Advance ( ushort sequence ) : void

Advances to a given sequence without storing anything.

ComputeCount ( ) : int
SequenceCounter ( bool startFilled = true ) : System
Store ( ushort sequence ) : void

Logs the sequence in the accumulator.

Private Methods

Method Description
HammingWeight ( uint chunk ) : uint
SetBit ( int index ) : bool

Returns true iff the value is already contained.

Shift ( int count ) : void

Shifts the entire array by a given number of bits.

Method Details

Advance() public method

Advances to a given sequence without storing anything.
public Advance ( ushort sequence ) : void
sequence ushort
return void

ComputeCount() public method

public ComputeCount ( ) : int
return int

SequenceCounter() public method

public SequenceCounter ( bool startFilled = true ) : System
startFilled bool
return System

Store() public method

Logs the sequence in the accumulator.
public Store ( ushort sequence ) : void
sequence ushort
return void