我想連接inet 3.4.0和靜脈4.4以獲得Tcp/IP支持。 我遵循這些指示(Veins - INET compatibility)甚至更多,但在嘗試運行模擬時出現此錯誤:我不確定要了解TraCIMobility功能。omnet ++ /靜脈:連接inet和veins:TraCIScenarioManagerLaunchd TraciMobility錯誤
<!> Error in module (Veins::TraCIScenarioManagerLaunchd) simple_junction_noTls_ipv4.manager (id=6) at event #23, t=0.2: ASSERT: condition lastUpdate != simTime() false in function changePosition, veins/modules/mobility/traci/TraCIMobility.cc line 192.
這裏是我的車模塊:
import inet.node.inet.AdhocHost;
import org.car2x.veins.base.modules.*;
import org.car2x.veins.modules.nic.Nic80211p;
import org.car2x.veins.base.modules.IMobility;
module Car extends AdhocHost
{
parameters:
//string applType; //type of the application layer
int numWaveRadios = default(1);
string nicType = default("Nic80211p"); // type of network interface card
string veinsmobilityType; //type of the mobility module
string imobilityType; //type of the mobility module
@display("bgl=2");
gates:
input veinsRadioIn[numWaveRadios] @directIn; // gate for sendDirect
submodules:
nic[numWaveRadios]: <nicType> like org.car2x.veins.modules.nic.INic80211p {
parameters:
@display("p=661,287");
}
veinsmobility: <veinsmobilityType> like org.car2x.veins.base.modules.IMobility {
parameters:
@display("p=163,242;i=block/cogwheel");
}
// optional mobility module. Required only if ieee80211p wireless cards are present
imobility: <imobilityType> like org.car2x.veins.base.modules.IMobility if (imobilityType != ""){
parameters:
@display("p=53,200");
}
connections:
for i=0..sizeof(veinsRadioIn)-1 {
veinsRadioIn[i] --> { @display("m=s"); } --> nic[i].radioIn;
nic[i].upperLayerOut --> networkLayer.ifIn++;
nic[i].upperLayerIn <-- networkLayer.ifOut++;
}
}
,這裏是我的配置文件omnetpp.ini的一部分:
###########################################################
## Mobility #
###########################################################
*.node[*].veinsmobilityType ="org.car2x.veins.modules.mobility.traci.TraCIMobility"
*.node[*].imobilityType = "TraCIMobility"
*.node[*].imobilityType.debug = true
*.node[*].veinsmobilityType.debug = true
*.node[*].veinsmobility.x = 0
*.node[*].veinsmobility.y = 0
*.node[*].veinsmobility.z = 1.895
*.node[*].imobility.x = 0
*.node[*].imobility.y = 0
*.node[*].imobility.z = 1.895
感謝您的幫助! 問候,
好消息謝謝:) – cnvp