|
3 | 3 | #include <config.h> |
4 | 4 | #include <gnuradio/block_detail.h> |
5 | 5 | #include <gnuradio/blocks/copy.h> |
| 6 | +#include <gnuradio/blocks/file_sink.h> |
6 | 7 | #include <gnuradio/blocks/null_sink.h> |
7 | 8 | #include <gnuradio/soapy/source.h> |
8 | 9 | #include <gnuradio/zeromq/pub_sink.h> |
@@ -46,6 +47,11 @@ SdrDevice::SdrDevice(const Config& config, const Device& device, RemoteControlle |
46 | 47 | m_processorIndex[range.center()] = index++; |
47 | 48 | } |
48 | 49 |
|
| 50 | + if (config.dumpSource()) { |
| 51 | + const auto fileName = getRawFileName(config.workDir(), device, "source-all", "fc", ranges.front().center(), device.sample_rate); |
| 52 | + m_connector.connect<Block>(m_source, gr::blocks::file_sink::make(sizeof(gr_complex), fileName.c_str())); |
| 53 | + } |
| 54 | + |
49 | 55 | m_tb->start(); |
50 | 56 | Logger::info(LABEL, "started"); |
51 | 57 | } |
@@ -110,7 +116,7 @@ void SdrDevice::updateRecordings(const std::vector<Recording> recordings) { |
110 | 116 | if (m_recorders.size() < static_cast<size_t>(m_config.recordersCount())) { |
111 | 117 | const auto sampleRate = m_device.sample_rate; |
112 | 118 | m_recorders.push_back( |
113 | | - std::make_unique<Recorder>(m_config, m_zeromq, sampleRate, recording, std::bind(&RemoteController::sendTransmission, m_remoteController, m_device, std::placeholders::_1))); |
| 119 | + std::make_unique<Recorder>(m_config, m_device, m_zeromq, sampleRate, recording, std::bind(&RemoteController::sendTransmission, m_remoteController, m_device, std::placeholders::_1))); |
114 | 120 | } else { |
115 | 121 | if (!ignoredTransmissions.count(recording.recordingFrequency)) { |
116 | 122 | Logger::info(LABEL, "maximum recorders limit reached, frequency: {}", formatFrequency(recording.recordingFrequency, RED)); |
|
0 commit comments