0

While looking for various information on Stackoverflow, I read that Veins 5.x and above support Unicast communication.

I understood that unicast communication is possible through populateWSM(). However, I don't understand which LAddress::L2Type rcvId should be in the ID value of the second parameter.

Should I pass the ID value obtained through

getParentModule() -> getIndex()

Or is it necessary to pass the ID value of the left node list when running the simulation? If it's the latter, how can I get the ID value?

Minwoo Kim
  • 497
  • 1
  • 5
  • 21

1 Answers1

1

The demo implementation of Veins 5.1 uses the OMNeT++ module ID. For more robustness, I would recommend querying the MAC layer. See, for example, https://github.com/sommer/veins/blob/veins-5.1/src/veins/modules/application/ieee80211p/DemoBaseApplLayer.cc#L83

Christoph Sommer
  • 6,893
  • 1
  • 17
  • 35
  • The information was really helpful. But how can I pass the mac value of `LAddress::L2Type` to another node? It seems that the data type is not defined in the `.msg` file. – Minwoo Kim Apr 05 '21 at 04:24
  • You will find this information in the OMNeT++ user manual if you look for “noncobject” (that is, how to define message field types that are not cObject derived types) – Christoph Sommer Apr 05 '21 at 16:04