Reputation: 21
I'm currently trying to simulate a little cognitive radio network with omnet++ using primary/secondary sender/receiver nodes. To make it work, I had the idea of configuring the primary sender as a node that talks whenever it wants and configuring the secondary send as a node that uses the CSMA protocol of the Inet framework. But when I launch the simulation, I get the following message as soon as the secondary sender tries to send a packet:
Implicit chunk serialization is disabled to prevent unpredictable performance degradation (you may consider changing the Chunk::enableImplicitChunkSerialization flag or passing the PF_ALLOW_SERIALIZATION flag to peek) -- in module (inet::AckingMac) CR_test.PU.wlan[0].mac (id=52), at t=0.012541991668s, event #28
Does somebody knows how to overcome this issue?
Here is my .ini file :
[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
Here is my .ned file :
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");
}
}
Upvotes: 1
Views: 1275
Reputation: 1
You just need to use the latest Inet release (4.2.1). This error was fixed
Upvotes: 0
Reputation: 960
This happens when the Packet API is requested to convert a FooChunk to an unrelated BarChunk. The only way to do this is to convert the FooChunk to a binary representation (BytesChunk) and then convert it back to a BarChunk. This process is usually slow and most likely it's a bug in C++ (that's why it's disabled by default). If you don't use any new C++ code in your simulation, only NED and INI files, then the bug is most likely in INET.
Upvotes: 1