I am doing development for WSN in Omnet.
I want to sniff a unicast message but I don't have an idea how can i do it in Omnet. I made some research but i couldn't found any method for that
When I send data to another node, I am sending it as an unicast with this method :
cModule *nodeIndex = flatTopolojiModulu->getSubmodule("n", i);//n is array
sendDirect(new cMessage("msg"), nodeIndex, "in");
I am using ``
sendDirect`` method because I am working on wireless network. According to this description :
https://stackoverflow.com/a/36082721/5736731 ``
sendDirect`` method is usually the case in wireless networks.
But when send message with sendDirect, a message is being handled by receiver node. For example, according to code example above:
if ``
i=2``, message that is sent only can handle by node which has index "2" from
``
void AnyClassName::handleMessage(cMessage *msg)`` function