GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
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  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
16  *
17  * GNSS-SDR is a software defined Global Navigation
18  * Satellite Systems receiver
19  *
20  * This file is part of GNSS-SDR.
21  *
22  * SPDX-License-Identifier: GPL-3.0-or-later
23  *
24  * -----------------------------------------------------------------------------
25  */
26 
27 #ifndef GNSS_SDR_BLOCK_FACTORY_H
28 #define GNSS_SDR_BLOCK_FACTORY_H
29 
30 #include "concurrent_queue.h"
31 #include <pmt/pmt.h>
32 #include <memory> // for unique_ptr
33 #include <string> // for string
34 #include <vector> // for vector
35 
36 
38 class GNSSBlockInterface;
40 class TrackingInterface;
42 
43 /*!
44  * \brief Class that produces all kinds of GNSS blocks
45  */
47 {
48 public:
49  GNSSBlockFactory() = default;
50  ~GNSSBlockFactory() = default;
51 
52  std::unique_ptr<GNSSBlockInterface> GetSignalSource(const ConfigurationInterface* configuration,
53  Concurrent_Queue<pmt::pmt_t>* queue, int ID = -1);
54 
55  std::unique_ptr<GNSSBlockInterface> GetSignalConditioner(const ConfigurationInterface* configuration, int ID = -1);
56 
57  std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GetChannels(const ConfigurationInterface* configuration,
59 
60  std::unique_ptr<GNSSBlockInterface> GetObservables(const ConfigurationInterface* configuration);
61 
62  std::unique_ptr<GNSSBlockInterface> GetPVT(const ConfigurationInterface* configuration);
63 
64  /*!
65  * \brief Returns the block with the required role implementation and its configuration parameters
66  */
67  std::unique_ptr<GNSSBlockInterface> GetBlock(const ConfigurationInterface* configuration,
68  const std::string& role,
69  unsigned int in_streams,
70  unsigned int out_streams,
71  Concurrent_Queue<pmt::pmt_t>* queue = nullptr);
72 
73 private:
74  std::unique_ptr<GNSSBlockInterface> GetChannel(
75  const ConfigurationInterface* configuration,
76  const std::string& signal,
77  int channel,
79 
80  std::unique_ptr<AcquisitionInterface> GetAcqBlock(
81  const ConfigurationInterface* configuration,
82  const std::string& role,
83  unsigned int in_streams,
84  unsigned int out_streams);
85 
86  std::unique_ptr<TrackingInterface> GetTrkBlock(
87  const ConfigurationInterface* configuration,
88  const std::string& role,
89  unsigned int in_streams,
90  unsigned int out_streams);
91 
92  std::unique_ptr<TelemetryDecoderInterface> GetTlmBlock(
93  const ConfigurationInterface* configuration,
94  const std::string& role,
95  unsigned int in_streams,
96  unsigned int out_streams);
97 };
98 
99 #endif // GNSS_SDR_BLOCK_FACTORY_H
Interface of a thread-safe std::queue.
This abstract class represents an interface to an acquisition GNSS block.
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)
Returns the block with the required role implementation and its configuration parameters.
This abstract class represents an interface to configuration parameters.
Class that produces all kinds of GNSS blocks.
This abstract class represents an interface to a navigation GNSS block.
This abstract class represents an interface to GNSS blocks.
This abstract class represents an interface to a tracking block.