Skip to main content
. 2019 Sep 17;21(9):905. doi: 10.3390/e21090905
Algorithm 5 rDWS Algorithm (The Queue Update Module)
  • 1:

    Initialize k1,k2,⋯,kn as counters with value zero

  • 2:

    if SQ is empty then

  • 3:

     Do nothing

  • 4:

    else

  • 5:

     Call Coding Module (rDWS), get linear combination l and transmit it

  • 6:

    end if

  • 7:

    NACK generation at receivers

  • 8:

    forj=1 to n do

  • 9:

     if NACK is received from receiver j then

  • 10:

      Do nothing

  • 11:

     else

  • 12:

      kj←kj+1

  • 13:

     end if

  • 14:

    end for

  • 15:

    Find kmin=minimumelementof{k1,k2,⋯,kn}

  • 16:

    Drop the packet with index kmin from SQ if it was not dropped at a previous slot