I am trying to calculate delay in multiple hop wireless networks by using the AWK program from trace file but I have problem. It saves packet send time of last node as send time.
if ( $19 == "AGT" && $1 == "r" && $35 == "cbr")
{
if(recv == 0)
last_pkt_recv = $3;
}
else
jitter+=$3 - last_pkt_recv;
j_count++;
last_pkt_recv = $3
recv++;
bytes+=$37
ft_time[$41] = $3;
delay += ft_time[$41]-st_time[$41]
these code helps you to calculate delay using awk script
BEGIN {
seqno = -1;
count = 0;
#end-to-end delay
if($4 == "AGT" &;& $1 == "s") {
start_time[$6] = $2;
} else if(($7 == "tcp") && ($1 == "r")) {
end_time[$6] = $2;
} else if($1 == "D" && $7 == "tcp") {
end_time[$6] = -1;
END {
for(i=0; i; 0) {
delay[i] = end_time[i] - start_time[i];
count++;
delay[i] = -1;
for(i=0; i 0) {
n_to_n_delay = n_to_n_delay + delay[i];
n_to_n_delay = n_to_n_delay/count;
print "\n";
print "Average End-to-End Delay = " n_to_n_delay * 1000 " ms";
You can use this code to calculate the end-to-end delay. However, you should check the columns of your trace file.
# AWK Script for calculating:
# => Average End-to-End Delay.
# ===================================================================
# droppedPackets = 0;
# receivedPackets = 0;
if($4 == "AGT" && $1 == "s" && seqno < $6) {
seqno = $6;
# else if(($4 == "AGT") && ($1 == "r")) {
# receivedPackets++;
# } else if ($1 == "D" && $7 == "tcp" && $8 > 512){
# droppedPackets++;
# }
if($4 == "AGT" && $1 == "s") {
# print "GeneratedPackets = " seqno+1;
# print "ReceivedPackets = " receivedPackets;
# print "Packet Delivery Ratio = " receivedPackets/(seqno+1)*100
#"%";
# print "Total Dropped Packets = " droppedPackets;
just work out to copeup with ur trace file you will get the results.
Thank you , I got code for m trace file
Patch of directional antenna for NS2.35
04 May 2015 1,657 1 View
This is with regards to NS2 of wireless communication.
01 February 2015 1,324 3 View
Netsim Ns2
01 February 2015 8,379 0 View
I am trying to calculate delay in multiple hop wireless network by using AWK program from trace file but I have problem . it saves packet send time of last node as send time.
06 July 2014 5,355 0 View
My name is Apurva Saoji. I am a Ph.D scholar in Computer engineering in India. I am looking for international expert in reviewing my PhD thesis, "Competitive Optimization Techniques to Minimize...
07 August 2024 4,600 2 View
I am reaching out to seek your valuable advice and recommendations regarding the best software tools to use for this research. Specifically, I am looking for software with a user-friendly...
22 July 2024 3,794 1 View
There exists a neural network model designed to predict a specific output, detailed in a published article. The model comprises 14 inputs, each normalized with minimum and maximum parameters...
14 July 2024 2,714 3 View
hello dear i need to learn this program any one know ??? i want to convert path propagation to Image reconstruction 2d how is that done ? lik this image??
14 July 2024 1,811 0 View
how to convert the area with 4 node and convert it to reconstruction image in wireless insite?like the fig
14 July 2024 4,435 0 View
I would like to perform a literature review at this time on augmented learning and learning augmented algorithms to enhance performance-guided surgery
06 July 2024 246 1 View
I am modelling CFS Sheath wall in abaqus and i am applying the 100 mm displacement but i am getting high reach force close to 150 kN but i need it till 50kN. I have used mesh independent fastner...
27 June 2024 4,212 2 View
Forecasting within neural Network
24 June 2024 6,800 1 View
Please give answer. Also explain mathematical equations behind this.
22 June 2024 6,869 2 View
In CNN(convolution neural network), can the feature map obtained determinately by a random initialization convolution kernel? if not, how to decide the weights in convolution kernel to obtain the...
20 June 2024 6,418 6 View