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