2013-10-14 16:51:47 +00:00
|
|
|
/*!
|
|
|
|
* \file nsr_file_signal_source.h
|
|
|
|
* \brief Implementation of a class that reads signals samples from a NSR 2 bits sampler front-end file
|
|
|
|
* and adapts it to a SignalSourceInterface. More information about the front-end here
|
|
|
|
* http://www.ifen.com/products/sx-scientific-gnss-solutions/nsr-software-receiver.html
|
|
|
|
* \author Javier Arribas, 2013 jarribas(at)cttc.es
|
|
|
|
*
|
|
|
|
* This class represents a file signal source.
|
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2013-10-14 16:51:47 +00:00
|
|
|
*
|
2020-12-30 12:35:06 +00:00
|
|
|
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
2013-10-14 16:51:47 +00:00
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
2021-02-12 23:18:23 +00:00
|
|
|
* Copyright (C) 2010-2021 (see AUTHORS file for a list of contributors)
|
2020-02-08 00:20:02 +00:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2013-10-14 16:51:47 +00:00
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2013-10-14 16:51:47 +00:00
|
|
|
*/
|
|
|
|
|
2020-02-08 09:10:46 +00:00
|
|
|
#ifndef GNSS_SDR_NSR_FILE_SIGNAL_SOURCE_H
|
|
|
|
#define GNSS_SDR_NSR_FILE_SIGNAL_SOURCE_H
|
2013-10-14 16:51:47 +00:00
|
|
|
|
2021-02-12 23:18:23 +00:00
|
|
|
#include "file_source_base.h"
|
2018-02-26 02:15:53 +00:00
|
|
|
#include "unpack_byte_2bit_samples.h"
|
2013-10-14 16:51:47 +00:00
|
|
|
|
2020-11-01 12:37:19 +00:00
|
|
|
/** \addtogroup Signal_Source
|
|
|
|
* \{ */
|
|
|
|
/** \addtogroup Signal_Source_adapters
|
|
|
|
* \{ */
|
|
|
|
|
2013-10-14 16:51:47 +00:00
|
|
|
class ConfigurationInterface;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Class that reads signals samples from a file
|
|
|
|
* and adapts it to a SignalSourceInterface
|
|
|
|
*/
|
2021-02-12 23:18:23 +00:00
|
|
|
class NsrFileSignalSource : public FileSourceBase
|
2013-10-14 16:51:47 +00:00
|
|
|
{
|
|
|
|
public:
|
2020-06-29 07:07:41 +00:00
|
|
|
NsrFileSignalSource(const ConfigurationInterface* configuration, const std::string& role,
|
2018-03-03 01:03:39 +00:00
|
|
|
unsigned int in_streams, unsigned int out_streams,
|
2020-06-18 09:49:28 +00:00
|
|
|
Concurrent_Queue<pmt::pmt_t>* queue);
|
2013-10-14 16:51:47 +00:00
|
|
|
|
2019-07-21 17:32:52 +00:00
|
|
|
~NsrFileSignalSource() = default;
|
2017-08-15 22:58:10 +00:00
|
|
|
|
2021-02-12 23:18:23 +00:00
|
|
|
protected:
|
2021-02-13 01:23:10 +00:00
|
|
|
std::tuple<size_t, bool> itemTypeToSize() override;
|
2021-02-12 23:18:23 +00:00
|
|
|
double packetsPerSample() const override;
|
|
|
|
gnss_shared_ptr<gr::block> source() const override;
|
|
|
|
void create_file_source_hook() override;
|
|
|
|
void pre_connect_hook(gr::top_block_sptr top_block) override;
|
|
|
|
void pre_disconnect_hook(gr::top_block_sptr top_block) override;
|
2013-10-14 16:51:47 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
unpack_byte_2bit_samples_sptr unpack_byte_;
|
|
|
|
};
|
|
|
|
|
2020-11-01 12:37:19 +00:00
|
|
|
|
|
|
|
/** \} */
|
|
|
|
/** \} */
|
2020-02-08 09:10:46 +00:00
|
|
|
#endif // GNSS_SDR_NSR_FILE_SIGNAL_SOURCE_H
|