summaryrefslogtreecommitdiff
path: root/gr-digital/examples/transmit_path.py
diff options
context:
space:
mode:
authorTom Rondeau2011-08-10 22:37:51 -0400
committerTom Rondeau2011-08-10 22:37:51 -0400
commit57860e0199c005f26b4942cc7ed5e5acf829a68b (patch)
treee13821d931b074d17fa43dc3da257ac50a9813bd /gr-digital/examples/transmit_path.py
parent612be3956603941f6cf530c090eba02d26d33bcd (diff)
downloadgnuradio-57860e0199c005f26b4942cc7ed5e5acf829a68b.tar.gz
gnuradio-57860e0199c005f26b4942cc7ed5e5acf829a68b.tar.bz2
gnuradio-57860e0199c005f26b4942cc7ed5e5acf829a68b.zip
Cleaning up; adding a different dbpsk that uses differential coding. The normal bpsk is non-differential by default, but can be set to use differential with the right flag.
Diffstat (limited to 'gr-digital/examples/transmit_path.py')
-rw-r--r--gr-digital/examples/transmit_path.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/gr-digital/examples/transmit_path.py b/gr-digital/examples/transmit_path.py
index 8ffb1e108..f22ffb327 100644
--- a/gr-digital/examples/transmit_path.py
+++ b/gr-digital/examples/transmit_path.py
@@ -44,7 +44,6 @@ class transmit_path(gr.hier_block2):
self._verbose = options.verbose
self._tx_amplitude = options.tx_amplitude # digital amplitude sent to USRP
self._bitrate = options.bitrate # desired bit rate
- self._samples_per_symbol = options.samples_per_symbol # desired samples/baud
self._modulator_class = modulator_class # the modulator_class we are using
@@ -52,9 +51,10 @@ class transmit_path(gr.hier_block2):
mod_kwargs = self._modulator_class.extract_kwargs_from_options(options)
# transmitter
- modulator = self._modulator_class(**mod_kwargs)
+ self.modulator = self._modulator_class(**mod_kwargs)
+
self.packet_transmitter = \
- digital.mod_pkts(modulator,
+ digital.mod_pkts(self.modulator,
access_code=None,
msgq_limit=4,
pad_for_usrp=True)
@@ -87,7 +87,10 @@ class transmit_path(gr.hier_block2):
return self._bitrate
def samples_per_symbol(self):
- return self._samples_per_symbol
+ return self.modulator._samples_per_symbol
+
+ def differential(self):
+ return self.modulator._differential
def add_options(normal, expert):
"""
@@ -115,5 +118,5 @@ class transmit_path(gr.hier_block2):
print "Tx amplitude %s" % (self._tx_amplitude)
print "modulation: %s" % (self._modulator_class.__name__)
print "bitrate: %sb/s" % (eng_notation.num_to_str(self._bitrate))
- print "samples/symbol: %.4f" % (self._samples_per_symbol)
-
+ print "samples/symbol: %.4f" % (self.samples_per_symbol())
+ print "Differential: %s" % (self.differential())