[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 03/23: digital: expose set_constellation me
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 03/23: digital: expose set_constellation message port in GRC for constellation_receiver. |
Date: |
Thu, 26 Jun 2014 19:54:43 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit 9289583ea51b278d3b27ce5aab6384798ac3e02d
Author: Tom Rondeau <address@hidden>
Date: Tue Jun 24 18:35:48 2014 -0400
digital: expose set_constellation message port in GRC for
constellation_receiver.
Also cleans up white spaces.
---
.../grc/digital_constellation_receiver_cb.xml | 7 ++++++
gr-digital/lib/constellation_receiver_cb_impl.cc | 25 +++++++++++-----------
gr-digital/lib/constellation_receiver_cb_impl.h | 6 +++---
3 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/gr-digital/grc/digital_constellation_receiver_cb.xml
b/gr-digital/grc/digital_constellation_receiver_cb.xml
index ffda8b8..e6a1461 100644
--- a/gr-digital/grc/digital_constellation_receiver_cb.xml
+++ b/gr-digital/grc/digital_constellation_receiver_cb.xml
@@ -33,6 +33,13 @@
<name>in</name>
<type>complex</type>
</sink>
+
+ <sink>
+ <name>set_constellation</name>
+ <type>message</type>
+ <optional>1</optional>
+ </sink>
+
<source>
<name>out</name>
<type>byte</type>
diff --git a/gr-digital/lib/constellation_receiver_cb_impl.cc
b/gr-digital/lib/constellation_receiver_cb_impl.cc
index 927df2c..c4fe1e0 100644
--- a/gr-digital/lib/constellation_receiver_cb_impl.cc
+++ b/gr-digital/lib/constellation_receiver_cb_impl.cc
@@ -38,7 +38,7 @@ namespace gr {
#define VERBOSE_MM 0 // Used for debugging symbol timing loop
#define VERBOSE_COSTAS 0 // Used for debugging phase and frequency tracking
- constellation_receiver_cb::sptr
+ constellation_receiver_cb::sptr
constellation_receiver_cb::make(constellation_sptr constell,
float loop_bw, float fmin, float fmax)
{
@@ -49,7 +49,7 @@ namespace gr {
static int ios[] = {sizeof(char), sizeof(float), sizeof(float),
sizeof(float), sizeof(gr_complex)};
static std::vector<int> iosig(ios, ios+sizeof(ios)/sizeof(int));
-
constellation_receiver_cb_impl::constellation_receiver_cb_impl(constellation_sptr
constellation,
+
constellation_receiver_cb_impl::constellation_receiver_cb_impl(constellation_sptr
constellation,
float
loop_bw, float fmin, float fmax)
: block("constellation_receiver_cb",
io_signature::make(1, 1, sizeof(gr_complex)),
@@ -77,10 +77,10 @@ namespace gr {
advance_loop(phase_error);
phase_wrap();
frequency_limit();
-
+
#if VERBOSE_COSTAS
printf("cl: phase_error: %f phase: %f freq: %f sample: %f+j%f
constellation: %f+j%f\n",
- phase_error, d_phase, d_freq, sample.real(), sample.imag(),
+ phase_error, d_phase, d_freq, sample.real(), sample.imag(),
d_constellation->points()[d_current_const_point].real(),
d_constellation->points()[d_current_const_point].imag());
#endif
@@ -102,7 +102,7 @@ namespace gr {
set_constellation(constellation);
}
-
+
void
constellation_receiver_cb_impl::set_constellation(constellation_sptr
constellation)
{
@@ -145,16 +145,16 @@ namespace gr {
tag_t tag = tags_now[j];
dispatch_msg(tag.key, tag.value);
}
-
+
sample = in[i];
nco = gr_expj(d_phase); // get the NCO value for derotating the
current sample
sample = nco*sample; // get the downconverted symbol
-
+
sym_value = d_constellation->decision_maker_pe(&sample, &phase_error);
phase_error_tracking(phase_error); // corrects phase and frequency
offsets
-
+
out[i] = sym_value;
-
+
if(output_items.size() == 5) {
out_err[i] = phase_error;
out_phase[i] = d_phase;
@@ -162,7 +162,7 @@ namespace gr {
out_symbol[i] = sample;
}
i++;
-
+
}
consume_each(i);
@@ -197,7 +197,7 @@ namespace gr {
pmt::mp(0.0f), pmt::mp(2.0f), pmt::mp(0.0f),
"", "Loop bandwidth", RPC_PRIVLVL_MIN,
DISPTIME | DISPOPTSTRIP)));
-
+
// Setters
add_rpc_variable(
rpcbasic_sptr(new rpcbasic_register_set<control_loop, float>(
@@ -208,8 +208,7 @@ namespace gr {
RPC_PRIVLVL_MIN, DISPNULL)));
#endif /* GR_CTRLPORT */
}
-
+
} /* namespace digital */
} /* namespace gr */
-
diff --git a/gr-digital/lib/constellation_receiver_cb_impl.h
b/gr-digital/lib/constellation_receiver_cb_impl.h
index ccbbf83..6247deb 100644
--- a/gr-digital/lib/constellation_receiver_cb_impl.h
+++ b/gr-digital/lib/constellation_receiver_cb_impl.h
@@ -35,7 +35,7 @@ namespace gr {
: public constellation_receiver_cb, blocks::control_loop
{
public:
- constellation_receiver_cb_impl(constellation_sptr constell,
+ constellation_receiver_cb_impl(constellation_sptr constell,
float loop_bw, float fmin, float fmax);
~constellation_receiver_cb_impl();
@@ -66,10 +66,10 @@ namespace gr {
//! delay line length.
static const unsigned int DLLEN = 8;
-
+
//! delay line plus some length for overflow protection
__GR_ATTR_ALIGNED(8) gr_complex d_dl[2*DLLEN];
-
+
//! index to delay line
unsigned int d_dl_idx;
};
- [Commit-gnuradio] [gnuradio] branch master updated (ad9b547 -> 71a57cc), git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 07/23: qtgui: Mostly adds sunset and cool color schemes for waterfall/raster plots., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 10/23: qtgui: allows toggling rf frequencies on/off in GRC options box., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 12/23: qtgui: freq, waterfall, and sink blocks produce a frequency message when double-clicked. Also can take in a frequency message to adjust the x-axis., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 05/23: digital: adding a rotate_phase message for the constellation_receiver to adjust the phase of the constellation., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 01/23: volk: cmake: Rename GrBoost to VolkBoost to differentiate it from GR's GrBoost. Although they set the same BOOST variables internally, this change make it clear which cmake file to include., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 09/23: qtgui: minor mods, including putting min/max lines in FFT sink behind all other lines., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 04/23: blocks: adding a message port to the copy block to enable/disable copy., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 13/23: filter: adds a message input port to frequency xlating FIR filter to update the frequency., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 03/23: digital: expose set_constellation message port in GRC for constellation_receiver.,
git <=
- [Commit-gnuradio] [gnuradio] 08/23: qtgui: adds an alternative qss file., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 14/23: docs: adding docs for blocks::copy and digital::constellation_receiver to describe their message ports., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 15/23: qtgui: dynamically adjust min/max amplitude for qtgui freq and waterfall plots., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 16/23: Merge branch 'maint', git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 11/23: qtgui: for sink_x, waterfall_sink_x, and freq_sink_x, when the display is double-clicked, the center frequency is adjusted to the clicked frequency and a message is posted containing the new center frequency., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 17/23: replaced dynamic_ by static_cast; typechecking done before, git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 02/23: cmake: Include GrBoost at the top level such that the correct default BOOST variables are set throughout the build. Because of the way CMake handles non-cached variables, each GR component (e.g., Volk) can change the BOOST variables for its particular needs without overriding these default values for other components., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 06/23: blocks.head: added callback to GRC definition, git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 18/23: crc32_async: fix memory leak; coverity 1215946, git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 23/23: build: removed some gcc warnings., git, 2014/06/26