diff options
author | Eric Blossom | 2010-11-09 18:42:48 -0800 |
---|---|---|
committer | Eric Blossom | 2010-11-10 12:17:58 -0800 |
commit | 5228dd1ba5de72642208404b29f8b876fe59f388 (patch) | |
tree | 5d077f98fdca50c9a173831a733439b64a1b1510 /gnuradio-core/src | |
parent | 5a9a440109ef950ac8b749a55644528204520131 (diff) | |
download | gnuradio-5228dd1ba5de72642208404b29f8b876fe59f388.tar.gz gnuradio-5228dd1ba5de72642208404b29f8b876fe59f388.tar.bz2 gnuradio-5228dd1ba5de72642208404b29f8b876fe59f388.zip |
First pass at waveform-spec
Diffstat (limited to 'gnuradio-core/src')
-rw-r--r-- | gnuradio-core/src/guile/gnuradio/waveform-spec.scm | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gnuradio-core/src/guile/gnuradio/waveform-spec.scm b/gnuradio-core/src/guile/gnuradio/waveform-spec.scm new file mode 100644 index 000000000..956a36106 --- /dev/null +++ b/gnuradio-core/src/guile/gnuradio/waveform-spec.scm @@ -0,0 +1,36 @@ +;;; +;;; Copyright 2010 Free Software Foundation, Inc. +;;; +;;; This file is part of GNU Radio +;;; +;;; GNU Radio is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3, or (at your option) +;;; any later version. +;;; +;;; GNU Radio is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program. If not, see <http://www.gnu.org/licenses/>. +;;; + +(define-module (gnuradio waveform-spec) + #:use-module (ice-9 syncase) + #:export-syntax waveform-spec) + +(define-syntax waveform-spec + (syntax-rules (vars blocks connections) + ((_ (args ...) + (vars (v-name v-val) ...) + (blocks (b-name b-val) ...) + (connections (endpoint1 endpoint2 ...) ...)) + (lambda (args ...) + (let* ((v-name v-val) ... + (b-name b-val) ... + (tb (gr:top-block-swig "waveform-top-block"))) + (gr:connect tb endpoint1 endpoint2 ...) ... + tb))))) + |