Remove unnecessary block

This commit is contained in:
Manolis Surligas 2016-08-26 19:49:02 +03:00
parent 882acf9817
commit 6e3d8f9c10
8 changed files with 0 additions and 235 deletions

View File

@ -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

View File

@ -1,19 +0,0 @@
<?xml version="1.0"?>
<block>
<name>JSON to ECSS</name>
<key>satnogs_json_to_ecss_src</key>
<category>satnogs</category>
<import>import satnogs</import>
<make>satnogs.json_to_ecss_src()</make>
<sink>
<name>in</name>
<type>message</type>
</sink>
<source>
<name>out</name>
<type>message</type>
</source>
</block>

View File

@ -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

View File

@ -1,56 +0,0 @@
/* -*- c++ -*- */
/*
* gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
*
* Copyright (C) 2016, Libre Space Foundation <http://librespacefoundation.org/>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef INCLUDED_SATNOGS_JSON_TO_ECSS_SRC_H
#define INCLUDED_SATNOGS_JSON_TO_ECSS_SRC_H
#include <satnogs/api.h>
#include <gnuradio/sync_block.h>
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<json_to_ecss_src> 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 */

View File

@ -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

View File

@ -1,91 +0,0 @@
/* -*- c++ -*- */
/*
* gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
*
* Copyright (C) 2016, Libre Space Foundation <http://librespacefoundation.org/>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gnuradio/io_signature.h>
#include "json_to_ecss_src_impl.h"
#include <sstream>
#include <map>
#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 = "<<v.first << "Second = "<<v.second.data()<<std::endl ;
}
}
}
} /* namespace satnogs */
} /* namespace gr */

View File

@ -1,63 +0,0 @@
/* -*- c++ -*- */
/*
* gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
*
* Copyright (C) 2016, Libre Space Foundation <http://librespacefoundation.org/>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef INCLUDED_SATNOGS_JSON_TO_ECSS_SRC_IMPL_H
#define INCLUDED_SATNOGS_JSON_TO_ECSS_SRC_IMPL_H
#include <satnogs/json_to_ecss_src.h>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
using boost::property_tree::ptree;
using boost::property_tree::read_json;
namespace gr {
namespace satnogs {
class json_to_ecss_src_impl : public json_to_ecss_src
{
private:
// Nothing to declare in this block.
bool is_running;
pmt::pmt_t d_in_port;
pmt::pmt_t d_out_port;
uint8_t* d_buf;
void json_accepter();
public:
json_to_ecss_src_impl();
~json_to_ecss_src_impl();
// Where all the action really happens
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
};
} // namespace satnogs
} // namespace gr
#endif /* INCLUDED_SATNOGS_JSON_TO_ECSS_SRC_IMPL_H */

View File

@ -19,7 +19,6 @@
#include "satnogs/udp_msg_source.h"
#include "satnogs/debug_msg_source.h"
#include "satnogs/tcp_rigctl_msg_source.h"
#include "satnogs/json_to_ecss_src.h"
#include "satnogs/doppler_correction_cc.h"
#include "satnogs/frame_encoder.h"
#include "satnogs/upsat_fsk_frame_acquisition.h"
@ -55,8 +54,6 @@ GR_SWIG_BLOCK_MAGIC2(satnogs, udp_msg_source);
GR_SWIG_BLOCK_MAGIC2(satnogs, debug_msg_source);
%include "satnogs/tcp_rigctl_msg_source.h"
GR_SWIG_BLOCK_MAGIC2(satnogs, tcp_rigctl_msg_source);
%include "satnogs/json_to_ecss_src.h"
GR_SWIG_BLOCK_MAGIC2(satnogs, json_to_ecss_src);
%include "satnogs/frame_encoder.h"
GR_SWIG_BLOCK_MAGIC2(satnogs, frame_encoder);
%include "satnogs/doppler_correction_cc.h"