GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
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  */
41 {
42 public:
43  SpirFileSignalSource(const ConfigurationInterface* configuration, const std::string& role,
44  unsigned int in_streams, unsigned int out_streams,
46 
47  ~SpirFileSignalSource() = default;
48 
49 protected:
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 
57 private:
58  unpack_intspir_1bit_samples_sptr unpack_intspir_;
59 };
60 
61 
62 /** \} */
63 /** \} */
64 #endif // GNSS_SDR_SPIR_FILE_SIGNAL_SOURCE_H
Unpacks SPIR int samples to NSR 1 bit samples.
std::tuple< size_t, bool > itemTypeToSize() override
Compute the item size, from the item_type(). Subclasses may constrain types that don&#39;t make...
This abstract class represents an interface to configuration parameters.
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.
Base class to file-oriented SignalSourceBase GNSS blocks.
Class that reads signals samples from a file and adapts it to a SignalSourceInterface.