/* -*- c++ -*- */ /* * Copyright 2014 <+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 #include "reloj_ff_impl.h" namespace gr { namespace howto { reloj_ff::sptr reloj_ff::make(int tasa, int precision) { return gnuradio::get_initial_sptr (new reloj_ff_impl(tasa, precision)); } /* * The private constructor */ reloj_ff_impl::reloj_ff_impl(int tasa, int precision) : gr::block("reloj_ff", gr::io_signature::make(1,1,sizeof(float)), gr::io_signature::make(1,1, sizeof(float))) { inicios=precision; reloj_pc_anteriors=0; reloj_pc_anteriorm=0; count=0; } /* * Our virtual destructor. */ reloj_ff_impl::~reloj_ff_impl() { } void reloj_ff_impl::forecast (int noutput_items, gr_vector_int &ninput_items_required) { ninput_items_required[0] = noutput_items; } int reloj_ff_impl::general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { float *outseconds = (float*)output_items[0]; for(int i=0;i