-2

I know How to send a message for car a to car b or rsu. but I need to send beacons. what is different between sending a message and sending beacons. I cant see any sendBeacon(). How should I send one?

Naser Hamidi
  • 176
  • 1
  • 11
  • Can you explain in more details what you are trying to achieve? I am confused by you saying you want to send a beacon, while at the same time asking what that is... – Christoph Sommer May 14 '17 at 15:12
  • I am saying How can I send a beacon? Is there any function or method for this task or should I make one. I never seen any code sending beacon message – Naser Hamidi May 14 '17 at 19:27
  • Beacons are sent by default. If you want to modify their content, override the populateWSM method; refer to the source code for the details: https://github.com/sommer/veins/blob/master/src/veins/modules/application/ieee80211p/BaseWaveApplLayer.cc – Rens van der Heijden May 15 '17 at 06:55

1 Answers1

1

Fundamentally, a beacon is simply a repeated broadcast message that carries some information of general interest in the vicinity of the sender. You can achieve this in Veins by having your application call its sendDown method every once in a while.

You can find some example code that does this in https://github.com/sommer/veins/blob/veins-4.5/src/veins/modules/application/ieee80211p/BaseWaveApplLayer.cc#L242

Christoph Sommer
  • 6,413
  • 1
  • 14
  • 34