Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding qa tests, yaml and change to frame_sync #72

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ endif()

#install to conda if prefix defined
if(DEFINED ENV{CONDA_PREFIX} )
set(CMAKE_INSTALL_PREFIX $ENV{CONDA_PREFIX} CACHE PATH "")
set(CMAKE_INSTALL_PREFIX $ENV{CONDA_PREFIX})
message(STATUS "Conda installed GNU Radio. Setting CMAKE_INSTALL_PREFIX to $ENV{CONDA_PREFIX}")
endif()

Expand Down
67 changes: 66 additions & 1 deletion README.md
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I add the readme for how to test and how to generate C++ code from the flow graph

Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ The out of tree module gr-lora_sdr can be installed from source or directly as a
- The .grc files can be opened with gnuradio-companion to set the different transmission parameters.
- The python file generated by grc can be executed with ``` python3 ./{file_name}.py```


### From conda
Thanks to Ryan Volz this OOT module can also directly be installed as a Conda package. Note that gnuradio will also be installed in the conda environment.

Expand Down Expand Up @@ -162,7 +163,70 @@ Thanks to Ryan Volz this OOT module can also directly be installed as a Conda pa
- (Linux/macOS) `$CONDA_PREFIX/share/gr-lora_sdr/examples`
- (Windows) `%CONDA_PREFIX%\Library\share\gr-lora_sdr\examples`



#### Block Test

- Prerequisites: Before running the tests, make sure you have build the code and create a build folder according to above.

- Test Procedure. Follow these steps to run the tests

- Open a terminal

- Navigate to the build folder you create

```sh
cd path/to/build/folder
```

- Run the code below to test all the blocks (except for modulate, frame_sync, header_decoder and crc_verify), LoRa transmitter as well as receiver
- with log
```sh
ctest -VV
```
- without log
```sh
make test
```
#### Generate C++ code for flow graph

- You can generate C++ code for flow graph in gnuradio. Follow these steps to generate C++ code for flow_graph.grc.


- Open gnuradio companion and open .grc file in folder examples
- Change "output language" in "Options" to C++
- Change "general options" in "Options" to No GUI
- Press "run"
- Go to the folder where there is your flow_graph.grc and you could see a newly generated folder named as flow_graph. In flow_graph, you could see flow_graph.cpp
- Go into the folder flow_graph
- Create CMakeLists.txt file and specify the libraries in CMakeLists.txt
- In CMakeLists.txt add
```sh
include_directories(/path/to/conda/envs/gr310/include/gnuradio/lora_sdr)
```
- In target_link_libraries add
```sh
/path/to/build/lib/libgnuradio-lora_sdr.so
```

#### Run C++ code for flow graph in terminal
- Procedure. Follow these steps to run the tests.
- To build the code, create build folder in the flow_graph folder generated above and go into it
```sh
mkdir build
cd build
```

- Run the main CMakeLists.txt
```sh
cmake ..
make
```

- Finally run the code
```sh
./flow_graph
```

