handleParkingUpdate()到底是做什么的? [英] What exactly does handleParkingUpdate() do?

查看:46
本文介绍了handleParkingUpdate()到底是做什么的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为智能停车仿真实现VANET模型.试图完全了解TraCIDemo11pp.cc及其相关文件,并且尽管理解了TicToc教程,却很难使我了解每个模块的总体结构以及它们之间的通信.

我了解SUMO和OMNETPP是如何并行运行的,来自OMNETPP的TraCIScenarioManager与TraCI服务器进行通信,以便与SUMO等交换信息.但是,我很难理解如何使用TraCIDemoApp. /p>

这个问题很具体,但是希望得到答案,这样我就可以找出其余的问题.任何帮助,将不胜感激!

谢谢, 卫斯理

解决方案

在Erlangen市,静脉带有一个非常小的演示示例:

车辆始于大学的停车场,然后驶向视线以外的地方.一段时间后,第一辆车( node [0] )模拟了一次事故并停止了行驶.因此,它将广播此信息,该信息通过RSU重新分配给范围内的所有其他车辆.反过来,他们在重新广播有关事故的信息时,尝试使用到达目的地的替代路线.因此,新产生的车辆也会得到通知,并立即尝试选择到目的地的另一条路线.

所有这些(即事故,广播,交换路径)都在TraCIDemo*文件中实现,这些文件表示使用 NIC (即 PHY)在汽车或RSU中运行的VANET应用程序 MAC )进行通信.请参阅>发生事故时车辆改行的政策是什么? 了解更多信息.

handleParkingUpdate()用于对已从行驶状态切换为泊车状态的车辆做出反应,反之亦然.根据当前状态以及在仿真中是否应允许停放的汽车进行通信,此方法会在 BaseConnectionManager 中注册车辆的 NIC 模块,该模块涉及处理实际的无线通信.有关更多详细信息,请参阅此模块,或从一个应用程序层到另一个应用程序层跟踪数据包(即两次通过网络堆栈和无线传输).

I am trying to implement a VANET model for smart parking simulations. Trying to fully understand the TraCIDemo11pp.cc and files relevant to it and its proving quite difficult to get my head around the general structure of each module and the communications between them despite understanding the TicToc tutorial.

I understand how SUMO and OMNETPP are run in parallel, TraCIScenarioManager from OMNETPP communicates with the TraCI server in order to exchange information to SUMO etc. But I'm finding it hard to get my head around how the TraCIDemoApp is utilised.

The question is quite specific, but hoping an answer to it would let me figure out the rest. Any help would be appreciated!

Thanks, Wesley

解决方案

Veins comes with a very small demo example in the city of Erlangen:

Vehicles start at the parking lot of the university and drive to a location off-sight. After some time the first vehicle (node[0]) emulates an accident and stops driving. Therefore, it broadcasts this information which gets re-distributed via the RSU to all other vehicles in range. They, in turn, try to use an alternative route to their destination while re-broadcasting the information about the accident. Thus, newly spawned vehicles also get informed and immediately try to choose a different route to the destination.

All of this (i.e. accident, broadcasting, switching route) is implemented in the TraCIDemo* files which represent a VANET application running in a car or RSU utilizing the NIC (i.e. PHY & MAC) to do communication. See what policy is based vehicle rerouting in case of accident? for more information.

handleParkingUpdate() is used to react to a vehicle having switched it's state from driving to parking or vice versa. Depending on the current state and whether parked cars should be allowed to communicate in the simulation this method registers the vehicle's NIC module at the BaseConnectionManager which is involved in handling the actual wireless communication. For more details see this module or follow a packet from one application layer to another (i.e. twice through the networking stack and the wireless transmission).

这篇关于handleParkingUpdate()到底是做什么的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