GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
monitor_pvt_udp_sink.h
Go to the documentation of this file.
1/*!
2 * \file monitor_pvt_udp_sink.h
3 * \brief Interface of a class that sends serialized Monitor_Pvt objects
4 * over udp to one or multiple endpoints
5 * \author Álvaro Cebrián Juan, 2019. acebrianjuan(at)gmail.com
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-2020 (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_MONITOR_PVT_UDP_SINK_H
19#define GNSS_SDR_MONITOR_PVT_UDP_SINK_H
20
21#include "monitor_pvt.h"
22#include "serdes_monitor_pvt.h"
23#include <boost/asio.hpp>
24#include <memory>
25#include <string>
26#include <vector>
27
28/** \addtogroup PVT
29 * \{ */
30/** \addtogroup PVT_libs
31 * \{ */
32
33
34#if USE_BOOST_ASIO_IO_CONTEXT
35using b_io_context = boost::asio::io_context;
36#else
37using b_io_context = boost::asio::io_service;
38#endif
39
40class Monitor_Pvt_Udp_Sink
41{
42public:
43 Monitor_Pvt_Udp_Sink(
44 const std::vector<std::string>& addresses,
45 const std::vector<std::string>& ports,
46 bool protobuf_enabled);
47 bool write_monitor_pvt(const Monitor_Pvt* const monitor_pvt);
48
49private:
50 Serdes_Monitor_Pvt serdes;
51 b_io_context io_context;
52 boost::asio::ip::udp::socket socket;
53 std::vector<boost::asio::ip::udp::endpoint> endpoints;
54 boost::system::error_code error;
55 bool use_protobuf;
56};
57
58
59/** \} */
60/** \} */
61#endif // GNSS_SDR_MONITOR_PVT_UDP_SINK_H
This class contains parameters and outputs of the PVT block.
Definition monitor_pvt.h:34
This class implements serialization and deserialization of Monitor_Pvt objects using Protocol Buffers...
Interface of the Monitor_Pvt class.
Serialization / Deserialization of Monitor_Pvt objects using Protocol Buffers.