add dummy burst tagger block
This commit is contained in:
@@ -26,6 +26,7 @@ include_directories(${Boost_INCLUDE_DIR})
|
||||
link_directories(${Boost_LIBRARY_DIRS})
|
||||
|
||||
list(APPEND ccs_sources
|
||||
burst_tagger_impl.cc
|
||||
packet_dropper_impl.cc
|
||||
wireshark_connector_impl.cc
|
||||
)
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2013 Bastian Bloessl<bloessl@ccs-labs.org>.
|
||||
*
|
||||
* This 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, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This software 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 software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "burst_tagger_impl.h"
|
||||
#include <gnuradio/io_signature.h>
|
||||
|
||||
namespace gr {
|
||||
namespace ccs {
|
||||
|
||||
burst_tagger_impl::burst_tagger_impl(pmt::pmt_t tag_name)
|
||||
: gr::sync_block("burst_tagger",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex))),
|
||||
d_tag_name(tag_name) {
|
||||
}
|
||||
|
||||
burst_tagger_impl::~burst_tagger_impl() {
|
||||
}
|
||||
|
||||
int
|
||||
burst_tagger_impl::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items) {
|
||||
|
||||
const gr_complex *in = (const gr_complex*)input_items[0];
|
||||
gr_complex *out = (gr_complex*)output_items[0];
|
||||
|
||||
return noutput_items;
|
||||
}
|
||||
|
||||
burst_tagger::sptr burst_tagger::make(pmt::pmt_t tag_name) {
|
||||
return gnuradio::get_initial_sptr(new burst_tagger_impl(tag_name));
|
||||
}
|
||||
|
||||
|
||||
} /* namespace ccs */
|
||||
} /* namespace gr */
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/* -*- c++ -*- */
|
||||
/*
|
||||
* Copyright 2013 Bastian Bloessl <bloessl@ccs-labs.org>.
|
||||
*
|
||||
* This 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, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This software 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 software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_CCS_BURST_TAGGER_IMPL_H
|
||||
#define INCLUDED_CCS_BURST_TAGGER_IMPL_H
|
||||
|
||||
#include <ccs/burst_tagger.h>
|
||||
|
||||
namespace gr {
|
||||
namespace ccs {
|
||||
|
||||
class burst_tagger_impl : public burst_tagger {
|
||||
private:
|
||||
pmt::pmt_t d_tag_name;
|
||||
|
||||
public:
|
||||
burst_tagger_impl(pmt::pmt_t tag_name);
|
||||
~burst_tagger_impl();
|
||||
|
||||
int work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items);
|
||||
};
|
||||
|
||||
} // namespace ccs
|
||||
} // namespace gr
|
||||
|
||||
#endif /* INCLUDED_CCS_BURST_TAGGER_IMPL_H */
|
||||
|
||||
Reference in New Issue
Block a user