howto_correlation_sink_c.h


※上記の広告は60日以上更新のないWIKIに表示されています。更新することで広告が下部へ移動します。

#ifndef INCLUDED_HOWTO_CORRELATION_SINK_C_H
#define INCLUDED_HOWTO_CORRELATION_SINK_C_H 

#include <gr_sync_decimator.h>

class howto_correlation_sink_c;
typedef boost::shared_ptr<howto_correlation_sink_c> howto_correlation_sink_c_sptr;

howto_correlation_sink_c_sptr
howto_make_correlation_sink_c (unsigned decimation, int vlen = 1);

/*!
 * \brief gr_complex sink that writes to a vector
 * \ingroup sink_blk
 */

class howto_correlation_sink_c : public gr_sync_decimator {
  friend howto_correlation_sink_c_sptr howto_make_correlation_sink_c (unsigned decimation, int vlen);
  std::vector<gr_complex>	d_data;
  int			d_vlen;
  howto_correlation_sink_c (unsigned decimation, int vlen);

 public:
  virtual int work (int noutput_items,
		    gr_vector_const_void_star &input_items,
		    gr_vector_void_star &output_items);

  void reset() {d_data.clear();}
  void clear() {reset(); }		// deprecated
  std::vector<gr_complex> data () const;
};

#endif