wifisimulationomnet++inet

How to calculate no of pings (rcvd, sent, lost) in a WLAN simulated in OMNET++?


I have simulated a WLAN in OMNET using INET framework using its application "PingApp"

Here's my NED code:

import inet.applications.pingapp.PingApp;
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import inet.node.inet.WirelessHost;
import inet.node.wireless.AccessPoint;
import inet.physicallayer.wireless.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;

// TODO documentation
//
network WLAN
{
    parameters:
        int numHosts = default(2);
        **.mgmt.numChannels = 2;
        @display("bgb=645,452");
        
             
             @statistic[numLost](title="pings lost"; record=last,vector; interpolationmode=none);
             @statistic[numOutOfOrderArrivals](title="ping out-of-order arrivals"; record=last,vector; interpolationmode=none);
             


    submodules:

        host[numHosts]: WirelessHost {
            @display("p=287,101");
            wlan[*].mgmt.typename = "Ieee80211MgmtStaSimplified";
        }

        ap: AccessPoint {
            @display("p=111,260");
            wlan[*].mgmt.typename = "Ieee80211MgmtApSimplified";
        }

        radioMedium: Ieee80211ScalarRadioMedium {
            @display("p=462,201");
        }
        configurator: Ipv4NetworkConfigurator {
            @display("p=462,320");
        }
}


and ini file:

[General]
network = WLAN
#cmdenv-output-file = omnetpp.log
#debug-on-errors = true
#record-eventlog = true

**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 500m
**.constraintAreaMaxY = 300m
**.constraintAreaMaxZ = 0m

# access point
**.ap.wlan[*].address = "10:00:00:00:00:00"
**.host[*].**.mgmt.accessPointAddress = "10:00:00:00:00:00"
**.mgmt.frameCapacity = 10 

# ping app (host[0] pinged by others)
**.numApps = 1
**.app[0].typename = "PingApp"
*.host[0].app[0].destAddr = ""
*.host[*].app[0].destAddr = "host[0]"
*.host[*].app[0].sendInterval = 10ms
**.app[*].numLost.statistic-recording = true
**.app[*].numLost.result-recording-modes = "all"


**.wlan[*].mac.retryLimit = 7

**.bandName = "5 GHz (20 MHz)" #,"5 GHz (20 MHz)","5 GHz (40 MHz)","5 GHz (80 MHz)","5 GHz (160 MHz)"
**.opMode = "ac"
#**.opMode = "a"

**.wlan[*].radio.antenna.numAntennas = 8 #maximum number of streams for 802.11ac is 8

**.bitrate = 693.3Mbps

**.wlan[*].radio.transmitter.power = 100mW
**.wlan[*].radio.transmitter.headerBitLength = 100b
**.carrierFrequency = 5GHz
**.wlan[*].radio.receiver.sensitivity = -85dBm
**.wlan[*].radio.receiver.snirThreshold = 4dB

[Config Ping1]
description = "host1 pinging host0"
*.numHosts = 2

I have tried all @signal @statistic and statistic-recording = true, result-recording-modes = "all" etc.

Statistics (Vectors are showing these two sequence vectors: pingRxSeq and pingTxSeq) but I cannot seem to figure out how to get following:

o How many pings have been sent? o How many pings have been received? o How is that related to the sendInterval? o How many pings have been lost?

Please help!

I have tried to figure it out but nothing is working. Thanks


Solution

  • The required statistics of pings are recorded. Browse results, go to Scalars tab, and write WLAN.host[1].app[0] as "module filter" - you should look the following page:

    enter image description here

    Where:
    pingTxSeq:count as well as Pings sent is the number of sent pings
    pingRxSeq:count is the number of successfully received answers to pings

    The number of sent pings is directly determined by the value of sendInterval and time of the experiment (i.e. next ping is sent every sendInterval time). Take a look at your local src/inet/applications/pingapp/PingApp.ned or INET API PingApp where parameters of PingApp are described.