Can you explain to me the meaning of this code

98 views
Skip to first unread message

Đạt Lê khánh

unread,
Nov 25, 2014, 2:53:53 AM11/25/14
to omn...@googlegroups.com
In inetmanet / src / wpan / applications / Ieee802154TestApp / Ieee802154TestApp.cc. 


void Ieee802154TestApp::handleLowerMsg(cMessage* apMsg)
{
...
  simtime_t e2eDelay;
    Ieee802154AppPkt* tmpPkt = check_and_cast<Ieee802154AppPkt *>(apMsg);
    e2eDelay = simTime() - tmpPkt->getCreationTime();
    e2eDelayVec.record(SIMTIME_DBL(e2eDelay));
....
}

and 

sumE2EDelay += e2eDelay;
meanE2EDelayVec.record(sumE2EDelay/numReceived);


I know this code to calculate delay by dont understand meaning of these, Can you explain to me? 

thank you!

Alfonso Ariza Quintana

unread,
Nov 25, 2014, 2:58:22 AM11/25/14
to omn...@googlegroups.com

1.- End to end delay vector

2.- mean end-to-end delay

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

Đạt Lê khánh

unread,
Nov 25, 2014, 3:07:15 AM11/25/14
to omn...@googlegroups.com, aari...@hotmail.com
Can you explain this in more detail? For example, 

 e2eDelay = simTime() - tmpPkt->getCreationTime();

What is meaning of this line code?

Vào 14:58:22 UTC+7 Thứ ba, ngày 25 tháng mười một năm 2014, Alfonso Ariza Quintana đã viết:

Michael Kirsche

unread,
Nov 25, 2014, 8:51:43 AM11/25/14
to omn...@googlegroups.com
Simple...
end-to-end-delay is calculated by substracting the creation time (getCreationTime) of the received packet from the current time (simTime).

Lê Khánh Đạt

unread,
Nov 25, 2014, 10:38:41 AM11/25/14
to omn...@googlegroups.com
what is "creation time", can you give me an example? 

--
You received this message because you are subscribed to a topic in the Google Groups "omnetpp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omnetpp/A3gnGzzu6n4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to omnetpp+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
---------------Le Khanh Dat
--------Student of K56D-FET-UET-VNU
-----Tel: 0164.874.1193

Michael Kirsche

unread,
Nov 25, 2014, 5:57:41 PM11/25/14
to omn...@googlegroups.com
You're kidding right?

getCreationTime -> time that the message was created.
This is more than obvious...

Đạt Lê khánh

unread,
Nov 25, 2014, 10:12:19 PM11/25/14
to omn...@googlegroups.com
I know meaning of  this code. in fact, I am confused in code delay calculation. In more detail, I set up time between two consecutive packets is exponential(10s), exponential(5s) is Time that the first packet is sent. That mean after  10s a new packet will be sent. For example, Current time is 310s i think in this case simTime = 310s and i dont know what is value of creationTime? sorry for my lack of knowledge.


Vào 05:57:41 UTC+7 Thứ tư, ngày 26 tháng mười một năm 2014, Michael Kirsche đã viết:

Mohsen Sichani

unread,
Nov 26, 2014, 3:26:50 AM11/26/14
to omn...@googlegroups.com
Hi

The attached book is Official OMNET++ manual guide, please see 
7.4.4 Random Variates

You will find the answer of your question there.

Good luck
Omnet++ simulator manual guide.pdf

Mohsen Sichani

unread,
Nov 26, 2014, 3:30:19 AM11/26/14
to omn...@googlegroups.com


On Wednesday, November 26, 2014 4:12:19 PM UTC+13, Đạt Lê khánh wrote:

Alfonso Ariza Quintana

unread,
Nov 26, 2014, 7:06:39 AM11/26/14
to omn...@googlegroups.com

A very common model used to arrival packets is the Poisson distribution, this distribution set the mean number of packet per unit time. The Poisson distribution is modeled using a exponential distribution.

Poisson distribution with mean N arrival packet per second, equivalent to an exponential arrival time between packets of mean 1/N

FEIT

unread,
Nov 6, 2020, 7:21:42 AM11/6/20
to OMNeT++ Users
Hi Alfonso, under sensornetwork>>omnetpp.ini file, I found the following code. Would you please explain me what's the  startTime parameter for and why it is exponential(1s)?
*.sensor*.app[0].sendInterval = 1s
*.sensor*.app[0].startTime = exponential(1s)

Thank you

Alfonso Ariza Quintana

unread,
Nov 6, 2020, 10:34:21 AM11/6/20
to omn...@googlegroups.com

It is the time that the application module Will start to send packets, the use a random distribution is to force that the application module could be not synchronized, in other case, all the app modules will start the transmission exactly at the same time, that is not a very realistic assumption, that all the nodes could start the transmission exactly at the same time

 

Enviado desde Correo para Windows 10

--
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.

Reply all
Reply to author
Forward
0 new messages