1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-07-02 09:53:15 +00:00

Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next

This commit is contained in:
Carles Fernandez 2018-10-21 19:31:09 +02:00
commit 59305c4b2c
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
3 changed files with 19 additions and 2 deletions

View File

@ -24,6 +24,7 @@ set(GNSS_RECEIVER_SOURCES
gnss_block_factory.cc
gnss_flowgraph.cc
in_memory_configuration.cc
tcp_cmd_interface.cc
)
set(GNSS_RECEIVER_HEADERS

View File

@ -100,6 +100,12 @@ ControlThread::~ControlThread()
}
void ControlThread::telecommand_listener()
{
int tcp_cmd_port = configuration_->property("Channel.telecontrol_tcp_port", 3333);
cmd_interface_.run_cmd_server(tcp_cmd_port);
}
/*
* Runs the control thread that manages the receiver control plane
*
@ -148,8 +154,11 @@ void ControlThread::run()
keyboard_thread_ = boost::thread(&ControlThread::keyboard_listener, this);
sysv_queue_thread_ = boost::thread(&ControlThread::sysv_queue_listener, this);
bool enable_FPGA = configuration_->property("Channel.enable_FPGA", false);
//start the telecommand listener thread
cmd_interface_thread_ = boost::thread(&ControlThread::telecommand_listener, this);
bool enable_FPGA = configuration_->property("Channel.enable_FPGA", false);
if (enable_FPGA == true)
{
flowgraph_->start_acquisition_helper();
@ -167,14 +176,16 @@ void ControlThread::run()
stop_ = true;
flowgraph_->disconnect();
//Join keyboard thread
//Join keyboard thread
#ifdef OLD_BOOST
keyboard_thread_.timed_join(boost::posix_time::seconds(1));
sysv_queue_thread_.timed_join(boost::posix_time::seconds(1));
cmd_interface_thread_.timed_join(boost::posix_time::seconds(1));
#endif
#ifndef OLD_BOOST
keyboard_thread_.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(1000));
sysv_queue_thread_.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(1000));
cmd_interface_thread_.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(1000));
#endif
LOG(INFO) << "Flowgraph stopped";

View File

@ -37,6 +37,7 @@
#include "control_message_factory.h"
#include "gnss_sdr_supl_client.h"
#include "tcp_cmd_interface.h"
#include <boost/thread.hpp>
#include <gnuradio/msg_queue.h>
#include <memory>
@ -113,6 +114,10 @@ public:
}
private:
//Telecommand TCP interface
TcpCmdInterface cmd_interface_;
void telecommand_listener();
boost::thread cmd_interface_thread_;
//SUPL assistance classes
gnss_sdr_supl_client supl_client_acquisition_;
gnss_sdr_supl_client supl_client_ephemeris_;