NS3-HelperScripts icon indicating copy to clipboard operation
NS3-HelperScripts copied to clipboard

Some questions about unicast

Open S-kewen opened this issue 1 year ago • 0 comments

First of all, thank you for your contribution, it helped me a lot!

For unicast, I have the following two questions:

  1. Why do I still receive drop and rx messages between other nodes when I use unicast?

  2. 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!

S-kewen avatar Feb 27 '23 09:02 S-kewen