NS3-HelperScripts
NS3-HelperScripts copied to clipboard
Some questions about unicast
First of all, thank you for your contribution, it helped me a lot!
For unicast, I have the following two questions:
-
Why do I still receive drop and rx messages between other nodes when I use unicast?
-
Is there any relevance for TxInfo for broadcast and unicast?
here are my broadcast and unicast codes (I'm checked they all have the right conditions to run) :
if(json_object["castMethod"].asString() == "broadcast"){ Mac48Address brocast_mac = Mac48Address::GetBroadcast(); Simulator::Schedule(Seconds(scheduleTime), &WaveNetDevice::SendX, wd, p, brocast_mac, protocol, tx); } else if(json_object["castMethod"].asString() == "unicast") { Ptr <WaveNetDevice> d2 = DynamicCast<WaveNetDevice>(ds.Get(json_object["receiverId"].asInt())); Mac48Address unicast_mac = Mac48Address::ConvertFrom (d2->GetAddress()); TxInfo tx_u; Simulator::Schedule(Seconds(scheduleTime), &WaveNetDevice::SendX, wd, p, unicast_mac, protocol, tx_u); }
thanks!