summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/runtime/gr_block.i
diff options
context:
space:
mode:
authorjcorgan2006-12-12 20:00:39 +0000
committerjcorgan2006-12-12 20:00:39 +0000
commit76ed4c2fea5f59bfe02bbbb17754ef7eda44feca (patch)
treec30952925ea02e52f137e1e7f4da658629994936 /gnuradio-core/src/lib/runtime/gr_block.i
parent5de36fac220305307d6fb64eabe6f417a26c0982 (diff)
downloadgnuradio-76ed4c2fea5f59bfe02bbbb17754ef7eda44feca.tar.gz
gnuradio-76ed4c2fea5f59bfe02bbbb17754ef7eda44feca.tar.bz2
gnuradio-76ed4c2fea5f59bfe02bbbb17754ef7eda44feca.zip
Merge jcorgan/hier developer branch into trunk. Enables creation of true hierarchical blocks, from either C++ or Python, as well as creating pure C++ gnuradio applications. EXPERIMENTAL.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4070 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/lib/runtime/gr_block.i')
-rw-r--r--gnuradio-core/src/lib/runtime/gr_block.i16
1 files changed, 5 insertions, 11 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_block.i b/gnuradio-core/src/lib/runtime/gr_block.i
index 3bfd24367..5d0f5fb1b 100644
--- a/gnuradio-core/src/lib/runtime/gr_block.i
+++ b/gnuradio-core/src/lib/runtime/gr_block.i
@@ -20,6 +20,8 @@
* Boston, MA 02110-1301, USA.
*/
+%include <gr_basic_block.i>
+
class gr_block;
typedef boost::shared_ptr<gr_block> gr_block_sptr;
%template(gr_block_sptr) boost::shared_ptr<gr_block>;
@@ -29,26 +31,21 @@ namespace std {
%template(x_vector_gr_block_sptr) vector<gr_block_sptr>;
};
-class gr_block {
+class gr_block : public gr_basic_block {
protected:
gr_block (const std::string &name,
- gr_io_signature_sptr input_signature,
- gr_io_signature_sptr output_signature);
+ gr_io_signature_sptr input_signature,
+ gr_io_signature_sptr output_signature);
public:
virtual ~gr_block ();
- std::string name () const;
- gr_io_signature_sptr input_signature () const;
- gr_io_signature_sptr output_signature () const;
- long unique_id () const;
unsigned history () const;
int output_multiple () const;
double relative_rate () const;
- bool check_topology (int ninputs, int noutputs);
bool start();
bool stop();
@@ -57,9 +54,6 @@ class gr_block {
void set_detail (gr_block_detail_sptr detail) { d_detail = detail; }
};
-%rename(block_ncurrently_allocated) gr_block_ncurrently_allocated;
-long gr_block_ncurrently_allocated ();
-
%pythoncode %{
gr_block_sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id ())
gr_block_sptr.block = lambda self: self