kopia lustrzana https://github.com/rpp0/gr-lora
Quick fix
~ 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 waitingpull/21/head
rodzic
43be513947
commit
0b6f1528fe
|
@ -5,3 +5,4 @@ build/
|
|||
*nogit*
|
||||
*.cfile
|
||||
dev/
|
||||
examples/lora-samples
|
||||
|
|
|
@ -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 #
|
||||
|
@ -67,6 +73,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...")
|
||||
|
@ -99,72 +108,57 @@ class Examplify:
|
|||
self.outputFile = output
|
||||
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)
|
||||
|
||||
self.examples_output.append( FileData( name, '["{0:s}"]'.format(data), times ) )
|
||||
self.outputFile = self.output_dir + name
|
||||
self.transmitToCapture([data] * times)
|
||||
|
||||
FileData = collections.namedtuple('FileData', ['path', '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):
|
||||
f = open(file_path, 'a')
|
||||
stro = '\n' + (' ' * 20) + 'FILE' + (' ' * 23) + '|' + (' ' * 10) + 'HEX'
|
||||
f.write(stro + '\n')
|
||||
print stro
|
||||
|
||||
stro = ('-' * 47) + '+' + ('-' * 27)
|
||||
f.write(stro + '\n')
|
||||
print stro
|
||||
|
||||
for x in examples_output:
|
||||
stro = ' {0:45s} | {1:s} * {2:d}'.format(x[0], x[1], x[2])
|
||||
def appendResultsToFile(file_path):
|
||||
f = open(file_path, 'a')
|
||||
stro = '\n' + (' ' * 20) + 'FILE' + (' ' * 23) + '|' + (' ' * 10) + 'HEX'
|
||||
f.write(stro + '\n')
|
||||
print stro
|
||||
|
||||
f.close()
|
||||
stro = ('-' * 47) + '+' + ('-' * 27)
|
||||
f.write(stro + '\n')
|
||||
print stro
|
||||
|
||||
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
|
||||
|
||||
f.close()
|
||||
|
||||
|
||||
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')
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -683,28 +683,28 @@
|
|||
#include <gnuradio/block.h>
|
||||
|
||||
namespace gr {
|
||||
namespace lora {
|
||||
/*!
|
||||
* \brief Sink for messages, sent to socket a kept in a list.
|
||||
* \ingroup lora
|
||||
*
|
||||
*/
|
||||
class LORA_API message_socket_sink : virtual public gr::block {
|
||||
public:
|
||||
typedef boost::shared_ptr<message_socket_sink> sptr;
|
||||
namespace lora {
|
||||
/*!
|
||||
* \brief Sink for messages, sent to socket.
|
||||
* \ingroup lora
|
||||
*
|
||||
*/
|
||||
class LORA_API message_socket_sink : virtual public gr::block {
|
||||
public:
|
||||
typedef boost::shared_ptr<message_socket_sink> sptr;
|
||||
|
||||
/*!
|
||||
* \brief Return a shared_ptr to a new instance of lora::message_socket_sink.
|
||||
*
|
||||
* To avoid accidental use of raw pointers, lora::message_socket_sink's
|
||||
* constructor is in a private implementation
|
||||
* class. lora::message_socket_sink::make is the public interface for
|
||||
* creating new instances.
|
||||
*/
|
||||
static sptr make();
|
||||
};
|
||||
/*!
|
||||
* \brief Return a shared_ptr to a new instance of lora::message_socket_sink.
|
||||
*
|
||||
* To avoid accidental use of raw pointers, lora::message_socket_sink's
|
||||
* constructor is in a private implementation
|
||||
* class. lora::message_socket_sink::make is the public interface for
|
||||
* creating new instances.
|
||||
*/
|
||||
static sptr make();
|
||||
};
|
||||
|
||||
} // namespace lora
|
||||
} // namespace lora
|
||||
} // namespace gr
|
||||
|
||||
#endif /* INCLUDED_LORA_MESSAGE_SOCKET_SINK_H */
|
||||
|
|
|
@ -33,8 +33,8 @@ list(APPEND lora_sources
|
|||
|
||||
set(lora_sources "${lora_sources}" PARENT_SCOPE)
|
||||
if(NOT lora_sources)
|
||||
MESSAGE(STATUS "No C++ sources... skipping lib/")
|
||||
return()
|
||||
MESSAGE(STATUS "No C++ sources... skipping lib/")
|
||||
return()
|
||||
endif(NOT lora_sources)
|
||||
|
||||
add_library(gnuradio-lora SHARED ${lora_sources})
|
||||
|
|
|
@ -683,81 +683,81 @@
|
|||
#include "message_socket_sink_impl.h"
|
||||
|
||||
namespace gr {
|
||||
namespace lora {
|
||||
namespace lora {
|
||||
|
||||
message_socket_sink::sptr message_socket_sink::make() {
|
||||
return gnuradio::get_initial_sptr(new message_socket_sink_impl());
|
||||
}
|
||||
message_socket_sink::sptr message_socket_sink::make() {
|
||||
return gnuradio::get_initial_sptr(new message_socket_sink_impl());
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief The private constructor
|
||||
*
|
||||
* Create a UDP socket connection to send the data through.
|
||||
*/
|
||||
message_socket_sink_impl::message_socket_sink_impl()
|
||||
: gr::block("message_socket_sink",
|
||||
gr::io_signature::make(0, 0, 0),
|
||||
gr::io_signature::make(0, 0, 0)) {
|
||||
message_port_register_in(pmt::mp("in"));
|
||||
set_msg_handler(pmt::mp("in"), boost::bind(&message_socket_sink_impl::handle, this, _1));
|
||||
/**
|
||||
* \brief The private constructor
|
||||
*
|
||||
* Create a UDP socket connection to send the data through.
|
||||
*/
|
||||
message_socket_sink_impl::message_socket_sink_impl()
|
||||
: gr::block("message_socket_sink",
|
||||
gr::io_signature::make(0, 0, 0),
|
||||
gr::io_signature::make(0, 0, 0)) {
|
||||
message_port_register_in(pmt::mp("in"));
|
||||
set_msg_handler(pmt::mp("in"), boost::bind(&message_socket_sink_impl::handle, this, _1));
|
||||
|
||||
this->_socket = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
this->_socket = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
|
||||
if (this->_socket < 0) {
|
||||
perror("[message_socket_sink] Failed to create socket!");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (this->_socket < 0) {
|
||||
perror("[message_socket_sink] Failed to create socket!");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
this->_sock_addr = new struct sockaddr_in;
|
||||
this->_sock_addr->sin_family = AF_INET;
|
||||
this->_sock_addr->sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
this->_sock_addr->sin_port = htons(0); // Source port: 0 is any
|
||||
this->_sock_addr = new struct sockaddr_in;
|
||||
this->_sock_addr->sin_family = AF_INET;
|
||||
this->_sock_addr->sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
this->_sock_addr->sin_port = htons(0); // Source port: 0 is any
|
||||
|
||||
if (bind(this->_socket,
|
||||
(const struct sockaddr*) this->_sock_addr,
|
||||
sizeof(*this->_sock_addr))
|
||||
< 0) {
|
||||
perror("[message_socket_sink] Socket bind failed!");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (bind(this->_socket,
|
||||
(const struct sockaddr*) this->_sock_addr,
|
||||
sizeof(*this->_sock_addr))
|
||||
< 0) {
|
||||
perror("[message_socket_sink] Socket bind failed!");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
this->_sock_addr->sin_port = htons(this->port);
|
||||
// == "127.0.0.1" to int translation
|
||||
inet_pton(AF_INET, this->host.c_str(), &this->_sock_addr->sin_addr.s_addr);
|
||||
}
|
||||
this->_sock_addr->sin_port = htons(this->port);
|
||||
// == "127.0.0.1" to int translation
|
||||
inet_pton(AF_INET, this->host.c_str(), &this->_sock_addr->sin_addr.s_addr);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Our virtual destructor.
|
||||
*/
|
||||
message_socket_sink_impl::~message_socket_sink_impl() {
|
||||
delete this->_sock_addr;
|
||||
shutdown(this->_socket, 1); // close transmissions
|
||||
}
|
||||
/**
|
||||
* \brief Our virtual destructor.
|
||||
*/
|
||||
message_socket_sink_impl::~message_socket_sink_impl() {
|
||||
delete this->_sock_addr;
|
||||
shutdown(this->_socket, 1); // close transmissions
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Handle a message and send its contents through an UDP packet to the loopback interface.
|
||||
*/
|
||||
void message_socket_sink_impl::handle(pmt::pmt_t msg) {
|
||||
uint8_t *data = (uint8_t*) pmt::blob_data(msg);
|
||||
size_t size = pmt::blob_length(msg);
|
||||
/**
|
||||
* \brief Handle a message and send its contents through an UDP packet to the loopback interface.
|
||||
*/
|
||||
void message_socket_sink_impl::handle(pmt::pmt_t msg) {
|
||||
uint8_t *data = (uint8_t*) pmt::blob_data(msg);
|
||||
size_t size = pmt::blob_length(msg);
|
||||
|
||||
#ifndef NDEBUG
|
||||
printf("Received message:\n\t");
|
||||
printf("Received message:\n\t");
|
||||
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
printf("%02x ", data[i]);
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
printf("%02x ", data[i]);
|
||||
|
||||
putchar('\n');
|
||||
putchar('\n');
|
||||
#endif
|
||||
|
||||
if (sendto(this->_socket, data, size, 0,
|
||||
(const struct sockaddr*) this->_sock_addr,
|
||||
sizeof(*this->_sock_addr))
|
||||
!= size) {
|
||||
perror("[message_socket_sink] Mismatch in number of bytes sent");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
if (sendto(this->_socket, data, size, 0,
|
||||
(const struct sockaddr*) this->_sock_addr,
|
||||
sizeof(*this->_sock_addr))
|
||||
!= size) {
|
||||
perror("[message_socket_sink] Mismatch in number of bytes sent");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
} /* namespace lora */
|
||||
} /* namespace lora */
|
||||
} /* namespace gr */
|
||||
|
|
|
@ -684,26 +684,26 @@
|
|||
#include <lora/message_socket_sink.h>
|
||||
|
||||
namespace gr {
|
||||
namespace lora {
|
||||
namespace lora {
|
||||
|
||||
class message_socket_sink_impl : public message_socket_sink {
|
||||
private:
|
||||
const std::string host = "127.0.0.1";
|
||||
const int port = 40868;
|
||||
class message_socket_sink_impl : public message_socket_sink {
|
||||
private:
|
||||
const std::string host = "127.0.0.1";
|
||||
const int port = 40868;
|
||||
|
||||
// socket
|
||||
struct sockaddr_in *_sock_addr;
|
||||
int _socket;
|
||||
// socket
|
||||
struct sockaddr_in *_sock_addr;
|
||||
int _socket;
|
||||
|
||||
void handle(pmt::pmt_t msg);
|
||||
void handle(pmt::pmt_t msg);
|
||||
|
||||
public:
|
||||
message_socket_sink_impl();
|
||||
public:
|
||||
message_socket_sink_impl();
|
||||
|
||||
~message_socket_sink_impl();
|
||||
};
|
||||
~message_socket_sink_impl();
|
||||
};
|
||||
|
||||
} // namespace lora
|
||||
} // namespace lora
|
||||
} // namespace gr
|
||||
|
||||
#endif /* INCLUDED_LORA_MESSAGE_SOCKET_SINK_IMPL_H */
|
||||
|
|
|
@ -682,11 +682,11 @@
|
|||
#include <lora/message_socket_sink.h>
|
||||
|
||||
namespace gr {
|
||||
namespace lora {
|
||||
namespace lora {
|
||||
|
||||
void qa_message_socket_sink::t1() {
|
||||
// Put test here
|
||||
}
|
||||
void qa_message_socket_sink::t1() {
|
||||
// Put test here
|
||||
}
|
||||
|
||||
} /* namespace lora */
|
||||
} /* namespace lora */
|
||||
} /* namespace gr */
|
||||
|
|
|
@ -683,19 +683,19 @@
|
|||
#include <cppunit/TestCase.h>
|
||||
|
||||
namespace gr {
|
||||
namespace lora {
|
||||
namespace lora {
|
||||
|
||||
class qa_message_socket_sink : public CppUnit::TestCase {
|
||||
public:
|
||||
CPPUNIT_TEST_SUITE(qa_message_socket_sink);
|
||||
CPPUNIT_TEST(t1);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
class qa_message_socket_sink : public CppUnit::TestCase {
|
||||
public:
|
||||
CPPUNIT_TEST_SUITE(qa_message_socket_sink);
|
||||
CPPUNIT_TEST(t1);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
private:
|
||||
void t1();
|
||||
};
|
||||
private:
|
||||
void t1();
|
||||
};
|
||||
|
||||
} /* namespace lora */
|
||||
} /* namespace lora */
|
||||
} /* namespace gr */
|
||||
|
||||
#endif /* _QA_MESSAGE_SOCKET_SINK_H_ */
|
||||
|
|
|
@ -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([])
|
||||
|
|
Ładowanie…
Reference in New Issue