Advertisement
qarlosalberto

delay_impl.h

Sep 23rd, 2014
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.69 KB | None | 0 0
  1. /* -*- c++ -*- */
  2. /*
  3.  * Copyright 2014 <+YOU OR YOUR COMPANY+>.
  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. #ifndef INCLUDED_HOWTO_DELAY_IMPL_H
  22. #define INCLUDED_HOWTO_DELAY_IMPL_H
  23.  
  24. #include <howto/delay.h>
  25. #include <gnuradio/thread/thread.h>
  26.  
  27. namespace gr {
  28.   namespace howto {
  29.  
  30.     class delay_impl : public delay
  31.     {
  32.     private:
  33.         void forecast(int noutput_items,
  34.         gr_vector_int &ninput_items_required);
  35.         size_t d_itemsize;
  36.         int d_delta;
  37.         int del;
  38.         gr::thread::mutex d_mutex_delay;
  39.     public:
  40.         delay_impl(size_t itemsize, int delay);
  41.         ~delay_impl();
  42.         int dly() const { return history()-1; }
  43.         void set_dly(int d);
  44.         void set_del(int d);
  45.         int get_del();
  46.         int general_work(int noutput_items,
  47.         gr_vector_int &ninput_items,
  48.         gr_vector_const_void_star &input_items,
  49.         gr_vector_void_star &output_items);
  50.     };
  51.   } // namespace howto
  52. } // namespace gr
  53.  
  54. #endif /* INCLUDED_HOWTO_DELAY_IMPL_H */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement