我在erlangen.rou.xml中更改了节点(汽车)的数量:
<flow id="flow0" type="vtype0" route="route0" begin="0" period="3" number="50"/>
我使用了getCreationTime()和simTime来计算TraCIDemo11p和TraCIDemoRSU11p中的消息延迟(端到端延迟):
void TraCIDemo11p::onData(WaveShortMessage* wsm) {
simtime_t msgDelayCar = simTime() - wsm->getTimestamp();
msgDelayVectorCar.record(msgDelayCar);
....
void TraCIDemoRSU11p::onData(WaveShortMessage* wsm) {
simtime_t msgDelayRSU = simTime() - wsm->getCreationTime();
msgDelayVectorRSU.record(msgDelayRSU);
...
它给了我近似相同的延迟!
为什么节点数不会影响端到端延迟?