Skip to main content
. 2021 Oct 19;21(20):6937. doi: 10.3390/s21206937
Algorithm 3: This procedure calculates the Back-off value for a node
1: procedure BACK·OFF(traffici(t), Priorityi(t), CWmax, CWmin)
2: while traffici(t) == emergency do
3:  Calculate CWnewmax(t) // as shown in Equation (5)
4:  Back-offi(t) = Random([0,CWnewmax(t)])
5: end while
6: while traffici(t) == non-emergency do
7:  Back-offi(t) = Random([CWmin,CWmax])
8: end while
9: end procedure