GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
nav_message_monitor.h
Go to the documentation of this file.
1 /*!
2  * \file nav_message_monitor.h
3  * \brief GNU Radio block that processes Nav_Message_Packet received from
4  * telemetry blocks and sends them via UDP.
5  * \author Carles Fernandez-Prades, 2021. cfernandez(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-2021 (see AUTHORS file for a list of contributors)
13  * SPDX-License-Identifier: GPL-3.0-or-later
14  *
15  * -----------------------------------------------------------------------------
16  */
17 
18 #ifndef GNSS_SDR_NAV_MESSAGE_MONITOR_H
19 #define GNSS_SDR_NAV_MESSAGE_MONITOR_H
20 
21 #include "gnss_block_interface.h"
22 #include "nav_message_udp_sink.h"
23 #include <gnuradio/block.h>
24 #include <pmt/pmt.h>
25 #include <cstdint>
26 #include <memory>
27 #include <string>
28 #include <vector>
29 
30 /** \addtogroup Core
31  * \{ */
32 /** \addtogroup Core_Receiver_Library
33  * \{ */
34 
36 
37 using nav_message_monitor_sptr = gnss_shared_ptr<nav_message_monitor>;
38 
39 nav_message_monitor_sptr nav_message_monitor_make(const std::vector<std::string>& addresses, uint16_t port);
40 
41 /*!
42  * \brief GNU Radio block that receives asynchronous Nav_Message_Packet obkects
43  * from the telemetry blocks and sends them via UDP
44  */
45 class nav_message_monitor : public gr::block
46 {
47 public:
48  ~nav_message_monitor() = default; //!< Default destructor
49 
50 private:
51  friend nav_message_monitor_sptr nav_message_monitor_make(const std::vector<std::string>& addresses, uint16_t port);
52  nav_message_monitor(const std::vector<std::string>& addresses, uint16_t port);
53  void msg_handler_nav_message(const pmt::pmt_t& msg);
54  std::unique_ptr<Nav_Message_Udp_Sink> nav_message_udp_sink_;
55 };
56 
57 
58 /** \} */
59 /** \} */
60 #endif // GNSS_SDR_NAV_MESSAGE_MONITOR_H
This interface represents a GNSS block.
GNU Radio block that receives asynchronous Nav_Message_Packet obkects from the telemetry blocks and s...
~nav_message_monitor()=default
Default destructor.