gpt4 book ai didi

omnet++ - 在 Omnet++ 中通过 AP 将无线主机连接到标准主机

转载 作者:行者123 更新时间:2023-12-05 07:33:24 27 4
gpt4 key购买 nike

NED 文件:

import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
import inet.node.inet.WirelessHost;
import inet.node.wireless.AccessPoint;
import inet.visualizer.contract.IIntegratedVisualizer;
import inet.node.inet.StandardHost;
import ned.DatarateChannel;
import inet.physicallayer.contract.packetlevel.IRadioMedium;
import inet.linklayer.contract.IWirelessNic;
//import inet.physicallayer.commom.packetlevel.Radio;
//import inet.linklayer.contract.IWirelessNic;

channel Link extends ned.DatarateChannel
{
parameters:
int cost = default(0);
}

network clientserverWLAN

{
parameters:

string mediumType = default("IdealRadioMedium");
//**.mgmt.numChannels = 2;

submodules:

visualizer: <default("IntegratedCanvasVisualizer")> like IIntegratedVisualizer if hasVisualizer() {
parameters:
@display("p=100,50");
}
configurator: IPv4NetworkConfigurator {
parameters:
@display("p=100,150");

}
radioMedium: <mediumType> like IRadioMedium {
parameters:

@display("p=100,250");
}


host1: WirelessHost {
@display("r=,,#707070");

}
ap: AccessPoint {
@display("p=349,167;r=,,#707070");

}
server: StandardHost {
@display("p=224,168;i=device/server");
}

connections:
ap.ethg++ <--> DatarateChannel { delay = 0.1us; datarate = 10Mbps; } <--> server.ethg++;


}

INI 文件:

[General]
network = clientserverWLAN
output-scalar-file-append = false
output-vector-file-append = false
runnumber-width = 0
sim-time-limit = 10s

record-eventlog = true

**.wlan[*].mgmtType = "Ieee80211MgmtAPSimplified"
**.wlan[*].radioType ="Ieee80211ScalarRadioMedium"
#**.wlan[*].radioType ="Ieee80211Nic"
#**.wlan[*].radioType ="IdealWirelessNic"
**.wlan[*].macType = "Ieee80211Mac"
**.wlan*.bitrate = 2Mbps

**.host1.numUdpApps=1
**.host1.udpApp[*].typename="UDPBasicApp"
**.host1.udpApp[*].destAddresses = "server"
**.host1.udpApp[*].destPort = 1000
**.host1.udpApp[*].messageLength = 1000B
**.host1.udpApp[*].startTime = 0s
**.host1.udpApp[*].sendInterval = 10s
**.host1.udpApp[*].stopTime = 300s




**.server.numUdpApps = 1
**.server.udpApp[*].typename="UDPSink"
**.server.udpApp[*].localPort = 1000




**.ap.wlan[*].mac.address = "10:00:00:00:00:00"
**.ap.wlan[*].radio.typename ="Ieee80211ScalarRadioMedium"
#**.ap.wlan[*].radio.typename ="Ieee80211Nic"
#**.ap.wlan[*].radio.typename ="IdealWirelessNic"
**.ap.wlan[*].mgmt.typename = "Ieee80211MgmtAPSimplified"

**.host1.wlan[*].radio.typename = "Ieee80211ScalarRadioMedium"
#**.host1.wlan[*].radio.typename = "Ieee80211Nic"
#**.host1.wlan[*].radio.typename = "IdealWirelessNic"
**.host1.wlan[*].mgmt.typename = "Ieee80211MgmtAPSimplified"
**.mac.address = "auto"

错误:

Submodule radio: No module type named 'Ieee80211ScalarRadioMedium' found that implements module interface inet.physicallayer.contract.packetlevel.IRadio (not in the loaded NED files?), at /Users/ashish/omnetpp-5.3/samples/inet/src/inet/linklayer/ieee80211/Ieee80211Nic.ned:77 -- in module (omnetpp::cModule) clientserverWLAN.host1.wlan[0] (id=42), during network setup

请帮助建立无线主机到 AP 和服务器之间的通信

正在尝试运行 UDP 应用

最佳答案

您应该通过替换来指定 radio channel 的类型

radioMedium: <mediumType> like IRadioMedium

radioMedium: Ieee80211ScalarRadioMedium

关于omnet++ - 在 Omnet++ 中通过 AP 将无线主机连接到标准主机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50617868/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com