GNU Radio's TEST Package
fix_cc.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2013 Sylvain Munaut <tnt@246tNt.com>
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
22#ifndef INCLUDED_IQBALANCE_FIX_CC_H
23#define INCLUDED_IQBALANCE_FIX_CC_H
24
26#include <gnuradio/sync_block.h>
27
28namespace gr {
29 namespace iqbalance {
30
31 class IQBALANCE_API fix_cc : public gr::sync_block
32 {
33 private:
34 fix_cc(float mag, float phase);
35
36 float d_mag, d_phase;
37
38 public:
39 typedef boost::shared_ptr<fix_cc> sptr;
40
41 static sptr make(float mag=0.0f, float phase=0.0f);
42
44
45 void set_mag(float mag) { this->d_mag = mag; }
46 void set_phase(float phase) { this->d_phase = phase; }
47
48 float mag() const { return this->d_mag; }
49 float phase() const { return this->d_phase; }
50
51 void apply_new_corrections (pmt::pmt_t msg);
52
53 int work (int noutput_items,
54 gr_vector_const_void_star &input_items,
55 gr_vector_void_star &output_items);
56 };
57
58 } // namespace iqbalance
59} // namespace gr
60
61#endif /* INCLUDED_IQBALANCE_FIX_CC_H */
62
#define IQBALANCE_API
Definition: api.h:30
Definition: fix_cc.h:32
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
float phase() const
Definition: fix_cc.h:49
void apply_new_corrections(pmt::pmt_t msg)
float mag() const
Definition: fix_cc.h:48
static sptr make(float mag=0.0f, float phase=0.0f)
boost::shared_ptr< fix_cc > sptr
Definition: fix_cc.h:39
void set_phase(float phase)
Definition: fix_cc.h:46
void set_mag(float mag)
Definition: fix_cc.h:45
Definition: fix_cc.h:28