0

In tic toc, they are tic. out - > {delay = exponential (200ms);} - > toc. in; The out gate is connected to the in gate and then transmitted through the out gate. The following code:

CMessage * MSG = new cMessage ("tictocMsg");
Send (msg, "out");

But in the case of veins, how do they transmit data? I know it's wireless, but how exactly is it transmitted?

Sun
  • 1
  • 2

1 Answers1

0

As you correctly noted, Veins provides models for wireless communication. Both the vehicles, and the RSU use the Nic80211p model that provides wireless communication.

Connected models can pass messages to this model which will be received by neighboring nodes. For details on how this works internally, in particular the specific implementations of mac and phy layer that are used by the Nic80211p (Mac1609_4 and PhyLayer80211p) are interesting, as well as the base classes of the phy, BasePhyLayer and ChannelAccess.

Horstinator
  • 548
  • 1
  • 5
  • 18
  • In a normal omnet project, I understand "Send (MSG, "out")", Sending MSG through "out" , but I can't understand how sending a message in Veins, thank you for your answer, but I should not consider the underlying MAC and PHY base class. – Sun Oct 14 '19 at 07:29
  • I don't exactly understand what you want. If you simply want to know how to transmit data, have a look at the implementation of `TraCIDemo11p`. If you want to _understand_ how that works (as stated in your question), you will have to look at the mac and phy classes. – Horstinator Oct 15 '19 at 09:09
  • I'm asking the question because I don't know how the tracodemo11p class implements message transmission,I would be grateful if you would explain. sorry – Sun Nov 04 '19 at 01:54
  • `TraCIDemo11p` uses its `sendDown` method for message transmission, which is derived from its base class. – Horstinator Nov 04 '19 at 13:00
  • I checked the code and found that ***sendDown*** function is used for sending data, but I changed the map in the example provided by veins, and I don't know why RSU didn't receive the data sent by tracidemo11 class with ***sendDown***,Excuse me for disturbing you. – Sun Nov 04 '19 at 13:20
  • That can have various reasons, e.g., too large distance or a too crowded channel. Using the OMNeT++ GUI you can trace messages through the simulation and observe where they are lost. – Horstinator Nov 05 '19 at 12:44