mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 20:20:35 +00:00
moved logging output from template fct in header to source file to not have to include logging in header. Added maybe_unused to constructor argument which is unused to fix warning
This commit is contained in:
parent
dbc8ea18bf
commit
595733bf67
@ -28,7 +28,7 @@ using namespace std::string_literals;
|
||||
|
||||
FifoSignalSource::FifoSignalSource(ConfigurationInterface const* configuration,
|
||||
std::string const& role, unsigned int in_streams, unsigned int out_streams,
|
||||
Concurrent_Queue<pmt::pmt_t>* queue)
|
||||
[[maybe_unused]] Concurrent_Queue<pmt::pmt_t>* queue)
|
||||
: SignalSourceBase(configuration, role, "Fifo_Signal_Source"s),
|
||||
item_size_(sizeof(gr_complex)), // currenty output item size is always gr_complex
|
||||
fifo_reader_(FifoReader::make(configuration->property(role + ".filename"s, "../data/example_capture.dat"s),
|
||||
|
@ -101,9 +101,14 @@ size_t FifoReader::read_gr_complex(int noutput_items, gr_vector_void_star &outpu
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(ERROR) << "unhandled FIFO event";
|
||||
fifo_error_output();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return items_retrieved;
|
||||
}
|
||||
|
||||
void FifoReader::fifo_error_output() const
|
||||
{
|
||||
LOG(ERROR) << "unhandled FIFO event";
|
||||
}
|
||||
|
@ -26,7 +26,6 @@
|
||||
* \{ */
|
||||
/** \addtogroup Signal_Source_gnuradio_blocks
|
||||
* \{ */
|
||||
|
||||
class FifoReader : virtual public gr::sync_block
|
||||
{
|
||||
public:
|
||||
@ -80,13 +79,17 @@ private:
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(ERROR) << "unhandled FIFO event";
|
||||
fifo_error_output();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return items_retrieved;
|
||||
}
|
||||
|
||||
//! this function moves logging output from this header into the source file
|
||||
//! thereby eliminating the need to include glog/logging.h in this header
|
||||
void fifo_error_output() const;
|
||||
|
||||
const std::string file_name_;
|
||||
const std::string sample_type_;
|
||||
std::ifstream fifo_;
|
||||
|
Loading…
Reference in New Issue
Block a user