Lab1
代码说明:
1. There are at least 10 nodes in the simulation and each node has at least two neighbors within its transmission area. 2. Every node periodically broadcasts a ”request” packet to its neighbors. Meantime, this node sets a timer with t time interval to wait for its neighbors ”re- sponse” packets. When receiving all responses from its neighbors during t, it prints ”success”; oth- erwise, it prints ”failure”. Assume that the broadcast periodical interval is bigger than t. 3. A neighbor that receives a ”request” packet, sends a ”response” packet after a random time τ , τ = random(0, 2t).(There are at least 10 nodes in the simulation and each node has at least two neighbors within its transmission area. Every node periodically broadcasts a request packet to its neighbors. Meantime, this node sets a timer with t time interval to wait for its neighbors response packets. When receiving all responses from its neighbors during t, it prints success oth- erwise, it prints failure. Assume that the broadcast periodical interval is bigger than t.)
下载说明:请别用迅雷下载,失败请重下,重下不扣分!