| 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 |