add dummy burst tagger block
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
# Boston, MA 02110-1301, USA.
|
||||
|
||||
install(FILES
|
||||
ccs_burst_tagger.xml
|
||||
ccs_packet_dropper.xml
|
||||
ccs_wireshark_connector.xml
|
||||
DESTINATION share/gnuradio/grc/blocks
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<block>
|
||||
<name>Burst Tagger</name>
|
||||
<key>ccs_burst_tagger</key>
|
||||
<category>CCS</category>
|
||||
<import>import ccs</import>
|
||||
<make>ccs.burst_tagger($tag_name)</make>
|
||||
|
||||
<param>
|
||||
<name>Tag Name</name>
|
||||
<key>tag_name</key>
|
||||
<value>pmt.intern("burst_len")</value>
|
||||
<type>raw</type>
|
||||
</param>
|
||||
|
||||
<sink>
|
||||
<name>in</name>
|
||||
<type>complex</type>
|
||||
</sink>
|
||||
|
||||
<source>
|
||||
<name>out</name>
|
||||
<type>complex</type>
|
||||
</source>
|
||||
</block>
|
||||
@@ -22,6 +22,7 @@
|
||||
########################################################################
|
||||
install(FILES
|
||||
api.h
|
||||
burst_tagger.h
|
||||
packet_dropper.h
|
||||
wireshark_connector.h
|
||||
DESTINATION include/ccs
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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_H
|
||||
#define INCLUDED_CCS_BURST_TAGGER_H
|
||||
|
||||
#include <ccs/api.h>
|
||||
#include <gnuradio/sync_block.h>
|
||||
|
||||
namespace gr {
|
||||
namespace ccs {
|
||||
|
||||
class CCS_API burst_tagger : virtual public gr::sync_block {
|
||||
public:
|
||||
typedef boost::shared_ptr<burst_tagger> sptr;
|
||||
|
||||
static sptr make(pmt::pmt_t tag_name);
|
||||
};
|
||||
|
||||
} // namespace ccs
|
||||
} // namespace gr
|
||||
|
||||
#endif /* INCLUDED_CCS_BURST_TAGGER_H */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -6,13 +6,16 @@
|
||||
%include "ccs_swig_doc.i"
|
||||
|
||||
%{
|
||||
#include "ccs/burst_tagger.h"
|
||||
#include "ccs/packet_dropper.h"
|
||||
#include "ccs/wireshark_connector.h"
|
||||
%}
|
||||
|
||||
|
||||
%include "ccs/burst_tagger.h"
|
||||
%include "ccs/packet_dropper.h"
|
||||
%include "ccs/wireshark_connector.h"
|
||||
|
||||
GR_SWIG_BLOCK_MAGIC2(ccs, burst_tagger);
|
||||
GR_SWIG_BLOCK_MAGIC2(ccs, packet_dropper);
|
||||
GR_SWIG_BLOCK_MAGIC2(ccs, wireshark_connector);
|
||||
|
||||
Reference in New Issue
Block a user