gnuradio模块分类

sync_XXX

很简单,输入输出比固定,不需要做consume和produce。可以调用set_history(TAPS_LEN);  来输入历史数据,类似fir。

source:1 2 3 4 5 6 7 8 9 10

noutput=5

则第一次输入:12345

set_history(2)

则得二次输入为

56789

第三次输入为

678910


若set_history(1)//默认值

则第二次输入为

6 7 8 9 10




#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <gnuradio/io_signature.h>
#include "bin2dec_bb_impl.h"

namespace gr {
    namespace dab {

        bin2dec_bb::sptr
        bin2dec_bb::make(uint32_t k)
        {
            return gnuradio::get_initial_sptr
                (new bin2dec_bb_impl(k));
        }

        /*
         * The private constructor
         */
        bin2dec_bb_impl::bin2dec_bb_impl(uint32_t k)
            : gr::sync_decimator("bin2dec_bb",
                    gr::io_signature::make(1, 1, sizeof(uint8_t)),
                    gr::io_signature::make(1, 1, sizeof(uint8_t)), k),
            d_k(k)
        {
            if (d_k == 0) {
                throw std::out_of_range("interpolation must be > 0");
            }
        }

        /*
         * Our virtual destructor.
         */
        bin2dec_bb_impl::~bin2dec_bb_impl()
        {
        }

        int
        bin2dec_bb_impl::work(int noutput_items,
     
  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值