~ Replaced unwanted tabs with spaces
~ Replaced paths with relative paths (needs testing)
~ Examplify now takes the output path and name prefix as args
* TO-DO: test messqge_socket_sink with socket.timeout() instead of
manual waiting
pull/21/head
Wosser1sProductions 2017-02-16 19:00:08 +01:00
rodzic 43be513947
commit 0b6f1528fe
11 zmienionych plików z 239 dodań i 232 usunięć

1
.gitignore vendored
Wyświetl plik

@ -5,3 +5,4 @@ build/
*nogit*
*.cfile
dev/
examples/lora-samples

Wyświetl plik

@ -8,9 +8,11 @@ from loranode import RN2483Controller
import lora, pmt, osmosdr
from gnuradio import gr, blocks
FileData = collections.namedtuple('FileData', ['path', 'data', 'times'])
class Examplify:
def __init__(self, outputFile = '/tmp/examplify_data.cfile'):
def __init__(self, output_dir = './lora-samples/', output_prefix = 'examplify_data'):
##################################################
# Variables #
##################################################
@ -26,10 +28,14 @@ class Examplify:
self.pwr = 1
self.codingRate = "4/6" # 4/5 4/6 4/7
self.outputFile = outputFile
self.output_dir = output_dir
self.output_prefix = output_prefix
self.output_ext = '.cfile'
self.outputFile = self.output_dir + self.output_prefix + self.output_ext
self.pre_delay = 0.150
self.post_delay = 0.350
self.trans_delay = 0.1
self.examples_output = []
##################################################
# LoRa transmitter #
@ -68,6 +74,9 @@ class Examplify:
def setTransmitDelay(self, delay_s):
self.trans_delay = delay_s
def getOutput(self):
return self.examples_output
def transmitRawData(self, data_list):
print ("Transmitting...")
time.sleep(self.pre_delay)
@ -100,24 +109,21 @@ class Examplify:
self.transmitToCapture(data_list)
self.outputFile = prev
def appendAndCaptureExample(data, times):
name = (self.output_prefix + "_cr{0:s}_bw{1:d}_sf{2:d}_crc{3:d}_pwr{4:d}_{5:03d}"
.format(self.codingRate.replace("/", "-"),
int(self.bw / 1e3),
self.sf,
1 if self.crc else 0,
self.pwr,
len(self.examples_output))
+ self.output_ext)
FileData = collections.namedtuple('FileData', ['path', 'data', 'times'])
self.examples_output.append( FileData( name, '["{0:s}"]'.format(data), times ) )
self.outputFile = self.output_dir + name
self.transmitToCapture([data] * times)
def appendAndCaptureExample(examples_output, data, times, path, name):
name = (name + "_cr{0:s}_bw{1:d}_sf{2:d}_crc{3:d}_pwr{4:d}_{5:03d}"
.format(e.codingRate.replace("/", "-"),
int(e.bw / 1e3),
e.sf,
1 if e.crc else 0,
e.pwr,
len(examples_output))
+ ".cfile")
examples_output.append( FileData( name, '["{0:s}"]'.format(data), times ) )
e.transmitToFile([data] * times, path + name)
def printToFile(file_path, examples_output):
def appendResultsToFile(file_path):
f = open(file_path, 'a')
stro = '\n' + (' ' * 20) + 'FILE' + (' ' * 23) + '|' + (' ' * 10) + 'HEX'
f.write(stro + '\n')
@ -127,7 +133,7 @@ def printToFile(file_path, examples_output):
f.write(stro + '\n')
print stro
for x in examples_output:
for x in self.examples_output:
stro = ' {0:45s} | {1:s} * {2:d}'.format(x[0], x[1], x[2])
f.write(stro + '\n')
print stro
@ -136,35 +142,23 @@ def printToFile(file_path, examples_output):
if __name__ == '__main__':
examples_output = []
e = Examplify()
e = Examplify('./lora-samples/', 'hackrf')
appendAndCaptureExample(examples_output, "0123456789abcdef", 10,
'/home/william/lora-samples/', 'hackrf')
e.appendAndCaptureExample("0123456789abcdef", 10)
appendAndCaptureExample(examples_output, "111111", 1,
'/home/william/lora-samples/', 'hackrf')
appendAndCaptureExample(examples_output, "111111", 5,
'/home/william/lora-samples/', 'hackrf')
e.appendAndCaptureExample("111111", 1)
e.appendAndCaptureExample("111111", 5)
appendAndCaptureExample(examples_output, "aaaaaaaa", 3,
'/home/william/lora-samples/', 'hackrf')
e.appendAndCaptureExample("aaaaaaaa", 3)
appendAndCaptureExample(examples_output, "ffffffff", 1,
'/home/william/lora-samples/', 'hackrf')
appendAndCaptureExample(examples_output, "ffffffff", 10,
'/home/william/lora-samples/', 'hackrf')
e.appendAndCaptureExample("ffffffff", 1)
e.appendAndCaptureExample("ffffffff", 10)
appendAndCaptureExample(examples_output, "55555555", 3,
'/home/william/lora-samples/', 'hackrf')
appendAndCaptureExample(examples_output, "55555555", 10,
'/home/william/lora-samples/', 'hackrf')
e.appendAndCaptureExample("55555555", 3)
e.appendAndCaptureExample("55555555", 10)
appendAndCaptureExample(examples_output, "88888888", 1,
'/home/william/lora-samples/', 'hackrf')
appendAndCaptureExample(examples_output, "88888888", 5,
'/home/william/lora-samples/', 'hackrf')
appendAndCaptureExample(examples_output, "88888888", 10,
'/home/william/lora-samples/', 'hackrf')
e.appendAndCaptureExample("88888888", 1)
e.appendAndCaptureExample("88888888", 5)
e.appendAndCaptureExample("88888888", 10)
printToFile('/home/william/lora-samples/expected_results.txt', examples_output)
e.appendResultsToFile('./expected_results.txt')

