How to detect errors in message after put the bit error rate (ber) in the ned file.

122 views
Skip to first unread message

Martin Pons Mayol

unread,
May 15, 2018, 1:26:42 PM5/15/18
to omn...@googlegroups.com
Hello group,

I'm working with an omnet project and this is my question:

I have configured the channel in my ned file like this:

simple Sender
{
    parameters:
        @display("i=block/routing");
        int packetLength @unit(byte) = default(128B);
    gates:
        input in;
        output out;
}

simple Receiver
{
    parameters:
        @display("i=block/process");
        int packetLength @unit(byte) = default(128B);
    gates:
        input in;
        output out;
}

channel Canal extends ned.DatarateChannel
{
datarate = 100Mbps;
delay = 100us;
ber = 1e-3;
}

Now, how I detect the error bits in the handleMessage method of the cc file? I mean, I want to count the messages that are transmitted with wrong bits through this channel.

The error bits are automatically generated or I have to obtain that ber in the cc file and I have to generate those?

Alfonso Ariza Quintana

unread,
May 16, 2018, 4:06:36 AM5/16/18
to omn...@googlegroups.com

The packet has a flag  hasBitError(), the channel computes the probability of errors and set the flag to true if the packet has an error, you only need to check it

 

If (pkt->hasBitError()) {

  // packet has errors,  discard it

  delete pkt;

  return;

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

Martin Pons Mayol

unread,
May 16, 2018, 4:57:26 AM5/16/18
to OMNeT++ Users
Thank you man, I was working with cMessage instead of cPacked this is the cause that I didn't find any method like this.

Asmae Bengag

unread,
May 16, 2018, 5:11:59 AM5/16/18
to omn...@googlegroups.com
Hello
I am working with OMNeT++ project especially in Castalia , Plz How I calculate Bad Packets Ratio ?
Cordially

To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+unsubscribe@googlegroups.com.

Alfonso Ariza Quintana

unread,
May 16, 2018, 5:44:24 AM5/16/18
to omn...@googlegroups.com

Define Bad packet ratio. You can measure the PDR, number of packets received/sent.

Asmae Bengag

unread,
May 16, 2018, 6:01:30 AM5/16/18
to omn...@googlegroups.com
Thakns for your answer, Yes I Calculate  PDR(Packet Delivery Ratio) , And how I find the the number of failed packets received that did not pass the cyclic redundancy check (CRC) ? To use It in Bad Packet Ratio ?

To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+unsubscribe@googlegroups.com.

Alfonso Ariza Quintana

unread,
May 16, 2018, 8:03:30 AM5/16/18
to omn...@googlegroups.com

The application module usully records the number of packets received, and sent. The diference between both is the number of packets that have been discarded due to errors, collisions, queue overflows ….

The bit error is not the only cause that can make that a packet could be discarded.

 

 

De: omn...@googlegroups.com [mailto:omn...@googlegroups.com] En nombre de Asmae Bengag
Enviado el: miércoles, 16 de mayo de 2018 12:01
Para: omn...@googlegroups.com
Asunto: Re: [Omnetpp-l] How to detect errors in message after put the bit error rate (ber) in the ned file.

 

Thakns for your answer, Yes I Calculate  PDR(Packet Delivery Ratio) , And how I find the the number of failed packets received that did not pass the cyclic redundancy check (CRC) ? To use It in Bad Packet Ratio ?

Reply all
Reply to author
Forward
0 new messages