add ability to run multiple trials, add error bars

This commit is contained in:
theano
2015-11-06 19:24:10 -08:00
committed by Bastian Bloessl
parent 016616d915
commit a812150eac
49 changed files with 228 additions and 41 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
all:
./wifi_loopback_noGUI.py -n $(n) -c $(c) -s $(s) -o $(o) -e $(e) -i $(i) -r $(result)
tshark -r $(result)/ofdm_n$(n)_s$(s)_e$(e)_i$(i).pcap > $(result)/n$(n)_s$(s)_e$(e)_i$(i).log
./wifi_loopback_noGUI.py -t $(t) -n $(n) -c $(c) -s $(s) -o $(o) -e $(e) -i $(i) -r $(result)
tshark -r $(result)/ofdm_t$(t)_n$(n)_s$(s)_e$(e)_i$(i).pcap > $(result)/t$(t)_n$(n)_s$(s)_e$(e)_i$(i).log
+39 -23
View File
@@ -1,6 +1,7 @@
#!/usr/bin/python
import glob, os, re, sys
import numpy as np
import matplotlib.pyplot as plt
log_info = []
@@ -11,42 +12,57 @@ enc_table = ["BPSK 1/2", "BPSK 3/4", "QPSK 1/2",
"64QAM 2/3", "64QAM 3/4"]
path = sys.argv[1]
ntrials = int(sys.argv[2])
snr_list = []
for filename in glob.glob(os.path.join(path, "*.log")):
snr_arg = re.search(r"s([-+]?\d+.\d+)", filename) # SNR
nfiles_arg = re.search(r"n(\d+)", filename) # Nfiles
enc_arg = re.search(r"e(\d+)", filename) # Encoding
trial_arg = re.search(r"t(\d+)", filename) # trial number
if snr_arg and nfiles_arg and enc_arg:
total = nfiles_arg.group(1)
pdrate = sum(1 for line in open(filename))/float(total)
encode = int(enc_arg.group(1))
log_info.append((float(snr_arg.group(1)), pdrate, encode))
else:
print "Missing a log file--exiting!"
try:
assert snr_arg and nfiles_arg and enc_arg and trial_arg
except AssertionError:
print "Log filename parse failed; exiting!"
sys.exit()
print log_info
total = nfiles_arg.group(1)
pdrate = sum(1 for line in open(filename))/float(total)
encode = int(enc_arg.group(1))
snr = float(snr_arg.group(1))
for snr,pdr,enc in log_info:
if enc not in table:
table[enc] = []
table[enc].append((snr,pdr))
if snr not in snr_list:
snr_list.append(snr)
print table
if encode not in table:
table[encode] = {}
if snr not in table[encode]:
table[encode][snr] = []
table[encode][snr].append(pdrate) # could sum here but want to check
# we got enough datapoints
for enc in sorted(table.keys()):
tmp = table[enc]
for enc in table.keys():
for snr in table[enc].keys():
print table[enc][snr]
try:
assert len(table[enc][snr]) == ntrials
except AssertionError:
print "You don't have enough datapoints; exiting!"
sys.exit()
table[enc] = sorted(tmp, key=lambda tmp: tmp[0])
# print tmp
x = [snr for snr,pdr in table[enc]]
y = [pdr for snr,pdr in table[enc]]
snr_list.sort()
print enc, x, y
plt.plot(x, y, marker='o', label="%s" % enc_table[enc])
for enc in sorted(table.keys()): # sort so legend labels are in order
y = [sum(table[enc][snr])/float(ntrials) for snr in snr_list]
print [table[enc][snr] for snr in snr_list]
yerr = [np.std(table[enc][snr]) for snr in snr_list]
print enc, snr_list, y
print yerr
plt.errorbar(snr_list, y, yerr=yerr, marker='o', label="%s" % enc_table[enc])
plt.ylabel("PDR")
plt.xlabel("SNR")
+13 -4
View File
@@ -1,4 +1,7 @@
#!/bin/bash
ntrials=3
if [ $1 ]
then
result_dir=$1
@@ -11,12 +14,18 @@ mkdir -p $result_dir
rm -rf $result_dir/*
echo ">>> Storing results in ./$result_dir."
echo
for e in {0..3}
for e in {0..0}
do
for s in `seq 1.0 2 16.0`
for s in `seq 1.0 2 10.0`
do
make result=$result_dir n=10 c=1 s=$s o=0 e=$e i=200
for t in `seq 1 1 $ntrials`
do
echo
echo ">>> >>> Running trial $t of $ntrials."
make result=$result_dir t=$t n=10 c=1 s=$s o=0 e=$e i=200
done
done
done
./parse.py $result_dir
./parse.py $result_dir $ntrials
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

+7
View File
@@ -0,0 +1,7 @@
1 0.000000 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
2 0.200103 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
3 0.401058 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
4 0.601474 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
5 0.801792 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
6 1.403985 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
7 1.603923 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
+10
View File
@@ -0,0 +1,10 @@
1 0.000000 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
2 0.196848 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
3 0.396943 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
4 0.598886 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
5 0.800263 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
6 1.004287 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
7 1.202008 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
8 1.402387 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
9 1.603159 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
10 1.803635 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
+10
View File
@@ -0,0 +1,10 @@
1 0.000000 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
2 0.197604 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
3 0.397545 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
4 0.598080 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
5 0.798288 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
6 0.999863 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
7 1.199764 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
8 1.400345 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
9 1.600798 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
10 1.804125 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
+10
View File
@@ -0,0 +1,10 @@
1 0.000000 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
2 0.194485 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
3 0.394516 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
4 0.595770 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
5 0.795402 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
6 0.995353 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
7 1.196162 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
8 1.396947 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
9 1.597469 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
10 1.799082 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
+7
View File
@@ -0,0 +1,7 @@
1 0.000000 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
2 0.198189 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
3 0.600105 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
4 0.801267 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
5 1.002216 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
6 1.202105 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
7 1.404350 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
+10
View File
@@ -0,0 +1,10 @@
1 0.000000 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
2 0.197739 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
3 0.398757 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
4 0.599049 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
5 0.798477 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
6 0.998967 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
7 1.200756 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
8 1.400910 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
9 1.601646 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
10 1.801618 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
+10
View File
@@ -0,0 +1,10 @@
1 0.000000 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
2 0.196757 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
3 0.396891 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
4 0.598621 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
5 0.798138 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
6 0.998740 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
7 1.198333 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
8 1.398526 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
9 1.599641 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
10 1.800784 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
+10
View File
@@ -0,0 +1,10 @@
1 0.000000 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
2 0.199280 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
3 0.399189 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
4 0.599032 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
5 0.801261 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
6 1.001054 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
7 1.200619 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
8 1.401371 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
9 1.602194 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
10 1.802983 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
+1
View File
@@ -0,0 +1 @@
1 0.000000 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
+3
View File
@@ -0,0 +1,3 @@
1 0.000000 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
2 0.998518 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
3 1.206310 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
+10
View File
@@ -0,0 +1,10 @@
1 0.000000 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
2 0.197080 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
3 0.397965 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
4 0.598432 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
5 0.798915 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
6 1.000282 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
7 1.200058 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
8 1.400496 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
9 1.600906 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
10 1.800908 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
+10
View File
@@ -0,0 +1,10 @@
1 0.000000 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
2 0.195165 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
3 0.395094 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
4 0.596681 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
5 0.796858 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
6 0.996674 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
7 1.198238 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
8 1.398442 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
9 1.601660 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
10 1.802568 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
+10
View File
@@ -0,0 +1,10 @@
1 0.000000 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
2 0.198489 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
3 0.397349 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
4 0.598199 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
5 0.798432 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
6 0.999793 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
7 1.199805 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
8 1.401055 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
9 1.603784 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
10 1.803290 23:23:23:23:23:23 -> 42:42:42:42:42:42 LLC 53 I, N(R)=54, N(S)=54; DSAP 0x48 Individual, SSAP 0x64 Response
+46 -3
View File
@@ -89,7 +89,7 @@
</param>
<param>
<key>_coordinate</key>
<value>(192, 11)</value>
<value>(96, 83)</value>
</param>
<param>
<key>_rotation</key>
@@ -128,7 +128,7 @@
</param>
<param>
<key>file</key>
<value>" + resultdir + "/ofdm_n" + str(nmessages) + "_s" + str(snr) + "_e" + str(encoding) + "_i" + str(interval) + ".pcap</value>
<value>" + resultdir + "/ofdm_t" + str(ntrials) + "_n" + str(nmessages) + "_s" + str(snr) + "_e" + str(encoding) + "_i" + str(interval) + ".pcap</value>
</param>
<param>
<key>_coordinate</key>
@@ -486,7 +486,7 @@ Else: 0</value>
</param>
<param>
<key>_coordinate</key>
<value>(64, 131)</value>
<value>(64, 147)</value>
</param>
<param>
<key>_rotation</key>
@@ -787,6 +787,49 @@ Max: 1500</value>
<value>50</value>
</param>
</block>
<block>
<key>parameter</key>
<param>
<key>alias</key>
<value></value>
</param>
<param>
<key>comment</key>
<value></value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>_coordinate</key>
<value>(208, 11)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
<param>
<key>id</key>
<value>ntrials</value>
</param>
<param>
<key>label</key>
<value></value>
</param>
<param>
<key>short_id</key>
<value>t</value>
</param>
<param>
<key>type</key>
<value>intx</value>
</param>
<param>
<key>value</key>
<value>0</value>
</param>
</block>
<block>
<key>parameter</key>
<param>
+20 -9
View File
@@ -3,7 +3,7 @@
##################################################
# GNU Radio Python Flow Graph
# Title: Wifi Loopback Nogui
# Generated: Thu Nov 5 12:54:44 2015
# Generated: Fri Nov 6 18:30:18 2015
##################################################
import os
@@ -26,7 +26,7 @@ import pmt
class wifi_loopback_noGUI(gr.top_block):
def __init__(self, chan_est=1, encoding=0, freq_offset=0, interval=500, nmessages=50, resultdir="0", snr=10):
def __init__(self, chan_est=1, encoding=0, freq_offset=0, interval=500, nmessages=50, ntrials=0, resultdir="0", snr=10):
gr.top_block.__init__(self, "Wifi Loopback Nogui")
##################################################
@@ -37,6 +37,7 @@ class wifi_loopback_noGUI(gr.top_block):
self.freq_offset = freq_offset
self.interval = interval
self.nmessages = nmessages
self.ntrials = ntrials
self.resultdir = resultdir
self.snr = snr
@@ -67,7 +68,7 @@ class wifi_loopback_noGUI(gr.top_block):
)
self.blocks_null_sink_0 = blocks.null_sink(gr.sizeof_gr_complex*1)
self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vcc(((10**(snr/10.0))**.5, ))
self.blocks_file_sink_0_0 = blocks.file_sink(gr.sizeof_char*1, "" + resultdir + "/ofdm_n" + str(nmessages) + "_s" + str(snr) + "_e" + str(encoding) + "_i" + str(interval) + ".pcap", False)
self.blocks_file_sink_0_0 = blocks.file_sink(gr.sizeof_char*1, "" + resultdir + "/ofdm_t" + str(ntrials) + "_n" + str(nmessages) + "_s" + str(snr) + "_e" + str(encoding) + "_i" + str(interval) + ".pcap", False)
self.blocks_file_sink_0_0.set_unbuffered(True)
##################################################
@@ -97,7 +98,7 @@ class wifi_loopback_noGUI(gr.top_block):
def set_encoding(self, encoding):
self.encoding = encoding
self.wifi_phy_hier_0.set_encoding(self.encoding)
self.blocks_file_sink_0_0.open("" + self.resultdir + "/ofdm_n" + str(self.nmessages) + "_s" + str(self.snr) + "_e" + str(self.encoding) + "_i" + str(self.interval) + ".pcap")
self.blocks_file_sink_0_0.open("" + self.resultdir + "/ofdm_t" + str(self.ntrials) + "_n" + str(self.nmessages) + "_s" + str(self.snr) + "_e" + str(self.encoding) + "_i" + str(self.interval) + ".pcap")
def get_freq_offset(self):
return self.freq_offset
@@ -111,21 +112,28 @@ class wifi_loopback_noGUI(gr.top_block):
def set_interval(self, interval):
self.interval = interval
self.blocks_file_sink_0_0.open("" + self.resultdir + "/ofdm_n" + str(self.nmessages) + "_s" + str(self.snr) + "_e" + str(self.encoding) + "_i" + str(self.interval) + ".pcap")
self.blocks_file_sink_0_0.open("" + self.resultdir + "/ofdm_t" + str(self.ntrials) + "_n" + str(self.nmessages) + "_s" + str(self.snr) + "_e" + str(self.encoding) + "_i" + str(self.interval) + ".pcap")
def get_nmessages(self):
return self.nmessages
def set_nmessages(self, nmessages):
self.nmessages = nmessages
self.blocks_file_sink_0_0.open("" + self.resultdir + "/ofdm_n" + str(self.nmessages) + "_s" + str(self.snr) + "_e" + str(self.encoding) + "_i" + str(self.interval) + ".pcap")
self.blocks_file_sink_0_0.open("" + self.resultdir + "/ofdm_t" + str(self.ntrials) + "_n" + str(self.nmessages) + "_s" + str(self.snr) + "_e" + str(self.encoding) + "_i" + str(self.interval) + ".pcap")
def get_ntrials(self):
return self.ntrials
def set_ntrials(self, ntrials):
self.ntrials = ntrials
self.blocks_file_sink_0_0.open("" + self.resultdir + "/ofdm_t" + str(self.ntrials) + "_n" + str(self.nmessages) + "_s" + str(self.snr) + "_e" + str(self.encoding) + "_i" + str(self.interval) + ".pcap")
def get_resultdir(self):
return self.resultdir
def set_resultdir(self, resultdir):
self.resultdir = resultdir
self.blocks_file_sink_0_0.open("" + self.resultdir + "/ofdm_n" + str(self.nmessages) + "_s" + str(self.snr) + "_e" + str(self.encoding) + "_i" + str(self.interval) + ".pcap")
self.blocks_file_sink_0_0.open("" + self.resultdir + "/ofdm_t" + str(self.ntrials) + "_n" + str(self.nmessages) + "_s" + str(self.snr) + "_e" + str(self.encoding) + "_i" + str(self.interval) + ".pcap")
def get_snr(self):
return self.snr
@@ -133,7 +141,7 @@ class wifi_loopback_noGUI(gr.top_block):
def set_snr(self, snr):
self.snr = snr
self.blocks_multiply_const_vxx_0.set_k(((10**(self.snr/10.0))**.5, ))
self.blocks_file_sink_0_0.open("" + self.resultdir + "/ofdm_n" + str(self.nmessages) + "_s" + str(self.snr) + "_e" + str(self.encoding) + "_i" + str(self.interval) + ".pcap")
self.blocks_file_sink_0_0.open("" + self.resultdir + "/ofdm_t" + str(self.ntrials) + "_n" + str(self.nmessages) + "_s" + str(self.snr) + "_e" + str(self.encoding) + "_i" + str(self.interval) + ".pcap")
def get_out_buf_size(self):
return self.out_buf_size
@@ -159,6 +167,9 @@ def argument_parser():
parser.add_option(
"-n", "--nmessages", dest="nmessages", type="intx", default=50,
help="Set nmessages [default=%default]")
parser.add_option(
"-t", "--ntrials", dest="ntrials", type="intx", default=0,
help="Set ntrials [default=%default]")
parser.add_option(
"-r", "--resultdir", dest="resultdir", type="string", default="0",
help="Set resultdir [default=%default]")
@@ -172,7 +183,7 @@ def main(top_block_cls=wifi_loopback_noGUI, options=None):
if options is None:
options, _ = argument_parser().parse_args()
tb = top_block_cls(chan_est=options.chan_est, encoding=options.encoding, freq_offset=options.freq_offset, interval=options.interval, nmessages=options.nmessages, resultdir=options.resultdir, snr=options.snr)
tb = top_block_cls(chan_est=options.chan_est, encoding=options.encoding, freq_offset=options.freq_offset, interval=options.interval, nmessages=options.nmessages, ntrials=options.ntrials, resultdir=options.resultdir, snr=options.snr)
tb.start()
tb.wait()