GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
gnss_block_factory.h
Go to the documentation of this file.
1/*!
2 * \file gnss_block_factory.h
3 * \brief Interface of a factory that returns smart pointers to GNSS blocks.
4 * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
5 * Luis Esteve, 2011. luis(at)epsilon-formacion.com
6 * Javier Arribas, 2011. jarribas(at)cttc.es
7 * Carles Fernandez-Prades, 2014-2020. cfernandez(at)cttc.es
8 *
9 * This class encapsulates the complexity behind the instantiation
10 * of GNSS blocks.
11 *
12 *
13 * -----------------------------------------------------------------------------
14 *
15 * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
16 * This file is part of GNSS-SDR.
17 *
18 * Copyright (C) 2010-2026 (see AUTHORS file for a list of contributors)
19 * SPDX-License-Identifier: GPL-3.0-or-later
20 *
21 * -----------------------------------------------------------------------------
22 */
23
24#ifndef GNSS_SDR_BLOCK_FACTORY_H
25#define GNSS_SDR_BLOCK_FACTORY_H
26
27#include "concurrent_queue.h"
28#include <pmt/pmt.h>
29#include <memory> // for unique_ptr
30#include <string> // for string
31#include <vector> // for vector
32
33/** \addtogroup Core
34 * \{ */
35/** \addtogroup Core_Receiver
36 * \{ */
37
38
45
46/*!
47 * \brief Class that produces all kinds of GNSS blocks
48 */
49class GNSSBlockFactory
50{
51public:
52 GNSSBlockFactory() = default;
53 ~GNSSBlockFactory() = default;
54
55 std::unique_ptr<SignalSourceInterface> GetSignalSource(const ConfigurationInterface* configuration,
56 Concurrent_Queue<pmt::pmt_t>* queue, int ID = -1) const;
57
58 std::unique_ptr<GNSSBlockInterface> GetSignalConditioner(const ConfigurationInterface* configuration, int ID = -1) const;
59
60 std::vector<std::unique_ptr<GNSSBlockInterface>> GetChannels(const ConfigurationInterface* configuration,
61 Concurrent_Queue<pmt::pmt_t>* queue) const;
62
63 std::unique_ptr<GNSSBlockInterface> GetObservables(const ConfigurationInterface* configuration) const;
64
65 std::unique_ptr<GNSSBlockInterface> GetPVT(const ConfigurationInterface* configuration) const;
66
67 /*!
68 * \brief Returns the block with the required role implementation and its configuration parameters
69 */
70 std::unique_ptr<GNSSBlockInterface> GetBlock(const ConfigurationInterface* configuration,
71 const std::string& role,
72 unsigned int in_streams,
73 unsigned int out_streams,
74 Concurrent_Queue<pmt::pmt_t>* queue = nullptr) const;
75
76private:
77 std::unique_ptr<GNSSBlockInterface> GetChannel(
78 const ConfigurationInterface* configuration,
79 const std::string& signal,
80 int channel,
81 Concurrent_Queue<pmt::pmt_t>* queue) const;
82
83 std::unique_ptr<AcquisitionInterface> GetAcqBlock(
84 const ConfigurationInterface* configuration,
85 const std::string& role,
86 unsigned int in_streams,
87 unsigned int out_streams) const;
88
89 std::unique_ptr<TrackingInterface> GetTrkBlock(
90 const ConfigurationInterface* configuration,
91 const std::string& role,
92 unsigned int in_streams,
93 unsigned int out_streams) const;
94
95 std::unique_ptr<TelemetryDecoderInterface> GetTlmBlock(
96 const ConfigurationInterface* configuration,
97 const std::string& role,
98 unsigned int in_streams,
99 unsigned int out_streams) const;
100};
101
102
103/** \} */
104/** \} */
105#endif // GNSS_SDR_BLOCK_FACTORY_H
This abstract class represents an interface to an acquisition GNSS block.
This class implements a thread-safe std::queue.
This abstract class represents an interface to configuration parameters.
std::unique_ptr< GNSSBlockInterface > GetBlock(const ConfigurationInterface *configuration, const std::string &role, unsigned int in_streams, unsigned int out_streams, Concurrent_Queue< pmt::pmt_t > *queue=nullptr) const
Returns the block with the required role implementation and its configuration parameters.
This abstract class represents an interface to GNSS blocks.
This abstract class represents an interface to signal_source GNSS block.
This abstract class represents an interface to a navigation GNSS block.
This abstract class represents an interface to a tracking block.
Interface of a thread-safe std::queue.