2016-04-18 12:17:09 +00:00
|
|
|
/*!
|
|
|
|
* \file channel_msg_receiver_cc.h
|
2016-04-25 18:34:27 +00:00
|
|
|
* \brief GNU Radio block that receives asynchronous channel messages from acquisition and tracking blocks
|
2016-04-18 12:17:09 +00:00
|
|
|
* \author Javier Arribas, 2016. jarribas(at)cttc.es
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*
|
2019-07-26 10:38:20 +00:00
|
|
|
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
2016-04-18 12:17:09 +00:00
|
|
|
*
|
|
|
|
* GNSS-SDR is a software defined Global Navigation
|
|
|
|
* Satellite Systems receiver
|
|
|
|
*
|
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
2020-02-08 00:20:02 +00:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2016-04-18 12:17:09 +00:00
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
2020-02-08 09:10:46 +00:00
|
|
|
#ifndef GNSS_SDR_CHANNEL_MSG_RECEIVER_CC_H
|
|
|
|
#define GNSS_SDR_CHANNEL_MSG_RECEIVER_CC_H
|
2016-04-18 12:17:09 +00:00
|
|
|
|
|
|
|
#include "channel_fsm.h"
|
2018-02-26 02:15:53 +00:00
|
|
|
#include <gnuradio/block.h>
|
2019-03-04 07:12:50 +00:00
|
|
|
#include <pmt/pmt.h>
|
|
|
|
#include <memory>
|
2020-04-02 21:59:35 +00:00
|
|
|
#if GNURADIO_USES_STD_POINTERS
|
|
|
|
#else
|
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
#endif
|
2016-04-18 12:17:09 +00:00
|
|
|
|
|
|
|
class channel_msg_receiver_cc;
|
|
|
|
|
2020-04-02 21:59:35 +00:00
|
|
|
#if GNURADIO_USES_STD_POINTERS
|
2020-04-02 11:23:20 +00:00
|
|
|
using channel_msg_receiver_cc_sptr = std::shared_ptr<channel_msg_receiver_cc>;
|
2020-04-02 21:59:35 +00:00
|
|
|
#else
|
|
|
|
using channel_msg_receiver_cc_sptr = boost::shared_ptr<channel_msg_receiver_cc>;
|
|
|
|
#endif
|
2016-04-18 12:17:09 +00:00
|
|
|
|
2018-01-08 11:03:32 +00:00
|
|
|
channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat);
|
2016-04-18 12:17:09 +00:00
|
|
|
|
|
|
|
/*!
|
2016-04-25 18:34:27 +00:00
|
|
|
* \brief GNU Radio block that receives asynchronous channel messages from acquisition and tracking blocks
|
2016-04-18 12:17:09 +00:00
|
|
|
*/
|
|
|
|
class channel_msg_receiver_cc : public gr::block
|
|
|
|
{
|
2019-07-01 21:44:42 +00:00
|
|
|
public:
|
2019-07-21 17:32:52 +00:00
|
|
|
~channel_msg_receiver_cc() = default; //!< Default destructor
|
2019-07-01 21:44:42 +00:00
|
|
|
|
2016-04-18 12:17:09 +00:00
|
|
|
private:
|
2019-07-02 15:48:00 +00:00
|
|
|
friend channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat);
|
|
|
|
channel_msg_receiver_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat);
|
2018-01-08 11:03:32 +00:00
|
|
|
std::shared_ptr<ChannelFsm> d_channel_fsm;
|
2018-03-03 01:03:39 +00:00
|
|
|
bool d_repeat; // todo: change FSM to include repeat value
|
2016-04-18 12:17:09 +00:00
|
|
|
void msg_handler_events(pmt::pmt_t msg);
|
|
|
|
};
|
|
|
|
|
2020-02-08 09:10:46 +00:00
|
|
|
#endif // GNSS_SDR_CHANNEL_MSG_RECEIVER_CC_H
|