I have three rsu in my app. is there any id for rsu like car id for cars? if yes, how can I get rsu id in rsu initializer method? if not how can I distinguish between rsus?
Asked
Active
Viewed 553 times
0
-
Is this question answered? – Julian Heinovski Jul 22 '18 at 12:32
1 Answers
1
If you the consider the demo scenario, it has one RSU integrated stored in an Array structure. However, you can have an arbitrary number of RSUs by increasing the number in the brackets.
Therefore, you can address every RSU individually by its module id *.rsu[<index>]
(e.g. RSUExampleScenario.rsu[0]
) which is also available in the code via getId()
. OMNeT++ also provides other useful functions for getting the name of a module.
If this is identifier is not enough for you, at least in the Mac layer there is an additional id which you can use to distinguish nodes.
If this is not not enough, you would need to add your own identifier variable to the NED module.

Julian Heinovski
- 1,822
- 3
- 16
- 27