summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/python
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-runtime/python')
-rw-r--r--gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt8
-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.py2
-rwxr-xr-xgnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py2
-rw-r--r--gnuradio-runtime/python/gnuradio/gr/tag_utils.py4
6 files changed, 19 insertions, 19 deletions
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt b/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt
index af563d3327..c910433cf7 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt
@@ -21,15 +21,15 @@
include(GrPython)
EXECUTE_PROCESS(
- COMMAND ${ICE_SLICE2PY} -I${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib
+ COMMAND ${ICE_SLICE2PY} -I${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/controlport
--output-dir=${CMAKE_BINARY_DIR}/gnuradio-runtime/python
- ${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/gnuradio.ice
+ ${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/controlport/gnuradio.ice
)
EXECUTE_PROCESS(
- COMMAND ${ICE_SLICE2PY} -I${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib
+ COMMAND ${ICE_SLICE2PY} -I${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/controlport
--output-dir=${CMAKE_BINARY_DIR}/gnuradio-runtime/python
- ${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/frontend.ice
+ ${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/controlport/frontend.ice
)
GR_PYTHON_INSTALL(
diff --git a/gnuradio-runtime/python/gnuradio/gr/__init__.py b/gnuradio-runtime/python/gnuradio/gr/__init__.py
index c1d6c87629..20a8f97f63 100644
--- a/gnuradio-runtime/python/gnuradio/gr/__init__.py
+++ b/gnuradio-runtime/python/gnuradio/gr/__init__.py
@@ -36,4 +36,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..abba6b57a6 100644
--- a/gnuradio-runtime/python/gnuradio/gr/prefs.py
+++ b/gnuradio-runtime/python/gnuradio/gr/prefs.py
@@ -20,7 +20,7 @@
#
import gnuradio_core as gsp
-_prefs_base = gsp.gr_prefs
+_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 8de7110e3f..e35564c1eb 100644
--- a/gnuradio-runtime/python/gnuradio/gr/tag_utils.py
+++ b/gnuradio-runtime/python/gnuradio/gr/tag_utils.py
@@ -25,7 +25,7 @@ import pmt
try:
from gnuradio import gr
except ImportError:
- from runtime_swig import gr_tag_t
+ from runtime_swig import tag_t
class PythonTag(object):
" Python container for tags "
@@ -46,7 +46,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 = tag_t()
newtag.offset = tag.offset
newtag.key = pmt.to_python(tag.key)
newtag.value = pmt.from_python(tag.value)