GNSS-SDR  0.0.13
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  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
12  *
13  * GNSS-SDR is a software defined Global Navigation
14  * Satellite Systems receiver
15  *
16  * This file is part of GNSS-SDR.
17  *
18  * SPDX-License-Identifier: GPL-3.0-or-later
19  *
20  * -----------------------------------------------------------------------------
21  */
22 
23 #ifndef GNSS_SDR_GNSS_SYNCHRO_MONITOR_H
24 #define GNSS_SDR_GNSS_SYNCHRO_MONITOR_H
25 
26 #include "gnss_synchro_udp_sink.h"
27 #include <gnuradio/runtime_types.h> // for gr_vector_void_star
28 #include <gnuradio/sync_block.h>
29 #include <memory>
30 #include <string>
31 #include <vector>
32 #if GNURADIO_USES_STD_POINTERS
33 #include <memory>
34 #else
35 #include <boost/shared_ptr.hpp>
36 #endif
37 
39 
40 #if GNURADIO_USES_STD_POINTERS
41 using gnss_synchro_monitor_sptr = std::shared_ptr<gnss_synchro_monitor>;
42 #else
43 using gnss_synchro_monitor_sptr = boost::shared_ptr<gnss_synchro_monitor>;
44 #endif
45 
46 gnss_synchro_monitor_sptr gnss_synchro_make_monitor(int n_channels,
47  int decimation_factor,
48  int udp_port,
49  const std::vector<std::string>& udp_addresses,
50  bool enable_protobuf);
51 
52 /*!
53  * \brief This class implements a monitoring block which allows sending
54  * a data stream with the receiver internal parameters (Gnss_Synchro objects)
55  * to local or remote clients over UDP.
56  */
57 class gnss_synchro_monitor : public gr::sync_block
58 {
59 public:
60  ~gnss_synchro_monitor() = default; //!< Default destructor
61 
62  int work(int noutput_items, gr_vector_const_void_star& input_items,
63  gr_vector_void_star& output_items);
64 
65 private:
66  friend gnss_synchro_monitor_sptr gnss_synchro_make_monitor(int n_channels,
67  int decimation_factor,
68  int udp_port,
69  const std::vector<std::string>& udp_addresses,
70  bool enable_protobuf);
71 
72  gnss_synchro_monitor(int n_channels,
73  int decimation_factor,
74  int udp_port,
75  const std::vector<std::string>& udp_addresses,
76  bool enable_protobuf);
77 
78  int d_nchannels;
79  int d_decimation_factor;
80  std::unique_ptr<Gnss_Synchro_Udp_Sink> udp_sink_ptr;
81  int count;
82 };
83 
84 #endif
Interface of a class that sends serialized Gnss_Synchro objects over udp to one or multiple endponits...
~gnss_synchro_monitor()=default
Default destructor.
This class implements a monitoring block which allows sending a data stream with the receiver interna...