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

Rewrite reflection and merging #426

Merged
merged 4 commits into from
Oct 10, 2024
Merged
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
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ endif ()

add_library(pmtv INTERFACE)
target_include_directories(pmtv INTERFACE ${pmt_SOURCE_DIR}/include/)
target_link_libraries(pmtv INTERFACE refl-cpp)

add_library(vir INTERFACE)
target_include_directories(vir INTERFACE ${vir-simd_SOURCE_DIR}/)
Expand Down
1 change: 1 addition & 0 deletions algorithm/include/gnuradio-4.0/algorithm/ImChart.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#endif

#include "gnuradio-4.0/meta/utils.hpp"
#include "gnuradio-4.0/meta/reflection.hpp"
#include <bitset>
#include <iostream>

Expand Down
46 changes: 28 additions & 18 deletions blocks/basic/include/gnuradio-4.0/basic/ConverterBlocks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ struct Convert : public gr::Block<Convert<T, R>> {
PortIn<T> in;
PortOut<R> out;

GR_MAKE_REFLECTABLE(Convert, in, out);

template<gr::meta::t_or_simd<T> V>
[[nodiscard]] constexpr auto processOne(const V& input) const noexcept {
if constexpr (gr::meta::any_simd<V>) { // simd case
Expand All @@ -39,6 +41,8 @@ Performs scaling, i.e. 'R output = R(input * scale)'
PortOut<R> out;
T scale = static_cast<T>(1);

GR_MAKE_REFLECTABLE(ScalingConvert, in, out, scale);

template<gr::meta::t_or_simd<T> V>
[[nodiscard]] constexpr auto processOne(const V& input) const noexcept {
if constexpr (gr::meta::any_simd<V>) { // simd case
Expand All @@ -58,6 +62,8 @@ struct Abs : public gr::Block<Abs<T>> {
PortIn<T> in;
PortOut<R> abs;

GR_MAKE_REFLECTABLE(Abs, in, abs);

[[nodiscard]] constexpr R processOne(T input) const noexcept {
if constexpr (std::is_unsigned_v<T>) {
using TSigned = std::make_signed_t<T>;
Expand All @@ -76,6 +82,8 @@ struct Imag : public gr::Block<Imag<T>> {
PortIn<T> in;
PortOut<R> imag;

GR_MAKE_REFLECTABLE(Imag, in, imag);

[[nodiscard]] constexpr R processOne(T input) const noexcept { return std::imag(input); }
};

Expand All @@ -87,6 +95,8 @@ struct Real : public gr::Block<Real<T>> {
PortIn<T> in;
PortOut<R> real;

GR_MAKE_REFLECTABLE(Real, in, real);

[[nodiscard]] constexpr R processOne(T input) const noexcept { return std::real(input); }
};

Expand All @@ -98,6 +108,8 @@ struct Arg : public gr::Block<Arg<T>> {
PortIn<T> in;
PortOut<R> arg;

GR_MAKE_REFLECTABLE(Arg, in, arg);

[[nodiscard]] constexpr R processOne(T input) const noexcept { return std::arg(input); }
};

Expand All @@ -108,6 +120,8 @@ struct RadiansToDegree : public gr::Block<RadiansToDegree<T>> {
PortIn<T> rad;
PortOut<R> deg;

GR_MAKE_REFLECTABLE(RadiansToDegree, rad, deg);

template<gr::meta::t_or_simd<T> V>
[[nodiscard]] constexpr auto processOne(const V& radians) const noexcept {
return (radians / std::numbers::pi_v<T>)*static_cast<T>(180);
Expand All @@ -121,6 +135,8 @@ struct DegreeToRadians : public gr::Block<DegreeToRadians<T>> {
PortIn<T> deg;
PortOut<R> rad;

GR_MAKE_REFLECTABLE(DegreeToRadians, deg, rad);

template<gr::meta::t_or_simd<T> V>
[[nodiscard]] constexpr auto processOne(const V& degree) const noexcept {
return (degree / static_cast<T>(180)) * std::numbers::pi_v<T>;
Expand All @@ -136,6 +152,8 @@ struct ToRealImag : public gr::Block<ToRealImag<T>> {
PortOut<R> real;
PortOut<R> imag;

GR_MAKE_REFLECTABLE(ToRealImag, in, real, imag);

[[nodiscard]] constexpr std::tuple<R, R> processOne(T complexIn) const noexcept { // some SIMD-fication potential here
return {static_cast<R>(std::real(complexIn)), static_cast<R>(std::imag(complexIn))};
}
Expand All @@ -149,6 +167,8 @@ struct RealImagToComplex : public gr::Block<RealImagToComplex<T>> {
PortIn<T> imag;
PortOut<R> out;

GR_MAKE_REFLECTABLE(RealImagToComplex, real, imag, out);

[[nodiscard]] constexpr R processOne(T re, T im) const noexcept { // some SIMD-fication potential here
return {re, im};
}
Expand All @@ -163,6 +183,8 @@ struct ToMagPhase : public gr::Block<ToMagPhase<T>> {
PortOut<R> mag;
PortOut<R> phase;

GR_MAKE_REFLECTABLE(ToMagPhase, in, mag, phase);

[[nodiscard]] constexpr std::tuple<R, R> processOne(T complexIn) const noexcept { // some SIMD-fication potential here
return {static_cast<R>(std::abs(complexIn)), static_cast<R>(std::arg(complexIn))};
}
Expand All @@ -177,6 +199,8 @@ struct MagPhaseToComplex : public gr::Block<MagPhaseToComplex<T>> {
PortIn<T> phase;
PortOut<R> out;

GR_MAKE_REFLECTABLE(MagPhaseToComplex, mag, phase, out);

[[nodiscard]] constexpr std::complex<T> processOne(T r, T theta) const noexcept { // some SIMD-fication potential here
return std::polar(r, theta);
}
Expand All @@ -192,6 +216,8 @@ For every complex input item, we produce two output items that alternate between
PortIn<T> in;
PortOut<R> interleaved;

GR_MAKE_REFLECTABLE(ComplexToInterleaved, in, interleaved);

[[nodiscard]] constexpr work::Status processBulk(std::span<const T> complexInput, std::span<R> interleavedOut) const noexcept { // some SIMD-fication potential here (needs permute)
for (std::size_t i = 0; i < complexInput.size(); ++i) {
interleavedOut[2 * i] = static_cast<R>(complexInput[i].real());
Expand All @@ -212,6 +238,8 @@ For every pair of interleaved input items (real, imag), we produce one complex o
gr::PortIn<T> interleaved;
gr::PortOut<R> out;

GR_MAKE_REFLECTABLE(InterleavedToComplex, interleaved, out);

[[nodiscard]] constexpr work::Status processBulk(std::span<const T> interleavedInput, std::span<R> complexOut) const noexcept { // some SIMD-fication potential here (needs permute)
for (std::size_t i = 0; i < complexOut.size(); ++i) {
complexOut[i] = R{static_cast<typename R::value_type>(interleavedInput[2 * i]), static_cast<typename R::value_type>(interleavedInput[2 * i + 1])};
Expand All @@ -221,24 +249,6 @@ For every pair of interleaved input items (real, imag), we produce one complex o
};

} // namespace gr::blocks::type::converter
ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::type::converter::Convert, in, out)
ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::type::converter::ScalingConvert, in, out, scale)

ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::type::converter::Abs, in, abs)
ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::type::converter::Imag, in, imag)
ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::type::converter::Real, in, real)
ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::type::converter::Arg, in, arg)
ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::type::converter::RadiansToDegree, rad, deg)
ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::type::converter::DegreeToRadians, deg, rad)

ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::type::converter::ToRealImag, in, real, imag)
ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::type::converter::RealImagToComplex, real, imag, out)

ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::type::converter::ToMagPhase, in, mag, phase)
ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::type::converter::MagPhaseToComplex, mag, phase, out)

ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::type::converter::ComplexToInterleaved, in, interleaved)
ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::type::converter::InterleavedToComplex, interleaved, out)

/*
TODO: temporarily disabled due to excessive compile-times on CI
Expand Down
3 changes: 2 additions & 1 deletion blocks/basic/include/gnuradio-4.0/basic/DataSink.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ synchronously (/asynchronously) if handled by the same (/different) sink block.
Annotated<float, "signal min", Doc<"signal physical min. (e.g. DAQ) limit">> signal_min = -1.0f;
Annotated<float, "signal max", Doc<"signal physical max. (e.g. DAQ) limit">> signal_max = +1.0f;

GR_MAKE_REFLECTABLE(DataSink, in, sample_rate, signal_name, signal_unit, signal_min, signal_max);

using Block<DataSink<T>>::Block; // needed to inherit mandatory base-class Block(property_map) constructor

struct Poller {
Expand Down Expand Up @@ -966,7 +968,6 @@ synchronously (/asynchronously) if handled by the same (/different) sink block.

} // namespace gr::basic

ENABLE_REFLECTION_FOR_TEMPLATE(gr::basic::DataSink, in, sample_rate, signal_name, signal_unit, signal_min, signal_max);
auto registerDataSink = gr::registerBlock<gr::basic::DataSink, float, double>(gr::globalBlockRegistry());

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ The parameters will automatically update when a Tag containing the "context" fie

Annotated<property_map, "trigger_meta_info"> trigger_meta_info{};

GR_MAKE_REFLECTABLE(FunctionGenerator, in, out, sample_rate, signal_type, start_value, final_value, duration, round_off_time, impulse_time0, impulse_time1, trigger_meta_info);

T _currentTime = T(0.);
int _sampleCounter = 0;

Expand Down Expand Up @@ -215,7 +217,6 @@ The parameters will automatically update when a Tag containing the "context" fie

} // namespace gr::basic

ENABLE_REFLECTION_FOR_TEMPLATE(gr::basic::FunctionGenerator, in, out, sample_rate, signal_type, start_value, final_value, duration, round_off_time, impulse_time0, impulse_time1, trigger_meta_info);
auto registerFunctionGenerator = gr::registerBlock<gr::basic::FunctionGenerator, float, double>(gr::globalBlockRegistry());

#endif // GNURADIO_FUNCTION_GENERATOR_HPP
3 changes: 2 additions & 1 deletion blocks/basic/include/gnuradio-4.0/basic/PythonBlock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ myBlock.processBulk(ins, outs);
A<gr::Size_t, "n_outputs", Visible, Doc<"number of inputs">, Limits<1U, 32U>> n_outputs = 0U;
std::string pythonScript = "";

GR_MAKE_REFLECTABLE(PythonBlock, inputs, outputs, n_inputs, n_outputs, pythonScript);

PyModuleDef* _moduleDefinitions = myBlockPythonDefinitions<T>();
python::Interpreter _interpreter{this, _moduleDefinitions};
std::string _prePythonDefinition = fmt::format(R"p(import {0}
Expand Down Expand Up @@ -236,7 +238,6 @@ this_block = PythonBlockWrapper(capsule))p",
};

} // namespace gr::basic
ENABLE_REFLECTION_FOR_TEMPLATE(gr::basic::PythonBlock, inputs, outputs, n_inputs, n_outputs, pythonScript)

template<typename T>
gr::basic::PythonBlock<T>* getPythonBlockFromCapsule(PyObject* capsule) {
Expand Down
3 changes: 2 additions & 1 deletion blocks/basic/include/gnuradio-4.0/basic/Selector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ you can set the `backPressure` property to false.
A<std::vector<gr::Size_t>, "map_out", Visible, Doc<"output port index to route to">> map_out{};
A<bool, "back_pressure", Visible, Doc<"true: do not consume samples from un-routed ports">> back_pressure = false;

GR_MAKE_REFLECTABLE(Selector, select, inputs, monitor, outputs, n_inputs, n_outputs, map_in, map_out, back_pressure);

std::map<gr::Size_t, std::vector<gr::Size_t>> _internalMapping{};
gr::Size_t _selectedSrc = -1U;

Expand Down Expand Up @@ -190,7 +192,6 @@ you can set the `backPressure` property to false.
};
} // namespace gr::basic

ENABLE_REFLECTION_FOR_TEMPLATE(gr::basic::Selector, select, inputs, monitor, outputs, n_inputs, n_outputs, map_in, map_out, back_pressure)
auto registerSelector = gr::registerBlock<gr::basic::Selector, float, double>(gr::globalBlockRegistry());
static_assert(gr::HasProcessBulkFunction<gr::basic::Selector<double>>);

Expand Down
3 changes: 2 additions & 1 deletion blocks/basic/include/gnuradio-4.0/basic/SignalGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ s(t) = A * (4 * abs(t * f - floor(t * f + 0.75) + 0.25) - 1) + O
Annotated<T, "offset", Visible> offset = T(0.);
Annotated<T, "phase", Visible, Doc<"in rad">> phase = T(0.);

GR_MAKE_REFLECTABLE(SignalGenerator, in, out, sample_rate, signal_type, frequency, amplitude, offset, phase);

T _currentTime = T(0.);

signal_generator::Type _signalType = signal_generator::parse(signal_type);
Expand Down Expand Up @@ -118,7 +120,6 @@ s(t) = A * (4 * abs(t * f - floor(t * f + 0.75) + 0.25) - 1) + O

} // namespace gr::basic

ENABLE_REFLECTION_FOR_TEMPLATE(gr::basic::SignalGenerator, in, out, sample_rate, signal_type, frequency, amplitude, offset, phase);
auto registerSignalGenerator = gr::registerBlock<gr::basic::SignalGenerator, double, float>(gr::globalBlockRegistry());

#endif // GNURADIO_SIGNAL_GENERATOR_HPP
3 changes: 2 additions & 1 deletion blocks/basic/include/gnuradio-4.0/basic/StreamToDataSet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ If multiple 'start' or 'stop' Tags arrive in a single merged tag, only one DataS
A<float, "signal_min", Doc<"signal physical max. (e.g. DAQ) limit">> signal_min = 0.f;
A<float, "signal_max", Doc<"signal physical max. (e.g. DAQ) limit">> signal_max = 1.f;

GR_MAKE_REFLECTABLE(StreamFilterImpl, filter, in, out, filter, n_pre, n_post, n_max, sample_rate, signal_name, signal_quantity, signal_unit, signal_min, signal_max);

// internal trigger state
HistoryBuffer<T> _history{MIN_BUFFER_SIZE + n_pre};
TMatcher _matcher{};
Expand Down Expand Up @@ -362,7 +364,6 @@ using StreamFilter = StreamFilterImpl<T, true>;

} // namespace gr::basic

ENABLE_REFLECTION_FOR_TEMPLATE_FULL((typename T, bool streamOut, typename Matcher), (gr::basic::StreamFilterImpl<T, streamOut, Matcher>), filter, in, out, filter, n_pre, n_post, n_max, sample_rate, signal_name, signal_quantity, signal_unit, signal_min, signal_max);
static_assert(gr::HasProcessBulkFunction<gr::basic::StreamFilterImpl<float>>);

inline static auto registerStreamFilters = gr::registerBlock<gr::basic::StreamToDataSet, uint8_t, uint16_t, uint32_t, uint64_t, int8_t, int16_t, int32_t, int64_t, float, double, std::complex<float>, std::complex<double>>(gr::globalBlockRegistry()) | gr::registerBlock<gr::basic::StreamFilter, uint8_t, uint16_t, uint32_t, uint64_t, int8_t, int16_t, int32_t, int64_t, float, double, std::complex<float>, std::complex<double>>(gr::globalBlockRegistry());
Expand Down
7 changes: 3 additions & 4 deletions blocks/basic/include/gnuradio-4.0/basic/clock_source.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <gnuradio-4.0/Block.hpp>
#include <gnuradio-4.0/BlockRegistry.hpp>
#include <gnuradio-4.0/Tag.hpp>
#include <gnuradio-4.0/reflection.hpp>
#include <gnuradio-4.0/meta/reflection.hpp>

#include "gnuradio-4.0/TriggerMatcher.hpp"
#include <gnuradio-4.0/testing/TagMonitors.hpp>
Expand Down Expand Up @@ -48,6 +48,8 @@ The 'tag_times[ns]:tag_value(string)' vectors control the emission of tags with
A<bool, "perform zero-order-hold", Doc<"if tag_times>tag_values: true=publish last tag, false=publish empty">> do_zero_order_hold{false};
A<bool, "verbose console"> verbose_console = false;

GR_MAKE_REFLECTABLE(ClockSource, out, tag_times, tag_values, repeat_period, do_zero_order_hold, n_samples_max, chunk_size, sample_rate, verbose_console);

// Ready-to-use tags set by user
std::vector<Tag> tags{};
std::shared_ptr<std::thread> userProvidedThread;
Expand Down Expand Up @@ -252,9 +254,6 @@ template<typename T>
using DefaultClockSource = ClockSource<T, true, std::chrono::system_clock, true>;
} // namespace gr::basic

ENABLE_REFLECTION_FOR_TEMPLATE_FULL((typename T, bool useIoThread, typename ClockSourceType), (gr::basic::ClockSource<T, useIoThread, ClockSourceType>), //
out, tag_times, tag_values, repeat_period, do_zero_order_hold, n_samples_max, chunk_size, sample_rate, verbose_console);

auto registerClockSource = gr::registerBlock<gr::basic::DefaultClockSource, std::uint8_t, std::uint32_t, std::int32_t, float, double>(gr::globalBlockRegistry());
static_assert(gr::HasProcessBulkFunction<gr::basic::ClockSource<float>>);

Expand Down
13 changes: 7 additions & 6 deletions blocks/basic/include/gnuradio-4.0/basic/common_blocks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <gnuradio-4.0/Block.hpp>
#include <gnuradio-4.0/BlockRegistry.hpp>
#include <gnuradio-4.0/Graph.hpp>
#include <gnuradio-4.0/reflection.hpp>
#include <gnuradio-4.0/meta/reflection.hpp>

template<typename T>
class builtin_multiply : public gr::Block<builtin_multiply<T>> {
Expand All @@ -22,6 +22,8 @@ class builtin_multiply : public gr::Block<builtin_multiply<T>> {
gr::PortIn<T> in;
gr::PortOut<T> out;

GR_MAKE_REFLECTABLE(builtin_multiply, in, out, factor);

builtin_multiply() = delete;

builtin_multiply(gr::property_map properties) {
Expand All @@ -34,8 +36,6 @@ class builtin_multiply : public gr::Block<builtin_multiply<T>> {
[[nodiscard]] constexpr auto processOne(T a) const noexcept { return a * factor; }
};

ENABLE_REFLECTION_FOR_TEMPLATE(builtin_multiply, in, out, factor);

template<typename T>
class builtin_counter : public gr::Block<builtin_counter<T>> {
public:
Expand All @@ -44,6 +44,8 @@ class builtin_counter : public gr::Block<builtin_counter<T>> {
gr::PortIn<T> in;
gr::PortOut<T> out;

GR_MAKE_REFLECTABLE(builtin_counter, in, out);

[[nodiscard]] constexpr auto processOne(T a) const noexcept {
s_event_count++;
return a;
Expand All @@ -52,7 +54,6 @@ class builtin_counter : public gr::Block<builtin_counter<T>> {

template<typename T>
std::size_t builtin_counter<T>::s_event_count = 0;
ENABLE_REFLECTION_FOR_TEMPLATE(builtin_counter, in, out);

template<typename T>
struct MultiAdder : public gr::Block<MultiAdder<T>> {
Expand All @@ -61,6 +62,8 @@ struct MultiAdder : public gr::Block<MultiAdder<T>> {

gr::Annotated<gr::Size_t, "n_inputs", gr::Visible, gr::Doc<"variable number of inputs">, gr::Limits<1U, 32U>> n_inputs{0U};

GR_MAKE_REFLECTABLE(MultiAdder, inputs, out, n_inputs);

void settingsChanged(const gr::property_map& old_settings, const gr::property_map& new_settings) {
if (new_settings.contains("n_inputs") && old_settings.at("n_inputs") != new_settings.at("n_inputs")) {
// if one of the port is already connected and n_inputs was changed then throw
Expand Down Expand Up @@ -93,8 +96,6 @@ struct MultiAdder : public gr::Block<MultiAdder<T>> {
return gr::work::Status::OK;
}
};

ENABLE_REFLECTION_FOR_TEMPLATE_FULL((typename T), (MultiAdder<T>), inputs, out, n_inputs);
static_assert(gr::HasProcessBulkFunction<MultiAdder<float>>);

auto registerMultiply = gr::registerBlock<builtin_multiply, double, float>(gr::globalBlockRegistry());
Expand Down
2 changes: 1 addition & 1 deletion blocks/basic/test/qa_DataSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <gnuradio-4.0/Buffer.hpp>
#include <gnuradio-4.0/Graph.hpp>
#include <gnuradio-4.0/Scheduler.hpp>
#include <gnuradio-4.0/reflection.hpp>
#include <gnuradio-4.0/meta/reflection.hpp>

#include <gnuradio-4.0/basic/DataSink.hpp>
#include <gnuradio-4.0/testing/Delay.hpp>
Expand Down
7 changes: 4 additions & 3 deletions blocks/fileio/include/gnuradio-4.0/fileio/BasicFileIo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Important: this implementation assumes a host-order, CPU architecture specific b
A<std::string, "mode", Doc<"mode: \"overwrite\", \"append\", \"multi\"">, Visible> mode = std::string(magic_enum::enum_name(_mode));
A<gr::Size_t, "max bytes per file", Doc<"max bytes per file, 0: infinite ">, Visible> max_bytes_per_file = 0U;

GR_MAKE_REFLECTABLE(BasicFileSink, in, file_name, mode, max_bytes_per_file);

std::size_t _totalBytesWritten{0UZ};
std::size_t _totalBytesWrittenFile{0UZ};
std::ofstream _file;
Expand Down Expand Up @@ -185,6 +187,8 @@ Important: this implementation assumes a host-order, CPU architecture specific b
A<gr::Size_t, "length", Doc<"max number of samples items to read (0: infinite)">, Visible> length = 0U;
A<std::string, "trigger name", Doc<"name of trigger added to each file chunk">> trigger_name = "BasicFileSource::start";

GR_MAKE_REFLECTABLE(BasicFileSource, out, file_name, mode, repeat, offset, length, trigger_name);

std::ifstream _file;
std::vector<std::filesystem::path> _filesToRead;
bool _emittedStartTrigger = false;
Expand Down Expand Up @@ -292,9 +296,6 @@ Important: this implementation assumes a host-order, CPU architecture specific b

} // namespace gr::blocks::fileio

ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::fileio::BasicFileSink, in, file_name, mode, max_bytes_per_file)
ENABLE_REFLECTION_FOR_TEMPLATE(gr::blocks::fileio::BasicFileSource, out, file_name, mode, repeat, offset, length, trigger_name)

const inline auto registerBasicFileIo = gr::registerBlock<gr::blocks::fileio::BasicFileSink, uint8_t, uint16_t, uint32_t, uint64_t, int8_t, int16_t, int32_t, int64_t, float, double, gr::UncertainValue<float>, gr::UncertainValue<double>, std::complex<float>, std::complex<double>>(gr::globalBlockRegistry()) //
| gr::registerBlock<gr::blocks::fileio::BasicFileSource, uint8_t, uint16_t, uint32_t, uint64_t, int8_t, int16_t, int32_t, int64_t, float, double, gr::UncertainValue<float>, gr::UncertainValue<double>, std::complex<float>, std::complex<double>>(gr::globalBlockRegistry());

Expand Down
Loading
Loading