Wyświetl plik

@ -1,9 +1,9 @@
#!/usr/bin/sh
export VOLK_GENERIC=1
export GR_DONT_LOAD_PREFS=1
export srcdir=/home/william/gr-lora/python
export srcdir=../python
export GR_CONF_CONTROLPORT_ON=False
export PATH=/home/william/gr-lora/build/python:$PATH
export LD_LIBRARY_PATH=/home/william/gr-lora/build/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/home/william/gr-lora/build/swig:$PYTHONPATH
/usr/bin/python2 /home/william/lora-samples/_examplify.py
export PATH=../build/python:$PATH
export LD_LIBRARY_PATH=../build/lib:$LD_LIBRARY_PATH
export PYTHONPATH=../build/swig:$PYTHONPATH
/usr/bin/python2 ./_examplify.py

Wyświetl plik

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<block>
<name>message_socket_sink</name>
<name>Message Socket Sink</name>
<key>lora_message_socket_sink</key>
<category>[LoRa]</category>
<import>import lora</import>

Wyświetl plik

@ -685,7 +685,7 @@
namespace gr {
namespace lora {
/*!
* \brief Sink for messages, sent to socket a kept in a list.
* \brief Sink for messages, sent to socket.
* \ingroup lora
*
*/

Wyświetl plik

@ -13,6 +13,15 @@ class qa_BasicTest (gr_unittest.TestCase):
# Listen on socket for data, append to list if any and return list of captured data.
#
def gatherFromSocket(self):
## or in self.server.settimeout(0.5) ?
# try:
# data = self.server.recv(8192)
# if data:
# total_data.append(data)
# except:
# pass
timeout = 0.5
total_data = []
data = ''
@ -108,7 +117,7 @@ class qa_BasicTest (gr_unittest.TestCase):
self.server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
self.server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
self.server.bind((self.host, self.port))
self.server.setblocking(0)
self.server.setblocking(0) ## or self.server.settimeout(0.5) ?
self.lastTestComplete = False
@ -181,7 +190,7 @@ class qa_BasicTest (gr_unittest.TestCase):
'71 1b 09 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22'
]
self.runWithFileSourceAndData('/home/william/lora-samples/usrpcr5.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/usrpcr5.cfile', expected_data)
nextSeriesSetting = 1
testResults.append([])
@ -195,77 +204,80 @@ class qa_BasicTest (gr_unittest.TestCase):
#
def test_002 (self):
expected_data = ["80 0b 01 01 23 45 67 89 ab cd ef"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_000.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_000.cfile', expected_data)
# self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_000.cfile', expected_data)
# ...
#
# Unit test 3
#
def test_003 (self):
expected_data = ["30 0b 02 11 11 11"] * 1
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_001.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_001.cfile', expected_data)
#
# Unit test 4
#
def test_004 (self):
expected_data = ["30 0b 02 11 11 11"] * 5
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_002.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_002.cfile', expected_data)
#
# Unit test 5
#
def test_005 (self):
expected_data = ["40 0b 07 aa aa aa aa"] * 3
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_003.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_003.cfile', expected_data)
#
# Unit test 6
#
def test_006 (self):
expected_data = ["40 0b 07 ff ff ff ff"] * 1
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_004.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_004.cfile', expected_data)
#
# Unit test 7
#
def test_007 (self):
expected_data = ["40 0b 07 ff ff ff ff"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_005.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_005.cfile', expected_data)
#
# Unit test 8
#
def test_008 (self):
expected_data = ["40 0b 07 55 55 55 55"] * 3
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_006.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_006.cfile', expected_data)
#
# Unit test 9
#
def test_009 (self):
expected_data = ["40 0b 07 55 55 55 55"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_007.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_007.cfile', expected_data)
#
# Unit test 10
#
def test_010 (self):
expected_data = ["40 0b 07 88 88 88 88"] * 1
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_008.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_008.cfile', expected_data)
#
# Unit test 11
#
def test_011 (self):
expected_data = ["40 0b 07 88 88 88 88"] * 5
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_009.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_009.cfile', expected_data)
#
# Unit test 12
#
def test_012 (self):
expected_data = ["40 0b 07 88 88 88 88"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_010.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf7_crc1_pwr1_010.cfile', expected_data)
nextSeriesSetting = 2
testResults.append([])
@ -278,77 +290,77 @@ class qa_BasicTest (gr_unittest.TestCase):
#
def test_013 (self):
expected_data = ["80 0b 01 01 23 45 67 89 ab cd ef"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_000.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_000.cfile', expected_data)
#
# Unit test 14
#
def test_014 (self):
expected_data = ["30 0b 02 11 11 11"] * 1
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_001.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_001.cfile', expected_data)
#
# Unit test 15
#
def test_015 (self):
expected_data = ["30 0b 02 11 11 11"] * 5
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_002.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_002.cfile', expected_data)
#
# Unit test 16
#
def test_016 (self):
expected_data = ["40 0b 07 aa aa aa aa"] * 3
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_003.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_003.cfile', expected_data)
#
# Unit test 17
#
def test_017 (self):
expected_data = ["40 0b 07 ff ff ff ff"] * 1
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_004.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_004.cfile', expected_data)
#
# Unit test 18
#
def test_018 (self):
expected_data = ["40 0b 07 ff ff ff ff"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_005.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_005.cfile', expected_data)
#
# Unit test 19
#
def test_019 (self):
expected_data = ["40 0b 07 55 55 55 55"] * 3
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_006.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_006.cfile', expected_data)
#
# Unit test 20
#
def test_020 (self):
expected_data = ["40 0b 07 55 55 55 55"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_007.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_007.cfile', expected_data)
#
# Unit test 21
#
def test_021 (self):
expected_data = ["40 0b 07 88 88 88 88"] * 1
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_008.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_008.cfile', expected_data)
#
# Unit test 22
#
def test_022 (self):
expected_data = ["40 0b 07 88 88 88 88"] * 5
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_009.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_009.cfile', expected_data)
#
# Unit test 23
#
def test_023 (self):
expected_data = ["40 0b 07 88 88 88 88"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_010.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf12_crc1_pwr1_010.cfile', expected_data)
nextSeriesSetting = 3
testResults.append([])
@ -361,77 +373,77 @@ class qa_BasicTest (gr_unittest.TestCase):
#
def test_024 (self):
expected_data = ["80 0b 01 01 23 45 67 89 ab cd ef"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_000.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_000.cfile', expected_data)
#
# Unit test 25
#
def test_025 (self):
expected_data = ["30 0b 02 11 11 11"] * 1
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_001.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_001.cfile', expected_data)
#
# Unit test 26
#
def test_026 (self):
expected_data = ["30 0b 02 11 11 11"] * 5
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_002.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_002.cfile', expected_data)
#
# Unit test 27
#
def test_027 (self):
expected_data = ["40 0b 07 aa aa aa aa"] * 3
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_003.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_003.cfile', expected_data)
#
# Unit test 28
#
def test_028 (self):
expected_data = ["40 0b 07 ff ff ff ff"] * 1
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_004.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_004.cfile', expected_data)
#
# Unit test 29
#
def test_029 (self):
expected_data = ["40 0b 07 ff ff ff ff"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_005.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_005.cfile', expected_data)
#
# Unit test 30
#
def test_030 (self):
expected_data = ["40 0b 07 55 55 55 55"] * 3
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_006.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_006.cfile', expected_data)
#
# Unit test 31
#
def test_031 (self):
expected_data = ["40 0b 07 55 55 55 55"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_007.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_007.cfile', expected_data)
#
# Unit test 32
#
def test_032 (self):
expected_data = ["40 0b 07 88 88 88 88"] * 1
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_008.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_008.cfile', expected_data)
#
# Unit test 33
#
def test_033 (self):
expected_data = ["40 0b 07 88 88 88 88"] * 5
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_009.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_009.cfile', expected_data)
#
# Unit test 34
#
def test_034 (self):
expected_data = ["40 0b 07 88 88 88 88"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_010.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-5_bw125_sf8_crc1_pwr1_010.cfile', expected_data)
nextSeriesSetting = 4
testResults.append([])
@ -444,77 +456,77 @@ class qa_BasicTest (gr_unittest.TestCase):
#
def test_035 (self):
expected_data = ["80 0b 01 01 23 45 67 89 ab cd ef"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_000.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_000.cfile', expected_data)
#
# Unit test 36
#
def test_036 (self):
expected_data = ["30 0b 02 11 11 11"] * 1
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_001.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_001.cfile', expected_data)
#
# Unit test 37
#
def test_037 (self):
expected_data = ["30 0b 02 11 11 11"] * 5
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_002.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_002.cfile', expected_data)
#
# Unit test 38
#
def test_038 (self):
expected_data = ["40 0b 07 aa aa aa aa"] * 3
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_003.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_003.cfile', expected_data)
#
# Unit test 39
#
def test_039 (self):
expected_data = ["40 0b 07 ff ff ff ff"] * 1
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_004.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_004.cfile', expected_data)
#
# Unit test 40
#
def test_040 (self):
expected_data = ["40 0b 07 ff ff ff ff"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_005.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_005.cfile', expected_data)
#
# Unit test 41
#
def test_041 (self):
expected_data = ["40 0b 07 55 55 55 55"] * 3
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_006.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_006.cfile', expected_data)
#
# Unit test 42
#
def test_042 (self):
expected_data = ["40 0b 07 55 55 55 55"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_007.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_007.cfile', expected_data)
#
# Unit test 43
#
def test_043 (self):
expected_data = ["40 0b 07 88 88 88 88"] * 1
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_008.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_008.cfile', expected_data)
#
# Unit test 44
#
def test_044 (self):
expected_data = ["40 0b 07 88 88 88 88"] * 5
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_009.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_009.cfile', expected_data)
#
# Unit test 45
#
def test_045 (self):
expected_data = ["40 0b 07 88 88 88 88"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_010.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-7_bw125_sf7_crc1_pwr1_010.cfile', expected_data)
nextSeriesSetting = 5
testResults.append([])
@ -527,77 +539,77 @@ class qa_BasicTest (gr_unittest.TestCase):
#
def test_046 (self):
expected_data = ["80 0b 01 01 23 45 67 89 ab cd ef"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_000.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_000.cfile', expected_data)
#
# Unit test 47
#
def test_047 (self):
expected_data = ["30 0b 02 11 11 11"] * 1
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_001.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_001.cfile', expected_data)
#
# Unit test 48
#
def test_048 (self):
expected_data = ["30 0b 02 11 11 11"] * 5
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_002.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_002.cfile', expected_data)
#
# Unit test 49
#
def test_049 (self):
expected_data = ["40 0b 07 aa aa aa aa"] * 3
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_003.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_003.cfile', expected_data)
#
# Unit test 50
#
def test_050 (self):
expected_data = ["40 0b 07 ff ff ff ff"] * 1
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_004.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_004.cfile', expected_data)
#
# Unit test 51
#
def test_051 (self):
expected_data = ["40 0b 07 ff ff ff ff"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_005.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_005.cfile', expected_data)
#
# Unit test 52
#
def test_052 (self):
expected_data = ["40 0b 07 55 55 55 55"] * 3
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_006.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_006.cfile', expected_data)
#
# Unit test 53
#
def test_053 (self):
expected_data = ["40 0b 07 55 55 55 55"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_007.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_007.cfile', expected_data)
#
# Unit test 54
#
def test_054 (self):
expected_data = ["40 0b 07 88 88 88 88"] * 1
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_008.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_008.cfile', expected_data)
#
# Unit test 55
#
def test_055 (self):
expected_data = ["40 0b 07 88 88 88 88"] * 5
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_009.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_009.cfile', expected_data)
#
# Unit test 56
#
def test_056 (self):
expected_data = ["40 0b 07 88 88 88 88"] * 10
self.runWithFileSourceAndData('/home/william/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_010.cfile', expected_data)
self.runWithFileSourceAndData('../../examples/lora-samples/hackrf_cr4-6_bw125_sf6_crc1_pwr1_010.cfile', expected_data)
self.lastTestComplete = True
# nextSeriesSetting = 6
# testResults.append([])