1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-11-18 16:15:21 +00:00

Merge remote-tracking branch 'origin/modern_factory' into next

Conflicts:
	src/core/receiver/control_thread.h
This commit is contained in:
Carles Fernandez
2014-04-26 19:12:19 +02:00
18 changed files with 666 additions and 947 deletions

View File

@@ -1,11 +1,11 @@
/*!
* \file control_thread.h
* \file control_thread.h
* \brief Interface of the receiver control plane
* \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
*
* GNSS Receiver Control Plane: connects the flowgraph, starts running it,
* and while it does not stop, reads the control messages generated by the blocks,
* process them, and apply the corresponding actions.
* processes them, and applies the corresponding actions.
*
* -------------------------------------------------------------------------
*
@@ -19,7 +19,7 @@
* GNSS-SDR is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
* (at your option) any later version.
*
* GNSS-SDR is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -35,6 +35,7 @@
#ifndef GNSS_SDR_CONTROL_THREAD_H_
#define GNSS_SDR_CONTROL_THREAD_H_
#include <memory>
#include <vector>
#include <boost/thread/thread.hpp>
#include <gnuradio/msg_queue.h>
@@ -46,7 +47,10 @@ class ConfigurationInterface;
/*!
* \brief This class represents the main thread of the application, aka Control Thread.
* \brief This class represents the main thread of the application, so the name is ControlThread.
* This is the GNSS Receiver Control Plane: it connects the flowgraph, starts running it,
* and while it does not stop, reads the control messages generated by the blocks,
* processes them, and applies the corresponding actions.
*/
class ControlThread
{
@@ -101,14 +105,13 @@ public:
/*!
* \brief Instantiates a flowgraph
*
* \return Returns a flowgraph object
* \return Returns a smart pointer to a flowgraph object
*/
GNSSFlowgraph* flowgraph()
std::shared_ptr<GNSSFlowgraph> flowgraph()
{
return flowgraph_.get();
return flowgraph_;
}
private:
//SUPL assistance classes
gnss_sdr_supl_client supl_client_acquisition_;
@@ -128,15 +131,17 @@ private:
void process_control_messages();
/*
* \brief Blocking function that reads the GPS ephemeris queue and updates the shared ephemeris map, accessible from the PVT block
* Blocking function that reads the GPS ephemeris queue and updates the shared ephemeris map, accessible from the PVT block
*/
void gps_ephemeris_data_collector();
/*
* \brief Writes the ephemeris map to a local XML file
* Writes the ephemeris map to a local XML file
*/
void gps_ephemeris_data_write_to_XML();
/*
* \brief Blocking function that reads the UTC model queue and updates the shared map, accessible from the PVT block
* Blocking function that reads the UTC model queue and updates the shared map, accessible from the PVT block
*/
void gps_utc_model_data_collector();
@@ -151,7 +156,7 @@ private:
void gps_ref_time_data_collector();
/*
* \brief Write the latest GPS UTC model to XML file
* Write the latest GPS UTC model to XML file
*/
void gps_utc_model_data_write_to_XML();
@@ -166,43 +171,47 @@ private:
void gps_ref_time_data_write_to_XML();
/*
* \brief Blocking function that reads the iono model queue and updates the shared map, accessible from the PVT block
* Blocking function that reads the iono model queue and updates the shared map, accessible from the PVT block
*/
void gps_iono_data_collector();
/*
* \brief Write the latest GPS IONO model to XML file
* Write the latest GPS IONO model to XML file
*/
void gps_iono_data_write_to_XML();
/*
* \brief Blocking function that reads the GPS assistance queue
* Blocking function that reads the GPS assistance queue
*/
void gps_acq_assist_data_collector();
/*
* \brief Blocking function that reads the Galileo ephemeris queue and updates the shared ephemeris map, accessible from the PVT block
* Blocking function that reads the Galileo ephemeris queue and updates the shared ephemeris map, accessible from the PVT block
*/
void galileo_ephemeris_data_collector();
/*
* \brief Blocking function that reads the UTC model queue and updates the shared map, accessible from the PVT block
*/
* Blocking function that reads the UTC model queue and updates the shared map, accessible from the PVT block
*/
void galileo_utc_model_data_collector();
/*
* Blocking function that reads the iono data queue and updates the shared map, accessible from the PVT block
*/
void galileo_iono_data_collector();
void apply_action(unsigned int what);
std::shared_ptr<GNSSFlowgraph> flowgraph_;
std::shared_ptr<ConfigurationInterface> configuration_;
boost::shared_ptr<gr::msg_queue> control_queue_;
std::shared_ptr<ControlMessageFactory> control_message_factory_;
std::vector<ControlMessage*> *control_messages_;
std::shared_ptr<std::vector<std::shared_ptr<ControlMessage>>> control_messages_;
bool stop_;
bool delete_configuration_;
unsigned int processed_control_messages_;
unsigned int applied_actions_;
boost::thread keyboard_thread_;
boost::thread gps_ephemeris_data_collector_thread_;
boost::thread gps_iono_data_collector_thread_;
boost::thread gps_utc_model_data_collector_thread_;