我正在artery中的RSU和某些服务器之间建立通信。如何转发从车辆传入的消息?
我创建了RSU.ned文件,其门为inout radioIn[numRadios] @directIn
和inout pppg[];
,然后是子模块wlan,radioDriver,networkLayer,tcp,tcpApp,ppp等。
然后,我创建了RSUService.ned,如下所示:
package artery.application;
simple RSUService like ItsG5Service
{
}
和RSUService.cc,我试图在其中通过send(message, "ppp$o", 0)
这是我的World.ned文件定义:
import artery.storyboard.Storyboard;
import inet.environment.contract.IPhysicalEnvironment;
import inet.physicallayer.contract.packetlevel.IRadioMedium;
import traci.Manager;
import artery.inet.RSU;
import inet.common.misc.NetAnimTrace;
import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
import inet.node.inet.StandardHost;
import ned.DatarateChannel;
network World
{
parameters:
bool withStoryboard = default(false);
bool withPhysicalEnvironment = default(false);
int numRoadSideUnits = default(1);
traci.mapper.vehicleType = default("artery.inet.Car");
traci.nodes.vehicleSinkModule = default(".mobility");
storyboard.middlewareModule = default(".middleware");
double per = default(0);
types:
channel C extends DatarateChannel
{
datarate = 10Mbps;
delay = 0.1us;
per = per;
}
submodules:
traci: Manager {
parameters:
@display("p=20,20");
}
radioMedium: <default("Ieee80211ScalarRadioMedium")> like IRadioMedium {
parameters:
@display("p=60,20");
mediumLimitCache.carrierFrequency = 5.9GHz;
}
physicalEnvironment: <default("PhysicalEnvironment")> like IPhysicalEnvironment if withPhysicalEnvironment {
parameters:
@display("p=100,20");
}
storyboard: Storyboard if withStoryboard {
parameters:
@display("p=140,20");
}
rsu1: RSU {
parameters:
mobility.initFromDisplayString = false;
@display("p=173,109;i=veins/sign/yellowdiamond;is=vs");
}
EA: StandardHost {
parameters:
@display("p=181,67;i=device/server_l");
}
AA: StandardHost {
parameters:
@display("p=221,67;i=device/server_l");
}
configurator: IPv4NetworkConfigurator {
parameters:
@display("p=53,134");
}
netAnimTrace: NetAnimTrace {
@display("p=184,142");
}
connections:
rsu1.pppg++ <--> C <--> EA.pppg++;
rsu1.pppg++ <--> C <--> AA.pppg++;
}
现在,当我运行模拟时,车辆与RSU之间的通信很好,RSU(客户端)与服务器之间也进行了握手,但是当我尝试向服务器发送消息时,会发生此错误:
有建议吗?