Algorithm 1: Neighbor table construction algorithm of ELR-W protocol at node i |
Notations: = Hello packet = Residual energy of neighbor node j = Link efficiency between node i and node j = Number of hop-counts from neighbor node j to BNC = Distance between nodes i and j = Information in neighbor table = Information in Hello packets Input: HPs from a neighboring node j Process: 1. start 2. for each HP do 3. if then 4. update record for neighbor information in neighbor table 5. 6. 7. 8. 9. else 10. Discard HP 11. if = null then 12. add record in neighbor table 13. 14. 15. 16. 17. else go to line 3 18. end if 19. end if 20. end for 21. end |