GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
monitor_ephemeris_udp_sink.h
Go to the documentation of this file.
1/*!
2 * \file monitor_ephemeris_udp_sink.h
3 * \brief Interface of a class that sends serialized Gps_Ephemeris and
4 * Galileo_Ephemeris objects over udp to one or multiple endpoints.
5 * \author Javier Arribas, 2021. jarribas(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_MONITOR_EPHEMERIS_UDP_SINK_H
19#define GNSS_SDR_MONITOR_EPHEMERIS_UDP_SINK_H
20
21#include "galileo_ephemeris.h"
22#include "gps_ephemeris.h"
23#include "serdes_galileo_eph.h"
24#include "serdes_gps_eph.h"
25#include <boost/asio.hpp>
26#include <memory>
27#include <string>
28#include <vector>
29
30/** \addtogroup PVT
31 * \{ */
32/** \addtogroup PVT_libs
33 * \{ */
34
35
36#if USE_BOOST_ASIO_IO_CONTEXT
37using b_io_context = boost::asio::io_context;
38#else
39using b_io_context = boost::asio::io_service;
40#endif
41
42class Monitor_Ephemeris_Udp_Sink
43{
44public:
45 Monitor_Ephemeris_Udp_Sink(const std::vector<std::string>& addresses, const uint16_t& port, bool protobuf_enabled);
46 bool write_gps_ephemeris(const std::shared_ptr<Gps_Ephemeris>& monitor_gps_eph);
47 bool write_galileo_ephemeris(const std::shared_ptr<Galileo_Ephemeris>& monitor_gal_eph);
48
49private:
50 Serdes_Galileo_Eph serdes_gal;
51 Serdes_Gps_Eph serdes_gps;
52 b_io_context io_context;
53 boost::asio::ip::udp::socket socket;
54 std::vector<boost::asio::ip::udp::endpoint> endpoints;
55 boost::system::error_code error;
56 bool use_protobuf;
57};
58
59
60/** \} */
61/** \} */
62#endif // GNSS_SDR_MONITOR_EPHEMERIS_UDP_SINK_H
This class implements serialization and deserialization of Galileo_Ephemeris using Protocol Buffers.
This class implements serialization and deserialization of Gps_Ephemeris objects using Protocol Buffe...
Interface of a Galileo EPHEMERIS storage.
Interface of a GPS EPHEMERIS storage.
Serialization / Deserialization of Galileo_Ephemeris objects using Protocol Buffers.
Serialization / Deserialization of Gps_Ephemeris objects using Protocol Buffers.