summaryrefslogtreecommitdiff
path: root/gnuradio-runtime
diff options
context:
space:
mode:
authorJeff Long <willcode4@gmail.com>2018-02-17 15:44:28 -0500
committerMarcus Müller <mueller@kit.edu>2018-02-21 19:42:46 +0100
commit4cce1a032a929d72948d54c2b429dc8ebd530a36 (patch)
treec1d125be7e2faad6ff3c35400953466b245de151 /gnuradio-runtime
parent1759208f5edc48419d498abd5ee79f524f3d9ae4 (diff)
python gateway: added arg descriptions as docstrings
Diffstat (limited to 'gnuradio-runtime')
-rw-r--r--gnuradio-runtime/python/gnuradio/gr/gateway.py57
1 files changed, 57 insertions, 0 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gr/gateway.py b/gnuradio-runtime/python/gnuradio/gr/gateway.py
index e5c3e50630..9c6a5fcd9b 100644
--- a/gnuradio-runtime/python/gnuradio/gr/gateway.py
+++ b/gnuradio-runtime/python/gnuradio/gr/gateway.py
@@ -81,6 +81,19 @@ class msg_handler(gr.feval_p):
# io_signature for Python
########################################################################
class py_io_signature(object):
+ """Describes the type/number of ports for block input or output.
+
+ Args:
+
+ min_ports (int): mininum number of connected ports.
+
+ max_ports (int): maximum number of connected ports. -1 indicates
+ no limit.
+
+ type_list (list[str]): numpy type names for each port. If the
+ number of connected ports is greater than the number of types
+ provided, the last type in the list is repeated.
+ """
# Minimum and maximum number of ports, and a list of numpy types.
def __init__(self, min_ports, max_ports, type_list):
@@ -249,6 +262,17 @@ class gateway_block(object):
# Wrappers for the user to inherit from
########################################################################
class basic_block(gateway_block):
+ """Args:
+ name (str): block name
+
+ in_sig (gr.py_io_signature): input port signature
+
+ out_sig (gr.py_io_signature): output port signature
+
+ For backward compatibility, a sequence of numpy type names is also
+ accepted as an io signature.
+
+ """
def __init__(self, name, in_sig, out_sig):
gateway_block.__init__(self,
name=name,
@@ -259,6 +283,17 @@ class basic_block(gateway_block):
)
class sync_block(gateway_block):
+ """
+ Args:
+ name (str): block name
+
+ in_sig (gr.py_io_signature): input port signature
+
+ out_sig (gr.py_io_signature): output port signature
+
+ For backward compatibility, a sequence of numpy type names is also
+ accepted as an io signature.
+ """
def __init__(self, name, in_sig, out_sig):
gateway_block.__init__(self,
name=name,
@@ -269,6 +304,17 @@ class sync_block(gateway_block):
)
class decim_block(gateway_block):
+ """
+ Args:
+ name (str): block name
+
+ in_sig (gr.py_io_signature): input port signature
+
+ out_sig (gr.py_io_signature): output port signature
+
+ For backward compatibility, a sequence of numpy type names is also
+ accepted as an io signature.
+ """
def __init__(self, name, in_sig, out_sig, decim):
gateway_block.__init__(self,
name=name,
@@ -279,6 +325,17 @@ class decim_block(gateway_block):
)
class interp_block(gateway_block):
+ """
+ Args:
+ name (str): block name
+
+ in_sig (gr.py_io_signature): input port signature
+
+ out_sig (gr.py_io_signature): output port signature
+
+ For backward compatibility, a sequence of numpy type names is also
+ accepted as an io signature.
+ """
def __init__(self, name, in_sig, out_sig, interp):
gateway_block.__init__(self,
name=name,