[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 04/13: ctrlport: blocks: added controlport
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 04/13: ctrlport: blocks: added controlport support to multiply_const_XXX blocks. |
Date: |
Sat, 17 Oct 2015 17:26:54 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 9bf9b47dc713f76a5a105ed274aa74ecb0568baa
Author: Tom Rondeau <address@hidden>
Date: Sat Sep 26 20:05:09 2015 -0400
ctrlport: blocks: added controlport support to multiply_const_XXX blocks.
---
gr-blocks/lib/multiply_const_cc_impl.cc | 10 +++++-----
gr-blocks/lib/multiply_const_ff_impl.cc | 24 +++++++++++++++++++++++-
gr-blocks/lib/multiply_const_ff_impl.h | 2 ++
gr-blocks/lib/multiply_const_vcc_impl.cc | 30 +++++++++++++++++++++++++++++-
gr-blocks/lib/multiply_const_vcc_impl.h | 2 ++
gr-blocks/lib/multiply_const_vff_impl.cc | 26 +++++++++++++++++++++++++-
gr-blocks/lib/multiply_const_vff_impl.h | 2 ++
7 files changed, 88 insertions(+), 8 deletions(-)
diff --git a/gr-blocks/lib/multiply_const_cc_impl.cc
b/gr-blocks/lib/multiply_const_cc_impl.cc
index c082a1d..e7c5e3b 100644
--- a/gr-blocks/lib/multiply_const_cc_impl.cc
+++ b/gr-blocks/lib/multiply_const_cc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2009,2010,2012 Free Software Foundation, Inc.
+ * Copyright 2004,2009,2010,2012,2015 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -69,8 +69,8 @@ namespace gr {
rpcbasic_sptr(new rpcbasic_register_get<multiply_const_cc, gr_complex>(
alias(), "Constant",
&multiply_const_cc::k,
- pmt::from_complex(-1000.0f, 0.0f),
- pmt::from_complex(1000.0f, 0.0f),
+ pmt::from_complex(-1024.0f, 0.0f),
+ pmt::from_complex(1024.0f, 0.0f),
pmt::from_complex(0.0f, 0.0f),
"", "Constant to multiply", RPC_PRIVLVL_MIN,
DISPTIME | DISPOPTCPLX | DISPOPTSTRIP)));
@@ -79,8 +79,8 @@ namespace gr {
rpcbasic_sptr(new rpcbasic_register_set<multiply_const_cc, gr_complex>(
alias(), "Constant",
&multiply_const_cc::set_k,
- pmt::from_complex(-1000.0f, 0.0f),
- pmt::from_complex(1000.0f, 0.0f),
+ pmt::from_complex(-1024.0f, 0.0f),
+ pmt::from_complex(1024.0f, 0.0f),
pmt::from_complex(0.0f, 0.0f),
"", "Constant to multiply",
RPC_PRIVLVL_MIN, DISPNULL)));
diff --git a/gr-blocks/lib/multiply_const_ff_impl.cc
b/gr-blocks/lib/multiply_const_ff_impl.cc
index 366c061..c5d0ce1 100644
--- a/gr-blocks/lib/multiply_const_ff_impl.cc
+++ b/gr-blocks/lib/multiply_const_ff_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2009,2010,2012 Free Software Foundation, Inc.
+ * Copyright 2004,2009,2010,2012,2015 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -63,5 +63,27 @@ namespace gr {
return noutput_items;
}
+ void
+ multiply_const_ff_impl::setup_rpc()
+ {
+#ifdef GR_CTRLPORT
+ add_rpc_variable(
+ rpcbasic_sptr(new rpcbasic_register_get<multiply_const_ff, float>(
+ alias(), "coefficient",
+ &multiply_const_ff::k,
+ pmt::mp(-1024.0f), pmt::mp(1024.0f), pmt::mp(0.0f),
+ "", "Coefficient", RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP)));
+
+ add_rpc_variable(
+ rpcbasic_sptr(new rpcbasic_register_set<multiply_const_ff, float>(
+ alias(), "coefficient",
+ &multiply_const_ff::set_k,
+ pmt::mp(-1024.0f), pmt::mp(1024.0f), pmt::mp(0.0f),
+ "", "Coefficient",
+ RPC_PRIVLVL_MIN, DISPNULL)));
+#endif /* GR_CTRLPORT */
+ }
+
} /* namespace blocks */
} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_const_ff_impl.h
b/gr-blocks/lib/multiply_const_ff_impl.h
index 976d0a7..4eb1c19 100644
--- a/gr-blocks/lib/multiply_const_ff_impl.h
+++ b/gr-blocks/lib/multiply_const_ff_impl.h
@@ -38,6 +38,8 @@ namespace gr {
public:
multiply_const_ff_impl(float k, size_t vlen);
+ void setup_rpc();
+
float k() const { return d_k; }
void set_k(float k) { d_k = k; }
diff --git a/gr-blocks/lib/multiply_const_vcc_impl.cc
b/gr-blocks/lib/multiply_const_vcc_impl.cc
index 637f79e..b793ec7 100644
--- a/gr-blocks/lib/multiply_const_vcc_impl.cc
+++ b/gr-blocks/lib/multiply_const_vcc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2014 Free Software Foundation, Inc.
+ * Copyright 2014-2015 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -68,5 +68,33 @@ namespace gr {
return noutput_items;
}
+ void
+ multiply_const_vcc_impl::setup_rpc()
+ {
+#ifdef GR_CTRLPORT
+ add_rpc_variable(
+ rpcbasic_sptr(new rpcbasic_register_get<multiply_const_vcc,
+ std::vector<gr_complex> >(
+ alias(), "coefficient",
+ &multiply_const_vcc::k,
+ pmt::from_complex(-1024.0f),
+ pmt::from_complex(1024.0f),
+ pmt::from_complex(0.0f),
+ "", "Coefficient", RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP)));
+
+ add_rpc_variable(
+ rpcbasic_sptr(new rpcbasic_register_set<multiply_const_vcc,
+ std::vector<gr_complex> >(
+ alias(), "coefficient",
+ &multiply_const_vcc::set_k,
+ pmt::from_complex(-1024.0f),
+ pmt::from_complex(1024.0f),
+ pmt::from_complex(0.0f),
+ "", "Coefficient",
+ RPC_PRIVLVL_MIN, DISPNULL)));
+#endif /* GR_CTRLPORT */
+ }
+
} /* namespace blocks */
} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_const_vcc_impl.h
b/gr-blocks/lib/multiply_const_vcc_impl.h
index 18886ed..c3fc588 100644
--- a/gr-blocks/lib/multiply_const_vcc_impl.h
+++ b/gr-blocks/lib/multiply_const_vcc_impl.h
@@ -36,6 +36,8 @@ namespace gr {
public:
multiply_const_vcc_impl(std::vector<gr_complex> k);
+ void setup_rpc();
+
std::vector<gr_complex> k() const { return d_k; }
void set_k(std::vector<gr_complex> k) { d_k = k; }
diff --git a/gr-blocks/lib/multiply_const_vff_impl.cc
b/gr-blocks/lib/multiply_const_vff_impl.cc
index ab53ce3..6a4719e 100644
--- a/gr-blocks/lib/multiply_const_vff_impl.cc
+++ b/gr-blocks/lib/multiply_const_vff_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2014 Free Software Foundation, Inc.
+ * Copyright 2014-2015 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -68,5 +68,29 @@ namespace gr {
return noutput_items;
}
+ void
+ multiply_const_vff_impl::setup_rpc()
+ {
+#ifdef GR_CTRLPORT
+ add_rpc_variable(
+ rpcbasic_sptr(new rpcbasic_register_get<multiply_const_vff,
+ std::vector<float> >(
+ alias(), "coefficient",
+ &multiply_const_vff::k,
+ pmt::mp(-1024.0f), pmt::mp(1024.0f), pmt::mp(0.0f),
+ "", "Coefficient", RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP)));
+
+ add_rpc_variable(
+ rpcbasic_sptr(new rpcbasic_register_set<multiply_const_vff,
+ std::vector<float> >(
+ alias(), "coefficient",
+ &multiply_const_vff::set_k,
+ pmt::mp(-1024.0f), pmt::mp(1024.0f), pmt::mp(0.0f),
+ "", "Coefficient",
+ RPC_PRIVLVL_MIN, DISPNULL)));
+#endif /* GR_CTRLPORT */
+ }
+
} /* namespace blocks */
} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_const_vff_impl.h
b/gr-blocks/lib/multiply_const_vff_impl.h
index 4fda2a8..ca55566 100644
--- a/gr-blocks/lib/multiply_const_vff_impl.h
+++ b/gr-blocks/lib/multiply_const_vff_impl.h
@@ -36,6 +36,8 @@ namespace gr {
public:
multiply_const_vff_impl(std::vector<float> k);
+ void setup_rpc();
+
std::vector<float> k() const { return d_k; }
void set_k(std::vector<float> k) { d_k = k; }
- [Commit-gnuradio] [gnuradio] branch master updated (616fee5 -> 83da789), git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 12/13: Merge remote-tracking branch 'tom/ctrlport_extending0', git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 11/13: Merge remote-tracking branch 'gnuradio-wg-grc/master_grcwg', git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 08/13: uhd: open support for controlport in static builds., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 01/13: grc: added horizontal mouse wheel scrolling, git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 05/13: ctrlport: fixed copy-paste error for setting short data., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 09/13: uhd: Adds ControlPort support to USRP source block's command message port., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 03/13: freq_xlating_fir: added pmt::dict command handling, git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 02/13: grc: made flow graph python files the UTF-8 they always should have been, git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 13/13: Merge branch 'maint', git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 04/13: ctrlport: blocks: added controlport support to multiply_const_XXX blocks.,
git <=
- [Commit-gnuradio] [gnuradio] 06/13: ctrlport: blocks: added controlport support to add_const_XX blocks., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 10/13: ctrlport: adding new examples., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 07/13: ctrlport: provides a ControlPort model that connects directly with a block's message handler., git, 2015/10/17