隐式块序列化

时间:2018-07-18 12:52:06

标签: networking radio omnet++ inet

我目前正在尝试使用omnet ++使用主要/次要发送者/接收者节点来模拟一个小型认知无线电网络。为了使其正常工作,我想到了将主要发送方配置为可以在需要时进行对话的节点,以及将辅助发送方配置为使用Inet框架的CSMA协议的节点的想法。但是,当我启动模拟时,辅助发件人尝试发送数据包时,我会收到以下消息:

  

禁用隐式块序列化以防止不可预期的性能下降(您可以考虑更改Chunk :: enableImplicitChunkSerialization标志或将PF_ALLOW_SERIALIZATION标志传递给peek)-在模块(inet :: AckingMac)中CR_test.PU.wlan [0] .mac(id = 52),在t = 0.012541991668s,事件#28

有人知道如何克服这个问题吗?

这是我的.ini文件:

[General]

network = CR_test
sim-time-limit = 1s

*.**.ipv4.arp.typename = "GlobalArp"

*.PU.numApps = 1
*.PU.app[0].typename = "UdpBasicApp"
*.PU.app[0].destAddresses = "ReceptorPU"
*.PU.app[0].destPort = 5000
*.PU.app[0].messageLength = 1000B
*.PU.app[0].sendInterval = exponential(10ms)
*.PU.app[0].packetName = "UDPData"

*.SU.numApps = 1
*.SU.app[0].typename = "UdpBasicApp"
*.SU.app[0].destAddresses = "ReceptorSU"
*.SU.app[0].destPort = 6000
*.SU.app[0].messageLength = 1000B
*.SU.app[0].sendInterval = exponential(10ms)
*.SU.app[0].packetName = "UDPData"

*.ReceptorPU.numApps = 1
*.ReceptorPU.app[0].typename = "UdpSink"
*.ReceptorPU.app[0].localPort = 5000

*.ReceptorSU.numApps = 1
*.ReceptorSU.app[0].typename = "UdpSink"
*.ReceptorSU.app[0].localPort = 6000

*.**.**.bitrate = 1Mbps

*.ReceptorSU.wlan[0].typename = "WirelessInterface"                             ## With CSMA
*.ReceptorSU.wlan[0].radio.typename = "UnitDiskRadio"
*.ReceptorSU.wlan[0].mac.typename = "CsmaCaMac"

*.SU.wlan[0].typename = "WirelessInterface"                         
*.SU.wlan[0].radio.typename = "UnitDiskRadio"
*.SU.wlan[0].mac.typename = "CsmaCaMac"


*.ReceptorPU.wlan[0].typename = "AckingWirelessInterface"                       ## Without CSMA
*.ReceptorPU.wlan[0].mac.useAck = false
*.ReceptorPU.wlan[0].mac.fullDuplex = false

*.PU.wlan[0].typename = "AckingWirelessInterface"                       
*.PU.wlan[0].mac.useAck = false
*.PU.wlan[0].mac.fullDuplex = false

*.**.wlan[0].radio.transmitter.communicationRange = 300m
*.**.wlan[0].radio.receiver.ignoreInterference = true
*.**.wlan[0].radio.transmitter.interferenceRange = 600m
*.PU.wlan[0].radio.displayCommunicationRange = true
*.PU.wlan[0].radio.displayInterferenceRange = true
*.SU.wlan[0].radio.displayCommunicationRange = true
*.SU.wlan[0].radio.displayInterferenceRange = true
*.visualizer.mediumVisualizer.displaySignals = true
*.visualizer.physicalLinkVisualizer.displayLinks = true

这是我的.ned文件:

package inet.examples.CR;
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import inet.node.inet.INetworkNode;
import inet.physicallayer.contract.packetlevel.IRadioMedium;
import inet.visualizer.contract.IIntegratedVisualizer;


network CR_test
{

parameters:

    @display("bgb=361,394");
    @figure[rcvdPkText_PU](type=indicatorText; pos=350,20; anchor=w; font=,18; textFormat="packets received by PU: %g"; initialValue=0);
    @statistic[packetReceived_PU](source=ReceptorPU.app[0].packetReceived; record=figure(count); targetFigure=rcvdPkText_PU);
    @figure[rcvdPkText_SU](type=indicatorText; pos=350,50; anchor=w; font=,18; textFormat="packets received by SU: %g"; initialValue=0);
    @statistic[packetReceived_SU](source=ReceptorSU.app[0].packetReceived; record=figure(count); targetFigure=rcvdPkText_SU);

    @figure[rcvdPkTextPU](type=indicatorText; pos=350,80; anchor=w; font=,18; textFormat="packets sent by PU: %g"; initialValue=0);
    @statistic[packetReceivedPU](source=PU.app[0].packetSent; record=figure(count); targetFigure=rcvdPkTextPU);
    @figure[rcvdPkTextSU](type=indicatorText; pos=350,110; anchor=w; font=,18; textFormat="packets sent by SU: %g"; initialValue=0);
    @statistic[packetReceivedSU](source=SU.app[0].packetSent; record=figure(count); targetFigure=rcvdPkTextSU);


submodules:
    visualizer: <default("IntegratedCanvasVisualizer")> like IIntegratedVisualizer if hasVisualizer() {
        @display("p=80,35");
    }
    configurator: Ipv4NetworkConfigurator {
        @display("p=170,35");
    }
    radioMedium: <default("UnitDiskRadioMedium")> like IRadioMedium {
        @display("p=260,35");
    }
    PU: <default("WirelessHost")> like INetworkNode {
        @display("p=50,160");
    }
    ReceptorPU: <default("WirelessHost")> like INetworkNode {
        @display("p=300,160");
    }
    ReceptorSU: <default("WirelessHost")> like INetworkNode {
        @display("p=300,280");
    }
    SU: <default("WirelessHost")> like INetworkNode {
        @display("p=50,280");
    }
}

2 个答案:

答案 0 :(得分:0)

当请求Packet API将FooChunk转换为不相关的BarChunk时,会发生这种情况。唯一的方法是将FooChunk转换为二进制表示形式(BytesChunk),然后将其转换回BarChunk。该过程通常很慢,并且很可能是C ++中的错误(这就是默认情况下禁用它的原因)。如果您在仿真中不使用任何新的C ++代码,而仅使用NED和INI文件,则该错误最有可能在INET中出现。

答案 1 :(得分:0)

您只需要使用最新的Inet版本(4.2.1)。该错误已解决