|
Algorithm 1. Layer-2: RWABA |
|
Initialization: . |
| 1: |
; |
| 2: |
|
| 3: |
Upon
do
|
| 4: |
; |
| 5: |
Upon
do
|
| 6: |
If has not been sent, then broadcast . |
| 7: |
Upon
do
|
| 8: |
; |
| 9: |
Upon
do
|
| 10: |
|
| 11: |
. |
| 12: |
; |
| 13: |
if
then
|
| 14: |
if
then
|
| 15: |
if
then
|
| 16: |
; |
| 17: |
;
|
| 18: |
else:
|
| 19: |
terminate program; |
| 20: |
; |
| 21: |
else:
|
| 22: |
; |
| 23: |
; |
| 24: |
goto line 1; |