Research Article
RLT Code Based Handshake-Free Reliable MAC Protocol for Underwater Sensor Networks
Algorithm 2
Collecting the state information of neighbor node.
() INPUT: overhear a frame from a neighbor | () OUTPUT: refresh the state of the neighbor’s in neighbor table | () Upon overhearing a frame do | () if (not an ACK) & (the sequence number >1) then | () set the state of the neighbor to “0”; | () else if (not an ACK) & (the sequence number = 1) then | () set the state of the neighbor to “3”; // indicates the unknown state | () else if (is an ACK with null index) then | () set the state of the neighbor to “2”; // indicates the unknown state | () else if (is an ACK) & (the value of index field is “0”) then | () set the state of the neighbor to “1”; // ready to receive frames from other nodes | () endif | () endupon |
|