我正在尝试创建一个具有至少三种不同技术的网络,包括(WiFi、蓝牙、LORA 和/或 5G)。我的问题是:
1-是否可以将它们放在同一个网络中?2-如果可能,如何实现具有两个以上接口(NIC)的节点(无线主机)?
我正在开发 OMNET++ 6 pre 11 作为具有 INET 框架和 SIMU5g、FLORA 的模拟器。
从下面的示例场景中,WiFi 和 LORA 技术叠加在一起,如图所示:
当我运行模拟器时,我收到以下错误消息:
check_and_cast(): 网络初始化期间,无法将 'inet::physicallayer::IListening*' 类型转换为 'constflora::LoRaBandListening *' -- 在模块 (flora::LoRaMedium) My_Net.LoRaMedium (id=9) 中
Net代码和ini代码(配置代码)呈现:
NED 文件:
'
import inet.physicallayer.wireless.apsk.packetlevel.errormodel.ApskErrorModel;
import inet.physicallayer.wireless.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
import inet.queueing.base.ActivePacketSinkBase;
import inet.visualizer.common.IntegratedVisualizer;
import inet.node.wireless.AccessPoint;
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import inet.node.inet.WirelessHost;
import inet.environment.common.PhysicalEnvironment;
import inet.physicallayer.wireless.common.contract.packetlevel.IAnalogModel;
import inet.physicallayer.wireless.common.contract.packetlevel.IObstacleLoss;
import inet.physicallayer.wireless.common.contract.packetlevel.IPathLoss;
import inet.applications.udpapp.UdpBasicApp;
import inet.node.inet.Router;
import inet.node.internetcloud.InternetCloud;
import flora.LoRaPhy.LoRaMedium;
import flora.LoraNode.LoRaNode;
import flora.LoraNode.LoRaGW;
import inet.node.inet.StandardHost;
import inet.node.ethernet.Eth1G;
network My_Net
{
parameters:
@display("bgb=57.6,78.6;bgg=77.6,10,grey95;bgu=meter");
int numHosts = default(1);
int numberOfNodes = default(1);
int numberOfGateways = default(1);
submodules:
configurator: Ipv4NetworkConfigurator {
@display("p=5.4,6.75");
}
radioMedium: Ieee80211ScalarRadioMedium {
@display("p=28.08,56.97");
}
AP1: AccessPoint {
@display("p=39.728207,21.584618;r=,,#707070");
}
target[numHosts]: WirelessHost {
@display("p=19.082052,32.220516;i=device/cellphone");
}
analogModel: <default("ScalarAnalogModel")> like IAnalogModel {
@display("p=560.512,292.336");
}
loRaNodes[numberOfNodes]: LoRaNode {
@display("p=53,78");
}
loRaGW[numberOfGateways]: LoRaGW {
@display("p=27.841028,58.18462;is=s");
}
LoRaMedium: LoRaMedium {
@display("p=31.282053,64.44103");
}
networkServer: StandardHost {
parameters:
@display("p=4.3794875,72.10513");
}
internetCloud: InternetCloud {
@display("p=29.56154,72.10513");
}
gwRouter[numberOfGateways]: Router {
@display("p=50.833336,69.44616");
}
nsRouter: Router {
@display("p=17.67436,72.730774");
}
connections:
networkServer.ethg++ <--> Eth1G <--> nsRouter.ethg++;
nsRouter.pppg++ <--> Eth1G <--> internetCloud.pppg++;
for i=0..numberOfGateways-1 {
internetCloud.pppg++ <--> Eth1G <--> gwRouter[i].pppg++;
gwRouter[i].ethg++ <--> Eth1G <--> loRaGW[i].ethg++;
}
}
'
配置代码:
[General]
**.mac.promiscuous=true
**.physicalLinkVisualizer.displayLinks = true
network = My_Net
**.target[*].LoRaNic.radio.typename = "LoRaRadio"
## access point configuration
*.AP*.numWlanInterfaces = 1
*.AP*.wlan[*].mgmt.typename = "Ieee80211MgmtAp"
*.AP1.wlan[0].address = "000000000001"
*.AP1.wlan[0].radio.channelNumber = 0
#
##Host configurations
*.numHosts = 1
*.target[*].numWlanInterfaces = 2
## target 0 is associated with AP1 on channel 0
*.target[*].wlan[*].mgmt.typename = "ExtendedIeee80211MgmtSta"
*.target[*].wlan[0].mgmt.accessPointAddress = "001111111111"
*.target[*].wlan[0].radio.channelNumber = 0
*.target[*].wlan[1].mgmt.accessPointAddress = "002222222222"
*.target[*].wlan[1].radio.channelNumber = 1
*.target[*].wlan[*].agent.activeScan = false
*.target[*].wlan[*].agent.defaultSsid = ""
*.target[*].wlan[0].agent.channelsToScan = ""
# ------------------ For LORA --------------------------------
**.maxTransmissionDuration = 4s
**.vector-recording = false
rng-class = "cMersenneTwister"
**.loRaGW[*].numUdpApps = 1
**.loRaGW[0].packetForwarder.localPort = 2000
**.loRaGW[0].packetForwarder.destPort = 1000
**.loRaGW[0].packetForwarder.destAddresses = "networkServer"
**.loRaGW[0].packetForwarder.indexNumber = 0
**.networkServer.numApps = 1
**.networkServer.**.evaluateADRinServer = false
**.networkServer.app[0].typename = "NetworkServerApp"
**.networkServer.app[0].destAddresses = "loRaGW[0]"
**.networkServer.app[0].destPort = 2000
**.networkServer.app[0].localPort = 1000
**.networkServer.app[0].adrMethod = ${"avg"}
**.numberOfPacketsToSend = 0 #${numberOfPAckets = 200..5000 step 200} #100 #obviously 0 means infinite number of packets
#sim-time-limit = 5d
#simtime-resolution = -11
#repeat = 30
**.timeToFirstPacket = exponential(1000s)
**.timeToNextPacket = exponential(1000s)
**.alohaChannelModel = false
#nodes features
**.numberOfNodes = 1
**.constraintAreaMaxX = 2376.0m
**.constraintAreaMaxY = 1090.0m
**.loRaNodes[0].**.initialX = 40.63m
**.loRaNodes[0].**.initialY = 29.08m
**.loRaNodes[0].**initialLoRaSF = 8
**.loRaNodes[0].**initialLoRaTP = 8dBm
**.loRaNodes[0].**initialLoRaBW = 125 kHz
**.loRaNodes[0].**initialLoRaCR = 4
**.loRaNodes[0].**.initFromDisplayString = false
**.loRaNodes[0].**.evaluateADRinNode = false
#gateway features
**.numberOfGateways = 1
**.loRaGW[0].**.initialX = 44.00m
**.loRaGW[0].**.initialY = 44.00m
**.LoRaGWNic.radio.iAmGateway = true
**.loRaGW[*].**.initFromDisplayString = false
#power consumption features
**.loRaNodes[*].LoRaNic.radio.energyConsumer.typename = "LoRaEnergyConsumer"
**.loRaNodes[*].**.energySourceModule = "IdealEpEnergyStorage"
**.loRaNodes[*].LoRaNic.radio.energyConsumer.configFile = xmldoc("energyConsumptionParameters.xml")
#general features
**.sigma = 3.57
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxZ = 0m
LoRaNetworkTest.**.radio.separateTransmissionParts = false
LoRaNetworkTest.**.radio.separateReceptionParts = false
**.ipv4Delayer.config = xmldoc("cloudDelays.xml")
**.radio.radioMediumModule = "LoRaMedium"
**.LoRaMedium.pathLossType = "LoRaLogNormalShadowing"
**.minInterferenceTime = 0s
**.displayAddresses = false