From 6e3d8f9c1062f8858272590046d89895ad8387c1 Mon Sep 17 00:00:00 2001 From: Manolis Surligas Date: Fri, 26 Aug 2016 19:49:02 +0300 Subject: [PATCH] Remove unnecessary block --- grc/CMakeLists.txt | 1 - grc/satnogs_json_to_ecss_src.xml | 19 ------- include/satnogs/CMakeLists.txt | 1 - include/satnogs/json_to_ecss_src.h | 56 ------------------ lib/CMakeLists.txt | 1 - lib/json_to_ecss_src_impl.cc | 91 ------------------------------ lib/json_to_ecss_src_impl.h | 63 --------------------- swig/satnogs_swig.i | 3 - 8 files changed, 235 deletions(-) delete mode 100644 grc/satnogs_json_to_ecss_src.xml delete mode 100644 include/satnogs/json_to_ecss_src.h delete mode 100644 lib/json_to_ecss_src_impl.cc delete mode 100644 lib/json_to_ecss_src_impl.h diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt index 4546851..a625f6f 100644 --- a/grc/CMakeLists.txt +++ b/grc/CMakeLists.txt @@ -25,7 +25,6 @@ install(FILES satnogs_sine_matched_filter_ff.xml satnogs_udp_msg_source.xml satnogs_debug_msg_source.xml - satnogs_json_to_ecss_src.xml satnogs_tcp_rigctl_msg_source.xml satnogs_frame_encoder.xml satnogs_doppler_correction_cc.xml diff --git a/grc/satnogs_json_to_ecss_src.xml b/grc/satnogs_json_to_ecss_src.xml deleted file mode 100644 index 3a3e716..0000000 --- a/grc/satnogs_json_to_ecss_src.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - JSON to ECSS - satnogs_json_to_ecss_src - satnogs - import satnogs - satnogs.json_to_ecss_src() - - - - in - message - - - - out - message - - diff --git a/include/satnogs/CMakeLists.txt b/include/satnogs/CMakeLists.txt index c31ecee..e874d38 100644 --- a/include/satnogs/CMakeLists.txt +++ b/include/satnogs/CMakeLists.txt @@ -36,7 +36,6 @@ install(FILES utils.h udp_msg_source.h debug_msg_source.h - json_to_ecss_src.h tcp_rigctl_msg_source.h frame_encoder.h doppler_correction_cc.h diff --git a/include/satnogs/json_to_ecss_src.h b/include/satnogs/json_to_ecss_src.h deleted file mode 100644 index 2883b6e..0000000 --- a/include/satnogs/json_to_ecss_src.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module - * - * Copyright (C) 2016, Libre Space Foundation - * - * This program 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef INCLUDED_SATNOGS_JSON_TO_ECSS_SRC_H -#define INCLUDED_SATNOGS_JSON_TO_ECSS_SRC_H - -#include -#include - -namespace gr { - namespace satnogs { - - /*! - * \brief <+description of block+> - * \ingroup satnogs - * - */ - class SATNOGS_API json_to_ecss_src : virtual public gr::block - { - public: - typedef boost::shared_ptr sptr; - - /*! - * \brief Return a shared_ptr to a new instance of satnogs::json_to_ecss_src. - * - * To avoid accidental use of raw pointers, satnogs::json_to_ecss_src's - * constructor is in a private implementation - * class. satnogs::json_to_ecss_src::make is the public interface for - * creating new instances. - */ - static sptr make(); - - }; - - } // namespace satnogs -} // namespace gr - -#endif /* INCLUDED_SATNOGS_JSON_TO_ECSS_SRC_H */ - diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 1a8d27d..64245da 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -35,7 +35,6 @@ list(APPEND satnogs_sources udp_msg_source_impl.cc debug_msg_source_impl.cc tcp_rigctl_msg_source_impl.cc - json_to_ecss_src_impl.cc doppler_correction_cc_impl.cc frame_encoder_impl.cc doppler_fit.cc diff --git a/lib/json_to_ecss_src_impl.cc b/lib/json_to_ecss_src_impl.cc deleted file mode 100644 index 81f398a..0000000 --- a/lib/json_to_ecss_src_impl.cc +++ /dev/null @@ -1,91 +0,0 @@ -/* -*- c++ -*- */ -/* - * gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module - * - * Copyright (C) 2016, Libre Space Foundation - * - * This program 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include "json_to_ecss_src_impl.h" - -#include -#include - -#define BUFFER_SIZE 2048 - - -namespace gr { - namespace satnogs { - - json_to_ecss_src::sptr - json_to_ecss_src::make() - { - return gnuradio::get_initial_sptr - (new json_to_ecss_src_impl()); - } - - /* - * The private constructor - */ - json_to_ecss_src_impl::json_to_ecss_src_impl() - : gr::block("json_to_ecss_src", - gr::io_signature::make (0, 0, 0), - gr::io_signature::make (0, 0, 0)), - is_running(true), - d_in_port(pmt::mp("in")), - d_out_port(pmt::mp("out")) - { - message_port_register_out(d_out_port); - message_port_register_in(d_in_port); - - d_buf = (uint8_t*)malloc(BUFFER_SIZE * sizeof(uint8_t)); - - new boost::thread ( - boost::bind (&json_to_ecss_src_impl::json_accepter, this)); - } - - /* - * Our virtual destructor. - */ - json_to_ecss_src_impl::~json_to_ecss_src_impl() - { - is_running = false; - } - void - json_to_ecss_src_impl::json_accepter(){ - pmt::pmt_t message; - size_t length; - - while(is_running){ - message = delete_head_blocking(d_in_port); - length = blob_length(message); - d_buf = (uint8_t*)blob_data(message); - std::istringstream ss(std::string(d_buf, d_buf + length)); - ptree tree; - read_json(ss,tree); - BOOST_FOREACH(const ptree::value_type &v, tree) { - std::cout<<"First = "<