GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
gnss_synchro_monitor.h
Go to the documentation of this file.
1 /*!
2  * \file gnss_synchro_monitor.h
3  * \brief Interface of a receiver monitoring block which allows sending
4  * a data stream with the receiver internal parameters (Gnss_Synchro objects)
5  * to local or remote clients over UDP.
6  *
7  * \author Álvaro Cebrián Juan, 2018. acebrianjuan(at)gmail.com
8  *
9  * -----------------------------------------------------------------------------
10  *
11  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
12  * This file is part of GNSS-SDR.
13  *
14  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
15  * SPDX-License-Identifier: GPL-3.0-or-later
16  *
17  * -----------------------------------------------------------------------------
18  */
19 
20 #ifndef GNSS_SDR_GNSS_SYNCHRO_MONITOR_H
21 #define GNSS_SDR_GNSS_SYNCHRO_MONITOR_H
22 
23 #include "gnss_block_interface.h"
24 #include "gnss_synchro_udp_sink.h"
25 #include <gnuradio/block.h>
26 #include <gnuradio/runtime_types.h> // for gr_vector_void_star
27 #include <memory>
28 #include <string>
29 #include <vector>
30 
31 /** \addtogroup Core
32  * \{ */
33 /** \addtogroup Gnss_Synchro_Monitor core_monitor
34  * Classes for the Gnss_Synchro monitor.
35  * \{ */
36 
37 
39 
40 using gnss_synchro_monitor_sptr = gnss_shared_ptr<gnss_synchro_monitor>;
41 
42 gnss_synchro_monitor_sptr gnss_synchro_make_monitor(int n_channels,
43  int decimation_factor,
44  int udp_port,
45  const std::vector<std::string>& udp_addresses,
46  bool enable_protobuf);
47 
48 /*!
49  * \brief This class implements a monitoring block which allows sending
50  * a data stream with the receiver internal parameters (Gnss_Synchro objects)
51  * to local or remote clients over UDP.
52  */
53 class gnss_synchro_monitor : public gr::block
54 {
55 public:
56  ~gnss_synchro_monitor() = default; //!< Default destructor
57  void forecast(int noutput_items, gr_vector_int& ninput_items_required);
58  int general_work(int noutput_items, gr_vector_int& ninput_items,
59  gr_vector_const_void_star& input_items, gr_vector_void_star& output_items);
60 
61 private:
62  friend gnss_synchro_monitor_sptr gnss_synchro_make_monitor(int n_channels,
63  int decimation_factor,
64  int udp_port,
65  const std::vector<std::string>& udp_addresses,
66  bool enable_protobuf);
67 
68  gnss_synchro_monitor(int n_channels,
69  int decimation_factor,
70  int udp_port,
71  const std::vector<std::string>& udp_addresses,
72  bool enable_protobuf);
73 
74  int d_nchannels;
75  int d_decimation_factor;
76  std::unique_ptr<Gnss_Synchro_Udp_Sink> udp_sink_ptr;
77 };
78 
79 
80 /** \} */
81 /** \} */
82 #endif // GNSS_SDR_GNSS_SYNCHRO_MONITOR_H
Interface of a class that sends serialized Gnss_Synchro objects over udp to one or multiple endponits...
This interface represents a GNSS block.
~gnss_synchro_monitor()=default
Default destructor.
This class implements a monitoring block which allows sending a data stream with the receiver interna...