mirror of https://github.com/gnss-sdr/gnss-sdr
39 lines
1.3 KiB
C++
39 lines
1.3 KiB
C++
/*!
|
|
* \file file_signal_source.cc
|
|
* \brief Implementation of a class that reads signals samples from a file
|
|
* and adapts it to a SignalSourceInterface
|
|
* \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
|
|
* Javier Arribas, 2011 jarribas(at)cttc.es
|
|
*
|
|
* -----------------------------------------------------------------------------
|
|
*
|
|
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
|
* This file is part of GNSS-SDR.
|
|
*
|
|
* Copyright (C) 2010-2021 (see AUTHORS file for a list of contributors)
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
|
|
#include "file_signal_source.h"
|
|
#include "gnss_sdr_string_literals.h"
|
|
#include <glog/logging.h>
|
|
|
|
using namespace std::string_literals;
|
|
|
|
FileSignalSource::FileSignalSource(ConfigurationInterface const* configuration,
|
|
std::string const& role, unsigned int in_streams, unsigned int out_streams,
|
|
Concurrent_Queue<pmt::pmt_t>* queue)
|
|
: FileSourceBase(configuration, role, "File_Signal_Source"s, queue, "short"s)
|
|
{
|
|
if (in_streams > 0)
|
|
{
|
|
LOG(ERROR) << "A signal source does not have an input stream";
|
|
}
|
|
if (out_streams > 1)
|
|
{
|
|
LOG(ERROR) << "This implementation only supports one output stream";
|
|
}
|
|
}
|