GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
channel_status_msg_receiver.h
Go to the documentation of this file.
1 /*!
2  * \file channel_status_msg_receiver.h
3  * \brief GNU Radio block that receives asynchronous channel messages from acquisition and tracking blocks
4  * \author Javier Arribas, 2019. jarribas(at)cttc.es
5  *
6  * -----------------------------------------------------------------------------
7  *
8  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
9  *
10  * GNSS-SDR is a software defined Global Navigation
11  * Satellite Systems receiver
12  *
13  * This file is part of GNSS-SDR.
14  *
15  * SPDX-License-Identifier: GPL-3.0-or-later
16  *
17  * -----------------------------------------------------------------------------
18  */
19 
20 #ifndef GNSS_SDR_CHANNEL_STATUS_MSG_RECEIVER_CC_H
21 #define GNSS_SDR_CHANNEL_STATUS_MSG_RECEIVER_CC_H
22 
23 #include "gnss_synchro.h"
24 #include "monitor_pvt.h"
25 #include <gnuradio/block.h>
26 #include <pmt/pmt.h>
27 #include <map>
28 #include <memory>
29 #if GNURADIO_USES_STD_POINTERS
30 #else
31 #include <boost/shared_ptr.hpp>
32 #endif
33 
35 
36 #if GNURADIO_USES_STD_POINTERS
37 using channel_status_msg_receiver_sptr = std::shared_ptr<channel_status_msg_receiver>;
38 #else
39 using channel_status_msg_receiver_sptr = boost::shared_ptr<channel_status_msg_receiver>;
40 #endif
41 
42 channel_status_msg_receiver_sptr channel_status_msg_receiver_make();
43 
44 /*!
45  * \brief GNU Radio block that receives asynchronous channel messages from tlm blocks
46  */
47 class channel_status_msg_receiver : public gr::block
48 {
49 public:
50  ~channel_status_msg_receiver() = default; //!< Default destructor
51 
52  /*!
53  * \brief return the current status map of all channels with valid telemetry
54  */
55  std::map<int, std::shared_ptr<Gnss_Synchro>> get_current_status_map();
56 
57  /*!
58  * \brief return the current receiver PVT
59  */
61 
62 private:
63  friend channel_status_msg_receiver_sptr channel_status_msg_receiver_make();
65  void msg_handler_events(const pmt::pmt_t& msg);
66  Monitor_Pvt d_pvt_status{};
67  std::map<int, std::shared_ptr<Gnss_Synchro>> d_channel_status_map;
68 };
69 
70 #endif // GNSS_SDR_CHANNEL_STATUS_MSG_RECEIVER_CC_H
GNU Radio block that receives asynchronous channel messages from tlm blocks.
std::map< int, std::shared_ptr< Gnss_Synchro > > get_current_status_map()
return the current status map of all channels with valid telemetry
Monitor_Pvt get_current_status_pvt()
return the current receiver PVT
This class contains parameters and outputs of the PVT block.
Definition: monitor_pvt.h:29
~channel_status_msg_receiver()=default
Default destructor.
Interface of the Monitor_Pvt class.
Interface of the Gnss_Synchro class.