GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
spir_file_signal_source.h
Go to the documentation of this file.
1/*!
2 * \file spir_file_signal_source.h
3 * \brief Implementation of a class that reads signals samples from a SPIR file
4 * and adapts it to a SignalSourceInterface.
5 * \author Fran Fabra, 2014 fabra(at)ice.csic.es
6 *
7 * -----------------------------------------------------------------------------
8 *
9 * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
10 * This file is part of GNSS-SDR.
11 *
12 * Copyright (C) 2010-2021 (see AUTHORS file for a list of contributors)
13 * SPDX-License-Identifier: GPL-3.0-or-later
14 *
15 * -----------------------------------------------------------------------------
16 */
17
18#ifndef GNSS_SDR_SPIR_FILE_SIGNAL_SOURCE_H
19#define GNSS_SDR_SPIR_FILE_SIGNAL_SOURCE_H
20
21#include "file_source_base.h"
23#include <cstddef>
24#include <string>
25#include <tuple>
26
27
28/** \addtogroup Signal_Source
29 * \{ */
30/** \addtogroup Signal_Source_adapters
31 * \{ */
32
33
35
36/*!
37 * \brief Class that reads signals samples from a file
38 * and adapts it to a SignalSourceInterface
39 */
40class SpirFileSignalSource : public FileSourceBase
41{
42public:
43 SpirFileSignalSource(const ConfigurationInterface* configuration, const std::string& role,
44 unsigned int in_streams, unsigned int out_streams,
46
47 ~SpirFileSignalSource() = default;
48
49protected:
50 std::tuple<size_t, bool> itemTypeToSize() override;
51 gnss_shared_ptr<gr::block> source() const override;
52 void create_file_source_hook() override;
53 void pre_connect_hook(gr::top_block_sptr top_block) override;
54 void post_disconnect_hook(gr::top_block_sptr top_block) override;
55
56
57private:
58 unpack_intspir_1bit_samples_sptr unpack_intspir_;
59};
60
61
62/** \} */
63/** \} */
64#endif // GNSS_SDR_SPIR_FILE_SIGNAL_SOURCE_H
This class implements a thread-safe std::queue.
This abstract class represents an interface to configuration parameters.
FileSourceBase(ConfigurationInterface const *configuration, std::string const &role, std::string impl, Concurrent_Queue< pmt::pmt_t > *queue, std::string default_item_type="short")
Constructor.
std::tuple< size_t, bool > itemTypeToSize() override
Compute the item size, from the item_type(). Subclasses may constrain types that don't make.
gnss_shared_ptr< gr::block > source() const override
Abstracted front-end source. Sub-classes may override if they create specialized chains to decode sou...
Header file of the base class to file-oriented signal_source GNSS blocks.
Unpacks SPIR int samples to NSR 1 bit samples.