## Frequent issues:
- Fail to `make` after pulling a new version from git
- If the parameters of a block have changed in the new version, you need to first clean the old installation before building the module again.
Expand Down Expand Up @@ -198,3 +262,4 @@ This work was inspired from [https://github.com/rpp0/gr-lora](https://github.com

## Licence
Distributed under the GPL-3.0 License License. See LICENSE for more information.
# gr-lora_sdr
1 change: 1 addition & 0 deletions Testing/Temporary/CTestCostData.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
3 changes: 3 additions & 0 deletions Testing/Temporary/LastTest.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Start testing: Nov 15 12:02 CET
----------------------------------------------------------
End testing: Nov 15 12:02 CET
1 change: 1 addition & 0 deletions data/GRC_default/dataTest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11111111
2 changes: 1 addition & 1 deletion data/GRC_default/example_tx_source.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
HztlXcpsegzpnbkq,rkvpzpbd,mnxxhoch,lkcaxkyajmntudouhfzumtbgtavjfwsp,mzebvqousvhrsanl,ingkzvddatxfgjzh,rbhibtwkfyuvecbb,vvzdjzflvgaevyzd,rfvhcmuqskiqlpag,zfpgxcjzhehcydjf
abbccaaaaaaaaaaaaaaaaaaaa,
1 change: 1 addition & 0 deletions data/GRC_default/example_tx_source_100_frame.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
asadibisbfojn,baisdbqowhf,dkfowueb,ansoduhaosubfjoj,nasodnouwdhq,ncoasncoauigve,aowinqonfbjcksjgaaskdoqwi,ahsudqouw,ansjodiqiw,asjpdojef,asadibisbfojn,baisdbqowhf,dkfowueb,ansoduhaosubfjoj,nasodnouwdhq,ncoasncoauigve,aowinqonfbjcksjgaaskdoqwi,ahsudqouw,ansjodiqiw,asjpdojef,asadibisbfojn,baisdbqowhf,dkfowueb,ansoduhaosubfjoj,nasodnouwdhq,ncoasncoauigve,aowinqonfbjcksjgaaskdoqwi,ahsudqouw,ansjodiqiw,asjpdojef,asadibisbfojn,baisdbqowhf,dkfowueb,ansoduhaosubfjoj,nasodnouwdhq,ncoasncoauigve,aowinqonfbjcksjgaaskdoqwi,ahsudqouw,ansjodiqiw,asjpdojef,asadibisbfojn,baisdbqowhf,dkfowueb,ansoduhaosubfjoj,nasodnouwdhq,ncoasncoauigve,aowinqonfbjcksjgaaskdoqwi,ahsudqouw,ansjodiqiw,asjpdojef,asadibisbfojn,baisdbqowhf,dkfowueb,ansoduhaosubfjoj,nasodnouwdhq,ncoasncoauigve,aowinqonfbjcksjgaaskdoqwi,ahsudqouw,ansjodiqiw,asjpdojef,asadibisbfojn,baisdbqowhf,dkfowueb,ansoduhaosubfjoj,nasodnouwdhq,ncoasncoauigve,aowinqonfbjcksjgaaskdoqwi,ahsudqouw,ansjodiqiw,asjpdojef,asadibisbfojn,baisdbqowhf,dkfowueb,ansoduhaosubfjoj,nasodnouwdhq,ncoasncoauigve,aowinqonfbjcksjgaaskdoqwi,ahsudqouw,ansjodiqiw,asjpdojef,asadibisbfojn,baisdbqowhf,dkfowueb,ansoduhaosubfjoj,nasodnouwdhq,ncoasncoauigve,aowinqonfbjcksjgaaskdoqwi,ahsudqouw,ansjodiqiw,asjpdojef,asadibisbfojn,baisdbqowhf,dkfowueb,ansoduhaosubfjoj,nasodnouwdhq,ncoasncoauigve,aowinqonfbjcksjgaaskdoqwi,ahsudqouw,ansjodiqiw,asjpdojef,
1 change: 1 addition & 0 deletions data/GRC_default/example_tx_source_10_frame.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alicebccddddddddddd,abbccbelladddd,abbccddorodddd,elsaddddddddd,flora,georgeisman,Hellenprincess,aIvyliubbccddddddddddd,Jessicaisstarabbccddddddddddd,
1 change: 1 addition & 0 deletions data/GRC_default/example_tx_source_30_frame.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,
1 change: 1 addition & 0 deletions data/GRC_default/example_tx_source_50_frame.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
abbccddddddddddd,abbccsdwdddddddd,abbccddqawdddddd,aytccddddddddddd,abbccddddddddddd,abdddd,abbccddddddddddd,abbcc341ddddd,abbasiudfdd,d,abbccddddddddddd,abbkkkkddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccdzdfaergddd,kkkkkkkkkkkkkkk,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,abbccddddddddddd,w235gsdddddddddd,awyjdddddd,abbccqwuhd,abbccddddddddddd,abbccddddddddddd,abbccddddpoodd,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,aeyvf9172y9gdjsb,
1 change: 0 additions & 1 deletion data/GRC_default/example_tx_source_for_tagged_stream.txt

This file was deleted.

2 changes: 1 addition & 1 deletion data/GRC_default/example_tx_source_ishex.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6669727374207061636b6574,7365636f6e64207061636b6574,
6669727374207061636b6574,7365636f6e64207061636b6574,
2 changes: 1 addition & 1 deletion docs/doxygen/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -1730,7 +1730,7 @@ CLASS_GRAPH = YES
# indirect implementation dependencies (inheritance, containment, and
# class references variables) of the class with other documented classes.

COLLABORATION_GRAPH = NO
COLLABORATION_GRAPH = YES

# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for groups, showing the direct groups dependencies
Expand Down
Loading