GNSS-SDR  0.0.17
An Open Source GNSS Software Defined Receiver
file_timestamp_signal_source.h
Go to the documentation of this file.
1 /*!
2  * \file file_timestamp_signal_source.h
3  * \brief This class reads samples stored in a file and generate stream tags with its timestamp information stored in separated file
4  * \author Javier Arribas, jarribas(at)cttc.es
5  *
6  * -----------------------------------------------------------------------------
7  *
8  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
9  * This file is part of GNSS-SDR.
10  *
11  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
12  * SPDX-License-Identifier: GPL-3.0-or-later
13  *
14  * -----------------------------------------------------------------------------
15  */
16 
17 
18 #ifndef GNSS_SDR_FILE_TIMESTAMP_SIGNAL_SOURCE_H
19 #define GNSS_SDR_FILE_TIMESTAMP_SIGNAL_SOURCE_H
20 
22 #include "file_source_base.h"
23 #include "gnss_sdr_timestamp.h"
24 #include <string>
25 
26 /** \addtogroup Signal_Source
27  * \{ */
28 /** \addtogroup Signal_Source_adapters
29  * \{ */
30 
31 
32 /*!
33  * \brief Class that reads signals samples from a file
34  * and adapts it to a SignalSourceInterface
35  */
37 {
38 public:
39  FileTimestampSignalSource(const ConfigurationInterface* configuration, const std::string& role,
40  unsigned int in_streams, unsigned int out_streams,
42 
43  ~FileTimestampSignalSource() = default;
44 
45 protected:
46  // std::tuple<size_t, bool> itemTypeToSize() override;
47  // double packetsPerSample() const override;
48  gnss_shared_ptr<gr::block> source() const override;
49  void create_file_source_hook() override;
50  void pre_connect_hook(gr::top_block_sptr top_block) override;
51  void pre_disconnect_hook(gr::top_block_sptr top_block) override;
52 
53 private:
54  gnss_shared_ptr<Gnss_Sdr_Timestamp> timestamp_block_;
55  std::string timestamp_file_;
56  double timestamp_clock_offset_ms_;
57 };
58 
59 
60 /** \} */
61 /** \} */
62 #endif // GNSS_SDR_FILE_TIMESTAMP_SIGNAL_SOURCE_H
Class that reads signals samples from a file and adapts it to a SignalSourceInterface.
gnss_shared_ptr< gr::block > source() const override
Abstracted front-end source. Sub-classes may override if they create specialized chains to decode sou...
GNURadio block that adds to sample stream timestamp metadata information stored on a sepparated file...
This abstract class represents an interface to configuration parameters.
Header file of the base class to file-oriented signal_source GNSS blocks.
Base class to file-oriented SignalSourceBase GNSS blocks.
This class represents an interface to configuration parameters.