GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
channel_msg_receiver_cc.h
Go to the documentation of this file.
1 /*!
2  * \file channel_msg_receiver_cc.h
3  * \brief GNU Radio block that receives asynchronous channel messages from acquisition and tracking blocks
4  * \author Javier Arribas, 2016. 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_MSG_RECEIVER_CC_H
21 #define GNSS_SDR_CHANNEL_MSG_RECEIVER_CC_H
22 
23 #include "channel_fsm.h"
24 #include <gnuradio/block.h>
25 #include <pmt/pmt.h>
26 #include <memory>
27 #if GNURADIO_USES_STD_POINTERS
28 #else
29 #include <boost/shared_ptr.hpp>
30 #endif
31 
33 
34 #if GNURADIO_USES_STD_POINTERS
35 using channel_msg_receiver_cc_sptr = std::shared_ptr<channel_msg_receiver_cc>;
36 #else
37 using channel_msg_receiver_cc_sptr = boost::shared_ptr<channel_msg_receiver_cc>;
38 #endif
39 
40 channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat);
41 
42 /*!
43  * \brief GNU Radio block that receives asynchronous channel messages from acquisition and tracking blocks
44  */
45 class channel_msg_receiver_cc : public gr::block
46 {
47 public:
48  ~channel_msg_receiver_cc() = default; //!< Default destructor
49 
50 private:
51  friend channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat);
52  channel_msg_receiver_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat);
53  void msg_handler_events(pmt::pmt_t msg);
54  std::shared_ptr<ChannelFsm> d_channel_fsm;
55  bool d_repeat; // todo: change FSM to include repeat value
56 };
57 
58 #endif // GNSS_SDR_CHANNEL_MSG_RECEIVER_CC_H
Interface of the State Machine for channel.
GNU Radio block that receives asynchronous channel messages from acquisition and tracking blocks...
~channel_msg_receiver_cc()=default
Default destructor.