/*
* Copyright 2017 <+YOU OR YOUR COMPANY+>.
*
* 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gnuradio/io_signature.h>
#include "test_block_cf_impl.h"
#include <volk/volk.h>
namespace gr {
namespace ieee802_11 {
test_block_cf::sptr
test_block_cf::make(size_t vlen)
{
return gnuradio::get_initial_sptr
(new test_block_cf_impl(vlen));
}
/*
* The private constructor
*/
test_block_cf_impl::test_block_cf_impl(size_t vlen)
: gr::sync_block("test_block_cf",
gr::io_signature::make(1, 1, sizeof(gr_complex)*vlen),
gr::io_signature::make(1, 1, sizeof(float)))
{}
/*
* Our virtual destructor.
*/
test_block_cf_impl::~test_block_cf_impl()
{
}
int
test_block_cf_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];
float *out = (float *) output_items[0];
// Tell runtime system how many output items we produced.
return noutput_items;
}
} /* namespace ieee802-11 */
} /* namespace gr */
/* -*- c++ -*- */
/*
* Copyright 2017 <+YOU OR YOUR COMPANY+>.
*
* 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_IEEE802-11_TEST_BLOCK_CF_IMPL_H
#define INCLUDED_IEEE802-11_TEST_BLOCK_CF_IMPL_H
#include <ieee802-11/test_block_cf.h>
namespace gr {
namespace ieee802_11 {
class test_block_cf_impl : public test_block_cf
{
private:
size_t d_vlen;
public:
test_block_cf_impl(size_t vlen);
~test_block_cf_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 ieee802-11
} // namespace gr
#endif /* INCLUDED_IEEE802-11_TEST_BLOCK_CF_IMPL_H */
/* -*- c++ -*- */
/*
* Copyright 2017 <+YOU OR YOUR COMPANY+>.
*
* 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_IEEE802-11_TEST_BLOCK_CF_H
#define INCLUDED_IEEE802-11_TEST_BLOCK_CF_H
#include <ieee802-11/api.h>
#include <gnuradio/sync_block.h>
namespace gr {
namespace ieee802_11 {
/*!
* \brief <+description of block+>
* \ingroup ieee802-11
*
*/
class IEEE802_11_API test_block_cf : virtual public gr::sync_block
{
public:
typedef boost::shared_ptr<test_block_cf> sptr;
/*!
* \brief Return a shared_ptr to a new instance of ieee802-11::test_block_cf.
*
* To avoid accidental use of raw pointers, ieee802-11::test_block_cf's
* constructor is in a private implementation
* class. ieee802-11::test_block_cf::make is the public interface for
* creating new instances.
*/
static sptr make(size_t vlen);
};
} // namespace ieee802-11
} // namespace gr
#endif /* INCLUDED_IEEE802-11_TEST_BLOCK_CF_H */
No comments:
Post a Comment