1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-09 03:20:01 +00:00

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

This commit is contained in:
Carles Fernandez 2018-03-23 14:30:58 +01:00
commit a2f4680080
2 changed files with 9 additions and 9 deletions

View File

@ -50,6 +50,7 @@
#include <thread> #include <thread>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <glog/logging.h>
/*! /*!
@ -641,7 +642,6 @@ private:
{ {
public: public:
Rtcm_Session(boost::asio::ip::tcp::socket socket, Rtcm_Listener_Room& room) : socket_(std::move(socket)), room_(room) {} Rtcm_Session(boost::asio::ip::tcp::socket socket, Rtcm_Listener_Room& room) : socket_(std::move(socket)), room_(room) {}
inline void start() inline void start()
{ {
room_.join(shared_from_this()); room_.join(shared_from_this());
@ -665,11 +665,11 @@ private:
boost::asio::async_read(socket_, boost::asio::async_read(socket_,
boost::asio::buffer(read_msg_.data(), Rtcm_Message::header_length), boost::asio::buffer(read_msg_.data(), Rtcm_Message::header_length),
[this, self](boost::system::error_code ec, std::size_t /*length*/) { [this, self](boost::system::error_code ec, std::size_t /*length*/) {
if (!ec && read_msg_.decode_header()) if (!ec and read_msg_.decode_header())
{ {
do_read_message_body(); do_read_message_body();
} }
else if (!ec && !read_msg_.decode_header()) else if (!ec and !read_msg_.decode_header())
{ {
client_says += read_msg_.data(); client_says += read_msg_.data();
bool first = true; bool first = true;
@ -687,7 +687,7 @@ private:
} }
else else
{ {
std::cout << "Closing connection with client from " << socket_.remote_endpoint().address() << std::endl; std::cout << "Closing connection with RTCM client" << std::endl;
room_.leave(shared_from_this()); room_.leave(shared_from_this());
} }
}); });
@ -709,7 +709,7 @@ private:
} }
else else
{ {
std::cout << "Closing connection with client from " << socket_.remote_endpoint().address() << std::endl; std::cout << "Closing connection with RTCM client" << std::endl;
room_.leave(shared_from_this()); room_.leave(shared_from_this());
} }
}); });
@ -719,8 +719,7 @@ private:
{ {
auto self(shared_from_this()); auto self(shared_from_this());
boost::asio::async_write(socket_, boost::asio::async_write(socket_,
boost::asio::buffer(write_msgs_.front().body(), boost::asio::buffer(write_msgs_.front().body(), write_msgs_.front().body_length()),
write_msgs_.front().body_length()),
[this, self](boost::system::error_code ec, std::size_t /*length*/) { [this, self](boost::system::error_code ec, std::size_t /*length*/) {
if (!ec) if (!ec)
{ {
@ -732,7 +731,7 @@ private:
} }
else else
{ {
std::cout << "Closing connection with client from " << socket_.remote_endpoint().address() << std::endl; std::cout << "Closing connection with RTCM client" << std::endl;
room_.leave(shared_from_this()); room_.leave(shared_from_this());
} }
}); });
@ -903,6 +902,7 @@ private:
{ {
std::cout << "Starting RTCM TCP server session..." << std::endl; std::cout << "Starting RTCM TCP server session..." << std::endl;
std::cout << "Serving client from " << socket_.remote_endpoint().address() << std::endl; std::cout << "Serving client from " << socket_.remote_endpoint().address() << std::endl;
LOG(INFO) << "Serving client from " << socket_.remote_endpoint().address();
} }
std::make_shared<Rtcm_Session>(std::move(socket_), room_)->start(); std::make_shared<Rtcm_Session>(std::move(socket_), room_)->start();
} }

View File

@ -199,7 +199,7 @@ TEST_F(GlonassL1CaPcpsAcquisitionTest, ValidationOfResults)
top_block = gr::make_top_block("Acquisition test"); top_block = gr::make_top_block("Acquisition test");
double expected_delay_samples = 31874; double expected_delay_samples = 31874;
double expected_doppler_hz = -8000; double expected_doppler_hz = -9500;
init(); init();
std::shared_ptr<GlonassL1CaPcpsAcquisition> acquisition = std::make_shared<GlonassL1CaPcpsAcquisition>(config.get(), "Acquisition_1G", 1, 1); std::shared_ptr<GlonassL1CaPcpsAcquisition> acquisition = std::make_shared<GlonassL1CaPcpsAcquisition>(config.get(), "Acquisition_1G", 1, 1);