summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Blum2009-11-25 19:38:36 -0800
committerJosh Blum2009-11-25 19:38:36 -0800
commita57968df0b3f85ebe1d2f0b70185f90430548a12 (patch)
tree9363cafcdcc47031bd76ba9bcdd339e7914fa4a0
parent7331b498973b1f1fd43e6770e60ef91150c06ed4 (diff)
downloadgnuradio-a57968df0b3f85ebe1d2f0b70185f90430548a12.tar.gz
gnuradio-a57968df0b3f85ebe1d2f0b70185f90430548a12.tar.bz2
gnuradio-a57968df0b3f85ebe1d2f0b70185f90430548a12.zip
added sync output port to dxpsk2 demod
-rw-r--r--gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py22
-rw-r--r--gnuradio-core/src/python/gnuradio/blks2impl/dqpsk2.py14
-rw-r--r--grc/blocks/blks2_dxpsk2_demod.xml22
3 files changed, 45 insertions, 13 deletions
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py b/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py
index 4541b453b..cd9a207c8 100644
--- a/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py
+++ b/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py
@@ -187,7 +187,8 @@ class dbpsk2_demod(gr.hier_block2):
timing_max_dev=_def_timing_max_dev,
gray_code=_def_gray_code,
verbose=_def_verbose,
- log=_def_log):
+ log=_def_log,
+ sync_out=False):
"""
Hierarchical block for RRC-filtered differential BPSK demodulation
@@ -208,14 +209,18 @@ class dbpsk2_demod(gr.hier_block2):
@type gray_code: bool
@param verbose: Print information about modulator?
@type verbose: bool
- @param debug: Print modualtion data to files?
- @type debug: bool
+ @param log: Print modualtion data to files?
+ @type log: bool
+ @param sync_out: Output a sync signal on :1?
+ @type sync_out: bool
"""
-
- gr.hier_block2.__init__(self, "dbpsk2_demod",
- gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
- gr.io_signature(1, 1, gr.sizeof_char)) # Output signature
-
+ if sync_out: io_sig_out = gr.io_signaturev(2, 2, (gr.sizeof_char, gr.sizeof_gr_complex))
+ else: io_sig_out = gr.io_signature(1, 1, gr.sizeof_char)
+
+ gr.hier_block2.__init__(self, "dqpsk2_demod",
+ gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+ io_sig_out) # Output signature
+
self._samples_per_symbol = samples_per_symbol
self._excess_bw = excess_bw
self._costas_alpha = costas_alpha
@@ -278,6 +283,7 @@ class dbpsk2_demod(gr.hier_block2):
self.clock_recov,
self.time_recov,
self.diffdec, self.slicer, self.symbol_mapper, self.unpack, self)
+ if sync_out: self.connect(self.time_recov, (self, 1))
def samples_per_symbol(self):
return self._samples_per_symbol
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk2.py b/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk2.py
index 9704ac98c..fd1e9f0ef 100644
--- a/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk2.py
+++ b/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk2.py
@@ -187,7 +187,8 @@ class dqpsk2_demod(gr.hier_block2):
timing_max_dev=_def_timing_max_dev,
gray_code=_def_gray_code,
verbose=_def_verbose,
- log=_def_log):
+ log=_def_log,
+ sync_out=False):
"""
Hierarchical block for RRC-filtered DQPSK demodulation
@@ -208,13 +209,17 @@ class dqpsk2_demod(gr.hier_block2):
@type gray_code: bool
@param verbose: Print information about modulator?
@type verbose: bool
- @param debug: Print modualtion data to files?
- @type debug: bool
+ @param log: Print modualtion data to files?
+ @type log: bool
+ @param sync_out: Output a sync signal on :1?
+ @type sync_out: bool
"""
+ if sync_out: io_sig_out = gr.io_signaturev(2, 2, (gr.sizeof_char, gr.sizeof_gr_complex))
+ else: io_sig_out = gr.io_signature(1, 1, gr.sizeof_char)
gr.hier_block2.__init__(self, "dqpsk2_demod",
gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
- gr.io_signature(1, 1, gr.sizeof_char)) # Output signature
+ io_sig_out) # Output signature
self._samples_per_symbol = samples_per_symbol
self._excess_bw = excess_bw
@@ -278,6 +283,7 @@ class dqpsk2_demod(gr.hier_block2):
self.clock_recov,
self.time_recov,
self.diffdec, self.slicer, self.symbol_mapper, self.unpack, self)
+ if sync_out: self.connect(self.time_recov, (self, 1))
def samples_per_symbol(self):
return self._samples_per_symbol
diff --git a/grc/blocks/blks2_dxpsk2_demod.xml b/grc/blocks/blks2_dxpsk2_demod.xml
index 98658442e..c1af5368e 100644
--- a/grc/blocks/blks2_dxpsk2_demod.xml
+++ b/grc/blocks/blks2_dxpsk2_demod.xml
@@ -17,6 +17,7 @@
gray_code=$gray_code,
verbose=$verbose,
log=$log,
+ sync_out=$sync_out,
)</make>
<param>
<name>Type</name>
@@ -71,7 +72,7 @@
<name>Gray Code</name>
<key>gray_code</key>
<value>True</value>
- <type>enum</type>
+ <type>bool</type>
<option>
<name>Yes</name>
<key>True</key>
@@ -111,6 +112,20 @@
<key>False</key>
</option>
</param>
+ <param>
+ <name>Sync Out</name>
+ <key>sync_out</key>
+ <value>False</value>
+ <type>bool</type>
+ <option>
+ <name>On</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>Off</name>
+ <key>False</key>
+ </option>
+ </param>
<sink>
<name>in</name>
<type>complex</type>
@@ -119,4 +134,9 @@
<name>out</name>
<type>byte</type>
</source>
+ <source>
+ <name>sync</name>
+ <type>complex</type>
+ <optional>1</optional>
+ </source>
</block>