GNU Radio's CDMA Package

pac_err_cal_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2016 <+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_CDMA_PAC_ERR_CAL_IMPL_H
22#define INCLUDED_CDMA_PAC_ERR_CAL_IMPL_H
23
24#include <cdma/pac_err_cal.h>
25#include <gnuradio/block.h>
26#include <gnuradio/thread/thread.h>
27#include <pmt/pmt.h>
28
29 namespace gr {
30 namespace cdma {
31
32 class pac_err_cal_impl : public pac_err_cal
33 {
34 private:
35 unsigned long d_winsize; // size of the block window
36 unsigned long d_cycsize; // size of a complete cycle, say 4096
37
38 unsigned long d_count_pktsent; // number of packets sent from the tx
39 unsigned long d_count_errs; // number of error packets in the current window
40 unsigned long d_curnum; // number of packets received in the current window
41 unsigned long d_prev; // the index of the last packet in service
42 float d_erate; // error rate result
43 std::string d_pkt_num_tag; // tag name for the packet index
44
45 void print(pmt::pmt_t msg);
46 void errCal(pmt::pmt_t msg);
47
48 public:
49 pac_err_cal_impl(unsigned long winsize, unsigned long cycsize, std::string pkt_num_tag);
50 ~pac_err_cal_impl();
51
52 void set_winsize(unsigned long winsize) {d_winsize = winsize;}
53 void set_cycsize(unsigned long cycsize) {d_cycsize = cycsize;}
54 void set_pkt_num_tag(std::string pkt_num_tag) {d_pkt_num_tag = pkt_num_tag;}
55 };
56
57 } // namespace cdma
58} // namespace gr
59
60#endif /* INCLUDED_CDMA_PAC_ERR_CAL_IMPL_H */
61
gr::cdma::pac_err_cal_impl
Definition: pac_err_cal_impl.h:33
gr::cdma::pac_err_cal_impl::~pac_err_cal_impl
~pac_err_cal_impl()
gr::cdma::pac_err_cal_impl::set_winsize
void set_winsize(unsigned long winsize)
Definition: pac_err_cal_impl.h:52
gr::cdma::pac_err_cal_impl::set_cycsize
void set_cycsize(unsigned long cycsize)
Definition: pac_err_cal_impl.h:53
gr::cdma::pac_err_cal_impl::pac_err_cal_impl
pac_err_cal_impl(unsigned long winsize, unsigned long cycsize, std::string pkt_num_tag)
gr::cdma::pac_err_cal_impl::set_pkt_num_tag
void set_pkt_num_tag(std::string pkt_num_tag)
Definition: pac_err_cal_impl.h:54
gr::cdma::pac_err_cal
<+description of block+>
Definition: pac_err_cal.h:37
gr
Definition: amp_var_est.h:30
pac_err_cal.h