1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-12 11:10:33 +00:00

Improve formatting, add missing include

This commit is contained in:
Carles Fernandez 2024-08-19 09:26:21 +02:00
parent 62cb96ae03
commit da21ff4fd9
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 13 additions and 5 deletions

View File

@ -8,7 +8,7 @@
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
* This file is part of GNSS-SDR.
*
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
* Copyright (C) 2010-2024 (see AUTHORS file for a list of contributors)
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
@ -49,6 +49,7 @@ std::vector<std::string> parse_comma_list(const std::string& str)
return list;
}
IONGSMSSignalSource::IONGSMSSignalSource(const ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
@ -62,10 +63,14 @@ IONGSMSSignalSource::IONGSMSSignalSource(const ConfigurationInterface* configura
in_streams_(in_streams),
out_streams_(out_streams)
{
if (in_streams > 0)
if (in_streams_ > 0)
{
LOG(ERROR) << "A signal source does not have an input stream";
}
if (out_streams_ <= 0)
{
LOG(ERROR) << "A signal source does not have an output stream";
}
sources_ = metadata_.make_stream_sources(configuration, role, stream_ids_);
@ -91,6 +96,7 @@ void IONGSMSSignalSource::connect(gr::top_block_sptr top_block)
}
}
void IONGSMSSignalSource::disconnect(gr::top_block_sptr top_block)
{
std::size_t cumulative_index = 0;
@ -103,6 +109,7 @@ void IONGSMSSignalSource::disconnect(gr::top_block_sptr top_block)
}
}
gr::basic_block_sptr IONGSMSSignalSource::get_left_block()
{
LOG(WARNING) << "Trying to get signal source left block.";
@ -110,11 +117,13 @@ gr::basic_block_sptr IONGSMSSignalSource::get_left_block()
return IONGSMSFileSource::sptr();
}
gr::basic_block_sptr IONGSMSSignalSource::get_right_block()
{
return get_right_block(0);
}
gr::basic_block_sptr IONGSMSSignalSource::get_right_block(int RF_channel)
{
return copy_blocks_[RF_channel];

View File

@ -8,7 +8,7 @@
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
* This file is part of GNSS-SDR.
*
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
* Copyright (C) 2010-2024 (see AUTHORS file for a list of contributors)
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
@ -22,6 +22,7 @@
#include "file_source_base.h"
#include "gnss_sdr_timestamp.h"
#include "ion_gsms.h"
#include <cstdint>
#include <string>
#include <vector>
@ -44,8 +45,6 @@ public:
~IONGSMSSignalSource() override = default;
protected:
// std::tuple<size_t, bool> itemTypeToSize() override;
// double packetsPerSample() const override;
void connect(gr::top_block_sptr top_block) override;
void disconnect(gr::top_block_sptr top_block) override;