Reputation: 165
In interface element level of wireless nodes: I know handleMessage() is called by the simulation kernel when the module receives a message. Is there a similar function when a physical wireless link is established between two single or multi-radio nodes to communicate them is called? If there is no such function, how can I generate it? Thanks
Upvotes: 0
Views: 89
Reputation: 6681
There is no such thing as physical wireless link. Radios transmit packets that may or may not be received on the other end. That physical wireless link is just an abstraction layered on top of the low level communication.
I.e. when do you consider a physical wireless link present? When data was exchanged between the two peer? Only one way or data should travel in both ways? How will node1 know that node2 received the sent data? Should it wait for acknowledgement? For how long? What is if the acknowledgement is lost during the transmission. And so on...
Providing reliable communication channel between two nodes is the responsibility of the Link Layer (or Mac layer if you want to call it that way like in Ieee80211Mac
). So you should add your logic somewhere there, however you must define your own logic. Take a look at the handleLowerPacket()
as a good place to insert your code.
Upvotes: 2