2019-07-11 16:39:28 +00:00
|
|
|
/*!
|
2020-01-21 09:26:03 +00:00
|
|
|
* \file channel_status_msg_receiver.h
|
2019-07-11 16:39:28 +00:00
|
|
|
* \brief GNU Radio block that receives asynchronous channel messages from acquisition and tracking blocks
|
2019-07-21 10:55:59 +00:00
|
|
|
* \author Javier Arribas, 2019. jarribas(at)cttc.es
|
2019-07-11 16:39:28 +00:00
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2019-07-11 16:39:28 +00:00
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
|
2019-07-11 16:39:28 +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
|
2019-07-11 16:39:28 +00:00
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2019-07-11 16:39:28 +00:00
|
|
|
*/
|
|
|
|
|
2020-02-08 09:10:46 +00:00
|
|
|
#ifndef GNSS_SDR_CHANNEL_STATUS_MSG_RECEIVER_CC_H
|
|
|
|
#define GNSS_SDR_CHANNEL_STATUS_MSG_RECEIVER_CC_H
|
2019-07-11 16:39:28 +00:00
|
|
|
|
|
|
|
#include "gnss_synchro.h"
|
|
|
|
#include "monitor_pvt.h"
|
|
|
|
#include <gnuradio/block.h>
|
|
|
|
#include <pmt/pmt.h>
|
2019-08-17 11:56:54 +00:00
|
|
|
#include <map>
|
2019-07-11 16:39:28 +00:00
|
|
|
#include <memory>
|
2020-04-02 21:59:35 +00:00
|
|
|
#if GNURADIO_USES_STD_POINTERS
|
|
|
|
#else
|
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
#endif
|
2019-07-11 16:39:28 +00:00
|
|
|
|
|
|
|
class channel_status_msg_receiver;
|
|
|
|
|
2020-04-02 21:59:35 +00:00
|
|
|
#if GNURADIO_USES_STD_POINTERS
|
2020-04-02 11:23:20 +00:00
|
|
|
using channel_status_msg_receiver_sptr = std::shared_ptr<channel_status_msg_receiver>;
|
2020-04-02 21:59:35 +00:00
|
|
|
#else
|
|
|
|
using channel_status_msg_receiver_sptr = boost::shared_ptr<channel_status_msg_receiver>;
|
|
|
|
#endif
|
2019-07-11 16:39:28 +00:00
|
|
|
|
|
|
|
channel_status_msg_receiver_sptr channel_status_msg_receiver_make();
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief GNU Radio block that receives asynchronous channel messages from tlm blocks
|
|
|
|
*/
|
|
|
|
class channel_status_msg_receiver : public gr::block
|
|
|
|
{
|
|
|
|
public:
|
2019-07-21 17:32:52 +00:00
|
|
|
~channel_status_msg_receiver() = default; //!< Default destructor
|
2019-07-21 10:55:59 +00:00
|
|
|
|
2019-07-11 16:39:28 +00:00
|
|
|
/*!
|
|
|
|
* \brief return the current status map of all channels with valid telemetry
|
|
|
|
*/
|
|
|
|
std::map<int, std::shared_ptr<Gnss_Synchro>> get_current_status_map();
|
2019-07-21 10:55:59 +00:00
|
|
|
|
2019-07-11 16:39:28 +00:00
|
|
|
/*!
|
|
|
|
* \brief return the current receiver PVT
|
|
|
|
*/
|
|
|
|
Monitor_Pvt get_current_status_pvt();
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend channel_status_msg_receiver_sptr channel_status_msg_receiver_make();
|
|
|
|
channel_status_msg_receiver();
|
2019-07-20 09:39:08 +00:00
|
|
|
void msg_handler_events(const pmt::pmt_t& msg);
|
2020-06-27 07:25:04 +00:00
|
|
|
Monitor_Pvt d_pvt_status{};
|
|
|
|
std::map<int, std::shared_ptr<Gnss_Synchro>> d_channel_status_map;
|
2019-07-11 16:39:28 +00:00
|
|
|
};
|
|
|
|
|
2020-02-08 09:10:46 +00:00
|
|
|
#endif // GNSS_SDR_CHANNEL_STATUS_MSG_RECEIVER_CC_H
|