GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
acquisition_msg_rx.h
Go to the documentation of this file.
1 /*!
2  * \file acquisition_msg_rx.h
3  * \brief This is a helper class to catch the asynchronous messages
4  * emitted by an acquisition block.
5  * \author Carles Fernandez-Prades, 2018. cfernandez(at)cttc.cat
6  *
7  *
8  * -----------------------------------------------------------------------------
9  *
10  * Copyright (C) 2012-2020 (see AUTHORS file for a list of contributors)
11  *
12  * GNSS-SDR is a software defined Global Navigation
13  * Satellite Systems receiver
14  *
15  * This file is part of GNSS-SDR.
16  *
17  * SPDX-License-Identifier: GPL-3.0-or-later
18  *
19  * -----------------------------------------------------------------------------
20  */
21 
22 #ifndef GNSS_SDR_ACQUISITION_MSG_RX_H
23 #define GNSS_SDR_ACQUISITION_MSG_RX_H
24 
25 #include <gnuradio/block.h>
26 #include <gnuradio/top_block.h>
27 #include <pmt/pmt.h>
28 
29 #if GNURADIO_USES_STD_POINTERS
30 #include <memory>
31 #else
32 #include <boost/shared_ptr.hpp>
33 #endif
34 
35 // ######## GNURADIO ACQUISITION BLOCK MESSAGE RECEVER #########
36 class Acquisition_msg_rx;
37 
38 #if GNURADIO_USES_STD_POINTERS
39 using Acquisition_msg_rx_sptr = std::shared_ptr<Acquisition_msg_rx>;
40 #else
41 using Acquisition_msg_rx_sptr = boost::shared_ptr<Acquisition_msg_rx>;
42 #endif
43 
44 Acquisition_msg_rx_sptr Acquisition_msg_rx_make();
45 
46 
47 class Acquisition_msg_rx : public gr::block
48 {
49 private:
50  friend Acquisition_msg_rx_sptr Acquisition_msg_rx_make();
51  void msg_handler_events(const pmt::pmt_t& msg);
53 
54 public:
55  int rx_message;
56  gr::top_block_sptr top_block;
57  ~Acquisition_msg_rx(); //!< Default destructor
58 };
59 
60 
61 #endif // GNSS_SDR_ACQUISITION_MSG_RX_H
~Acquisition_msg_rx()
Default destructor.