-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add blocks defined in the blocklib to the blocks registry (#288)
* Add blocks defined in the blocklib to the blocks registry - Blocks that can be added to the blocks registry have been added - Small block registry refactoring - Replaced `ENABLE_REFLECTION_FOR_TEMPLATE_FULL` with `ENABLE_REFLECTION_FOR_TEMPLATE` where possible * Revamped the block registry to support NTTPs and not to need macros * Make block naming more stable meta::type_name has an issue of being compiler and platform dependent. Instead of using that for block type to string conversion, use reflcpp and generate template parameter list for the block type manually. * Call ut run directly to avoid test end issues Co-authored-by: Ralph J. Steinhagen <[email protected]>
- Loading branch information
1 parent
cb1a8ea
commit fc33c17
Showing
43 changed files
with
602 additions
and
349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
add_ut_test(qa_Selector) | ||
add_ut_test(qa_sources) | ||
add_ut_test(qa_DataSink) | ||
|
||
add_ut_test(qa_BasicKnownBlocks) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#include <boost/ut.hpp> | ||
|
||
#include <gnuradio-4.0/basic/clock_source.hpp> | ||
#include <gnuradio-4.0/basic/common_blocks.hpp> | ||
#include <gnuradio-4.0/basic/DataSink.hpp> | ||
#include <gnuradio-4.0/basic/FunctionGenerator.hpp> | ||
#include <gnuradio-4.0/basic/Selector.hpp> | ||
#include <gnuradio-4.0/basic/SignalGenerator.hpp> | ||
|
||
const boost::ut::suite KnownBlockTests = [] { | ||
using namespace boost::ut; | ||
using namespace std::string_literals; | ||
|
||
"Registered"_test = [] { | ||
auto known = gr::globalBlockRegistry().knownBlocks(); | ||
std::ranges::sort(known); | ||
|
||
std::vector<std::string> desired{ | ||
// | ||
"builtin_counter"s, // | ||
"builtin_multiply"s, // | ||
"gr::basic::DataSink"s, // | ||
"gr::basic::FunctionGenerator"s, // | ||
"gr::basic::Selector"s, // | ||
"gr::basic::SignalGenerator"s // | ||
}; | ||
std::ranges::sort(desired); | ||
|
||
expect((std::ranges::includes(known, desired))); | ||
}; | ||
}; | ||
|
||
int | ||
main() { | ||
return boost::ut::cfg<boost::ut::override>.run(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.