summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/python/gnuradio/gr
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/gr')
-rw-r--r--gnuradio-runtime/python/gnuradio/gr/__init__.py2
-rw-r--r--gnuradio-runtime/python/gnuradio/gr/gateway.py20
-rw-r--r--gnuradio-runtime/python/gnuradio/gr/prefs.py4
-rwxr-xr-xgnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py2
-rw-r--r--gnuradio-runtime/python/gnuradio/gr/tag_utils.py4
5 files changed, 16 insertions, 16 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gr/__init__.py b/gnuradio-runtime/python/gnuradio/gr/__init__.py
index 07deae6fb4..94a5c9ec2b 100644
--- a/gnuradio-runtime/python/gnuradio/gr/__init__.py
+++ b/gnuradio-runtime/python/gnuradio/gr/__init__.py
@@ -47,4 +47,4 @@ from tag_utils import *
from gateway import basic_block, sync_block, decim_block, interp_block
# Force the preference database to be initialized
-prefs = gr_prefs.singleton
+prefs = prefs.singleton
diff --git a/gnuradio-runtime/python/gnuradio/gr/gateway.py b/gnuradio-runtime/python/gnuradio/gr/gateway.py
index b595959494..4ff0c4fe00 100644
--- a/gnuradio-runtime/python/gnuradio/gr/gateway.py
+++ b/gnuradio-runtime/python/gnuradio/gr/gateway.py
@@ -21,7 +21,7 @@
import runtime_swig as gr
from runtime_swig import io_signature, io_signaturev
-from runtime_swig import gr_block_gw_message_type
+from runtime_swig import block_gw_message_type
from runtime_swig import block_gateway
import numpy
@@ -107,16 +107,16 @@ class gateway_block(object):
self.__handler.init(self.__gr_block_handle)
self.__gateway = block_gateway(
self.__handler, name, gr_in_sig, gr_out_sig, work_type, factor)
- self.__message = self.__gateway.gr_block_message()
+ self.__message = self.__gateway.block_message()
#dict to keep references to all message handlers
self.__msg_handlers = {}
- #register gr_block functions
- prefix = 'gr_block__'
+ #register block functions
+ prefix = 'block__'
for attr in [x for x in dir(self.__gateway) if x.startswith(prefix)]:
setattr(self, attr.replace(prefix, ''), getattr(self.__gateway, attr))
- self.pop_msg_queue = lambda: gr.gr_block_gw_pop_msg_queue_safe(self.__gateway)
+ self.pop_msg_queue = lambda: gr.block_gw_pop_msg_queue_safe(self.__gateway)
def to_basic_block(self):
"""
@@ -128,7 +128,7 @@ class gateway_block(object):
"""
Dispatch tasks according to the action type specified in the message.
"""
- if self.__message.action == gr_block_gw_message_type.ACTION_GENERAL_WORK:
+ if self.__message.action == gr.block_gw_message_type.ACTION_GENERAL_WORK:
self.__message.general_work_args_return_value = self.general_work(
input_items=[pointer_to_ndarray(
@@ -144,7 +144,7 @@ class gateway_block(object):
) for i in self.__out_indexes],
)
- elif self.__message.action == gr_block_gw_message_type.ACTION_WORK:
+ elif self.__message.action == gr.block_gw_message_type.ACTION_WORK:
self.__message.work_args_return_value = self.work(
input_items=[pointer_to_ndarray(
@@ -160,16 +160,16 @@ class gateway_block(object):
) for i in self.__out_indexes],
)
- elif self.__message.action == gr_block_gw_message_type.ACTION_FORECAST:
+ elif self.__message.action == gr.block_gw_message_type.ACTION_FORECAST:
self.forecast(
noutput_items=self.__message.forecast_args_noutput_items,
ninput_items_required=self.__message.forecast_args_ninput_items_required,
)
- elif self.__message.action == gr_block_gw_message_type.ACTION_START:
+ elif self.__message.action == gr.block_gw_message_type.ACTION_START:
self.__message.start_args_return_value = self.start()
- elif self.__message.action == gr_block_gw_message_type.ACTION_STOP:
+ elif self.__message.action == gr.block_gw_message_type.ACTION_STOP:
self.__message.stop_args_return_value = self.stop()
def forecast(self, noutput_items, ninput_items_required):
diff --git a/gnuradio-runtime/python/gnuradio/gr/prefs.py b/gnuradio-runtime/python/gnuradio/gr/prefs.py
index 25fa8cd6ae..17f5bfb54c 100644
--- a/gnuradio-runtime/python/gnuradio/gr/prefs.py
+++ b/gnuradio-runtime/python/gnuradio/gr/prefs.py
@@ -19,8 +19,8 @@
# Boston, MA 02110-1301, USA.
#
-import gnuradio_core as gsp
-_prefs_base = gsp.gr_prefs
+import gnuradio_runtime as gsp
+_prefs_base = gsp.prefs
import ConfigParser
diff --git a/gnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py b/gnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py
index de1b5aa002..3a0e7889f9 100755
--- a/gnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py
+++ b/gnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py
@@ -38,7 +38,7 @@ class test_tag_utils (gr_unittest.TestCase):
self.tb = None
def test_001(self):
- t = gr.gr_tag_t()
+ t = gr.tag_t()
t.offset = 10
t.key = pmt.string_to_symbol('key')
t.value = pmt.from_long(23)
diff --git a/gnuradio-runtime/python/gnuradio/gr/tag_utils.py b/gnuradio-runtime/python/gnuradio/gr/tag_utils.py
index 5caa10bd21..c25ed8d772 100644
--- a/gnuradio-runtime/python/gnuradio/gr/tag_utils.py
+++ b/gnuradio-runtime/python/gnuradio/gr/tag_utils.py
@@ -22,7 +22,7 @@
import pmt
-from gnuradio.gr import gr_tag_t
+from gnuradio import gr
class PythonTag(object):
" Python container for tags "
@@ -43,7 +43,7 @@ def tag_to_python(tag):
def tag_to_pmt(tag):
""" Convert a Python-readable object to a stream tag """
- newtag = gr_tag_t()
+ newtag = gr.tag_t()
newtag.offset = tag.offset
newtag.key = pmt.to_python(tag.key)
newtag.value = pmt.from_python(tag.value)