mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-06-06 08:34:10 +00:00
Merge branch 'MathieuFavreau-refactor/cleanup-gnss-block-factory' into next
This commit is contained in:
commit
928e6a1297
File diff suppressed because it is too large
Load Diff
@ -57,7 +57,7 @@ public:
|
||||
|
||||
std::unique_ptr<GNSSBlockInterface> GetSignalConditioner(const ConfigurationInterface* configuration, int ID = -1);
|
||||
|
||||
std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GetChannels(const ConfigurationInterface* configuration,
|
||||
std::vector<std::unique_ptr<GNSSBlockInterface>> GetChannels(const ConfigurationInterface* configuration,
|
||||
Concurrent_Queue<pmt::pmt_t>* queue);
|
||||
|
||||
std::unique_ptr<GNSSBlockInterface> GetObservables(const ConfigurationInterface* configuration);
|
||||
|
@ -212,10 +212,10 @@ void GNSSFlowgraph::init()
|
||||
|
||||
auto channels = block_factory->GetChannels(configuration_.get(), queue_.get());
|
||||
|
||||
channels_count_ = static_cast<int>(channels->size());
|
||||
channels_count_ = static_cast<int>(channels.size());
|
||||
for (int i = 0; i < channels_count_; i++)
|
||||
{
|
||||
std::shared_ptr<GNSSBlockInterface> chan_ = std::move(channels->at(i));
|
||||
std::shared_ptr<GNSSBlockInterface> chan_ = std::move(channels.at(i));
|
||||
channels_.push_back(std::dynamic_pointer_cast<ChannelInterface>(chan_));
|
||||
}
|
||||
|
||||
|
@ -394,9 +394,9 @@ TEST(GNSSBlockFactoryTest, InstantiateChannels)
|
||||
configuration->set_property("TelemetryDecoder_1C.implementation", "GPS_L1_CA_Telemetry_Decoder");
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> channels = factory->GetChannels(configuration.get(), queue.get());
|
||||
EXPECT_EQ(static_cast<unsigned int>(2), channels->size());
|
||||
channels->erase(channels->begin(), channels->end());
|
||||
std::vector<std::unique_ptr<GNSSBlockInterface>> channels = factory->GetChannels(configuration.get(), queue.get());
|
||||
EXPECT_EQ(static_cast<unsigned int>(2), channels.size());
|
||||
channels.erase(channels.begin(), channels.end());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user