如何在 Veins 4.6 的 RSUExampleScenario 中定期从 RSU 发送消息?

How to send message from RSU periodically In the RSUExampleScenario in Veins 4.6?

在我的模拟中,我想让 RSU(RoadSide Unit)每 30 秒向范围内的车辆发送一次消息。在另一项工作中,WSM 消息由 RSU 生成,并将由车辆接收。我怎么可能更改提供的 TraCIDemoRSU11p.cc in Veins 4.6 to do this? I know handlePositionUpdate 用于移动模块。但是因为RSU的位置没有变化,这个功能对RSU有用吗?

您可以将活动安排为自我消息(例如 BaseWaveApplLayer.cc:106) and upon receiving this event send your WSM and re-schedule the event (e.g. BaseWaveApplLayer.cc:239)。