summaryrefslogtreecommitdiff
path: root/gr-digital/examples
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital/examples')
-rw-r--r--gr-digital/examples/narrowband/receive_path.py8
-rw-r--r--gr-digital/examples/narrowband/transmit_path.py4
-rw-r--r--gr-digital/examples/narrowband/uhd_interface.py10
-rw-r--r--gr-digital/examples/ofdm/receive_path.py8
-rw-r--r--gr-digital/examples/ofdm/transmit_path.py6
-rw-r--r--gr-digital/examples/ofdm/uhd_interface.py10
6 files changed, 13 insertions, 33 deletions
diff --git a/gr-digital/examples/narrowband/receive_path.py b/gr-digital/examples/narrowband/receive_path.py
index dc155e1d12..8bbfe92770 100644
--- a/gr-digital/examples/narrowband/receive_path.py
+++ b/gr-digital/examples/narrowband/receive_path.py
@@ -124,8 +124,8 @@ class receive_path(gr.hier_block2):
threshold_in_db: set detection threshold (float (dB))
"""
self.probe.set_threshold(threshold_in_db)
-
-
+
+ @staticmethod
def add_options(normal, expert):
"""
Adds receiver-specific options to the Options Parser
@@ -141,10 +141,6 @@ class receive_path(gr.hier_block2):
expert.add_option("", "--chbw-factor", type="float", default=1.0,
help="Channel bandwidth = chbw_factor x signal bandwidth [defaut=%default]")
- # Make a static method to call before instantiation
- add_options = staticmethod(add_options)
-
-
def _print_verbage(self):
"""
Prints information about the receive path
diff --git a/gr-digital/examples/narrowband/transmit_path.py b/gr-digital/examples/narrowband/transmit_path.py
index 43a96050e9..70b4044e52 100644
--- a/gr-digital/examples/narrowband/transmit_path.py
+++ b/gr-digital/examples/narrowband/transmit_path.py
@@ -94,6 +94,7 @@ class transmit_path(gr.hier_block2):
def differential(self):
return self.modulator._differential
+ @staticmethod
def add_options(normal, expert):
"""
Adds transmitter-specific options to the Options Parser
@@ -115,9 +116,6 @@ class transmit_path(gr.hier_block2):
default=False,
help="Log all parts of flow graph to file (CAUTION: lots of data)")
- # Make a static method to call before instantiation
- add_options = staticmethod(add_options)
-
def _print_verbage(self):
"""
Prints information about the transmit path
diff --git a/gr-digital/examples/narrowband/uhd_interface.py b/gr-digital/examples/narrowband/uhd_interface.py
index 474e96f486..e7c7fe3af0 100644
--- a/gr-digital/examples/narrowband/uhd_interface.py
+++ b/gr-digital/examples/narrowband/uhd_interface.py
@@ -145,7 +145,8 @@ class uhd_transmitter(uhd_interface, gr.hier_block2):
if(verbose):
self._print_verbage()
-
+
+ @staticmethod
def add_options(parser):
add_freq_option(parser)
parser.add_option("-a", "--args", type="string", default="",
@@ -165,9 +166,6 @@ class uhd_transmitter(uhd_interface, gr.hier_block2):
help="select clock source (e.g. 'external') [default=%default]")
parser.add_option("-v", "--verbose", action="store_true", default=False)
- # Make a static method to call before instantiation
- add_options = staticmethod(add_options)
-
def _print_verbage(self):
"""
Prints information about the UHD transmitter
@@ -203,6 +201,7 @@ class uhd_receiver(uhd_interface, gr.hier_block2):
if(verbose):
self._print_verbage()
+ @staticmethod
def add_options(parser):
add_freq_option(parser)
parser.add_option("-a", "--args", type="string", default="",
@@ -223,9 +222,6 @@ class uhd_receiver(uhd_interface, gr.hier_block2):
if not parser.has_option("--verbose"):
parser.add_option("-v", "--verbose", action="store_true", default=False)
- # Make a static method to call before instantiation
- add_options = staticmethod(add_options)
-
def _print_verbage(self):
"""
Prints information about the UHD transmitter
diff --git a/gr-digital/examples/ofdm/receive_path.py b/gr-digital/examples/ofdm/receive_path.py
index 2a6813f8f9..0cb4479a2e 100644
--- a/gr-digital/examples/ofdm/receive_path.py
+++ b/gr-digital/examples/ofdm/receive_path.py
@@ -82,8 +82,8 @@ class receive_path(gr.hier_block2):
threshold_in_db: set detection threshold (float (dB))
"""
self.probe.set_threshold(threshold_in_db)
-
-
+
+ @staticmethod
def add_options(normal, expert):
"""
Adds receiver-specific options to the Options Parser
@@ -95,10 +95,6 @@ class receive_path(gr.hier_block2):
expert.add_option("", "--log", action="store_true", default=False,
help="Log all parts of flow graph to files (CAUTION: lots of data)")
- # Make a static method to call before instantiation
- add_options = staticmethod(add_options)
-
-
def _print_verbage(self):
"""
Prints information about the receive path
diff --git a/gr-digital/examples/ofdm/transmit_path.py b/gr-digital/examples/ofdm/transmit_path.py
index aa146cea96..98a81f3c1a 100644
--- a/gr-digital/examples/ofdm/transmit_path.py
+++ b/gr-digital/examples/ofdm/transmit_path.py
@@ -75,7 +75,8 @@ class transmit_path(gr.hier_block2):
Calls the transmitter method to send a packet
"""
return self.ofdm_tx.send_pkt(payload, eof)
-
+
+ @staticmethod
def add_options(normal, expert):
"""
Adds transmitter-specific options to the Options Parser
@@ -92,9 +93,6 @@ class transmit_path(gr.hier_block2):
default=False,
help="Log all parts of flow graph to file (CAUTION: lots of data)")
- # Make a static method to call before instantiation
- add_options = staticmethod(add_options)
-
def _print_verbage(self):
"""
Prints information about the transmit path
diff --git a/gr-digital/examples/ofdm/uhd_interface.py b/gr-digital/examples/ofdm/uhd_interface.py
index 5b4d707b07..ac34d956ae 100644
--- a/gr-digital/examples/ofdm/uhd_interface.py
+++ b/gr-digital/examples/ofdm/uhd_interface.py
@@ -126,7 +126,8 @@ class uhd_transmitter(uhd_interface, gr.hier_block2):
if(verbose):
self._print_verbage()
-
+
+ @staticmethod
def add_options(parser):
add_freq_option(parser)
parser.add_option("-a", "--args", type="string", default="",
@@ -146,9 +147,6 @@ class uhd_transmitter(uhd_interface, gr.hier_block2):
help="select clock source (e.g. 'external') [default=%default]")
parser.add_option("-v", "--verbose", action="store_true", default=False)
- # Make a static method to call before instantiation
- add_options = staticmethod(add_options)
-
def _print_verbage(self):
"""
Prints information about the UHD transmitter
@@ -186,6 +184,7 @@ class uhd_receiver(uhd_interface, gr.hier_block2):
if(verbose):
self._print_verbage()
+ @staticmethod
def add_options(parser):
add_freq_option(parser)
parser.add_option("-a", "--args", type="string", default="",
@@ -206,9 +205,6 @@ class uhd_receiver(uhd_interface, gr.hier_block2):
if not parser.has_option("--verbose"):
parser.add_option("-v", "--verbose", action="store_true", default=False)
- # Make a static method to call before instantiation
- add_options = staticmethod(add_options)
-
def _print_verbage(self):
"""
Prints information about the UHD transmitter