GNU Radio's CDMA Package

vector_insert2.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2013 Achilleas Anastasopoulos, Zhe Feng.
4 *
5 * This is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3, or (at your option)
8 * any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; see the file COPYING. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street,
18 * Boston, MA 02110-1301, USA.
19 */
20
21
22#ifndef INCLUDED_CDMA_VECTOR_INSERT2_H
23#define INCLUDED_CDMA_VECTOR_INSERT2_H
24
25#include <cdma/api.h>
26#include <gnuradio/block.h>
27
28 namespace gr {
29 namespace cdma {
30
31 /*!
32 * \brief Insert a specified (complex) vector periodically in the (complex) input stream
33 * \ingroup cdma
34 *
35 * \details
36 * For example, with data=(x,y), periodicity=3, and offset=1, the input and output streams will look like \n
37 * input: abcdefghijk... \n
38 * output: axybcdxyefgxyhijxyk...
39 *
40 */
41 class CDMA_API vector_insert2 : virtual public gr::block
42 {
43 public:
44 typedef boost::shared_ptr<vector_insert2> sptr;
45
46 /*!
47 * \brief Return a shared_ptr to a new instance of cdma::vector_insert2.
48 *
49 * To avoid accidental use of raw pointers, cdma::vector_insert2's
50 * constructor is in a private implementation
51 * class. cdma::vector_insert2::make is the public interface for
52 * creating new instances.
53 *
54 * \param data the vector to be inserted
55 * \param periodicity the period of the input stream.
56 * \param offset the offset within the input stream that the vector will be inserted. Takes values in {0,...,\p periodicity}
57 */
58 static sptr make(const std::vector< gr_complex > data, int periodicity, int offset);
59 };
60
61 } // namespace cdma
62} // namespace gr
63
64#endif /* INCLUDED_CDMA_VECTOR_INSERT2_H */
65
api.h
CDMA_API
#define CDMA_API
Definition: api.h:30
gr::cdma::vector_insert2
Insert a specified (complex) vector periodically in the (complex) input stream.
Definition: vector_insert2.h:42
gr::cdma::vector_insert2::make
static sptr make(const std::vector< gr_complex > data, int periodicity, int offset)
Return a shared_ptr to a new instance of cdma::vector_insert2.
gr::cdma::vector_insert2::sptr
boost::shared_ptr< vector_insert2 > sptr
Definition: vector_insert2.h:44
gr
Definition: amp_var_est.h:30