diff options
author | Eric Blossom | 2010-11-18 17:33:05 -0800 |
---|---|---|
committer | Eric Blossom | 2010-11-18 17:33:05 -0800 |
commit | f60c4420e1fdef24687ffed6baf4fd7fa5ca5cf8 (patch) | |
tree | d1e4497f8c6f9c7f85f6e6af5c4bd5c979fc10d1 /gnuradio-core/src/guile | |
parent | 5331ab1ce1d24e1608f11fc57df5c84ad3c8be9e (diff) | |
download | gnuradio-f60c4420e1fdef24687ffed6baf4fd7fa5ca5cf8.tar.gz gnuradio-f60c4420e1fdef24687ffed6baf4fd7fa5ca5cf8.tar.bz2 gnuradio-f60c4420e1fdef24687ffed6baf4fd7fa5ca5cf8.zip |
Fix guile related problems with gr_message_{sink,source}.
Diffstat (limited to 'gnuradio-core/src/guile')
-rw-r--r-- | gnuradio-core/src/guile/gnuradio/core.scm | 11 | ||||
-rw-r--r-- | gnuradio-core/src/guile/tests/io_ctors.test | 23 |
2 files changed, 24 insertions, 10 deletions
diff --git a/gnuradio-core/src/guile/gnuradio/core.scm b/gnuradio-core/src/guile/gnuradio/core.scm index b24d5afa9..9c69cea42 100644 --- a/gnuradio-core/src/guile/gnuradio/core.scm +++ b/gnuradio-core/src/guile/gnuradio/core.scm @@ -1,6 +1,7 @@ ;;; Glue the separate pieces of gnuradio-core into a single module (define-module (gnuradio core) + #:use-module (oop goops) #:use-module (gnuradio gnuradio_core_runtime) #:use-module (gnuradio runtime-shim) #:use-module (gnuradio gnuradio_core_filter) @@ -8,7 +9,7 @@ #:use-module (gnuradio gnuradio_core_general) #:use-module (gnuradio gnuradio_core_gengen) #:use-module (gnuradio gnuradio_core_hier) - #:duplicates (merge-generics check)) + #:duplicates (merge-generics replace check)) (re-export-all '(gnuradio gnuradio_core_runtime)) (re-export-all '(gnuradio runtime-shim)) @@ -18,6 +19,14 @@ (re-export-all '(gnuradio gnuradio_core_gengen)) (re-export-all '(gnuradio gnuradio_core_hier)) +;; Work around problem with gr:message-source +(define-generic gr:message-source) +(define-method (gr:message-source itemsize (msgq <gr-msg-queue-sptr>)) + (gr:message-source-msgq-ctor itemsize msgq)) +(define-method (gr:message-source itemsize (limit <integer>)) + (gr:message-source-limit-ctor itemsize limit)) +(export gr:message-source) + ;;; Return #t if x is not #f (define-public (true? x) (and x #t)) diff --git a/gnuradio-core/src/guile/tests/io_ctors.test b/gnuradio-core/src/guile/tests/io_ctors.test index b74d66cda..99c84ae37 100644 --- a/gnuradio-core/src/guile/tests/io_ctors.test +++ b/gnuradio-core/src/guile/tests/io_ctors.test @@ -29,6 +29,10 @@ (use-modules (gnuradio core)) (use-modules (oop goops)) + +(define (rm-foo) + (false-if-exception (delete-file "foo"))) + ;;; Add test code for all constructors in these files ;;; @@ -36,23 +40,24 @@ (pass-if (true? (gr:file-descriptor-sink 1 1))) ;;; ./io/gr_file_descriptor_source.h FIXME: not found -;; (pass-if (true? (gr:file-descriptor-source 1 1 false))) +;; (pass-if (true? (gr:file-descriptor-source 1 1 #f))) ;;; ./io/gr_file_sink.h (pass-if (true? (gr:file-sink 1 "foo"))) ;;; ./io/gr_file_source.h FIXME: not found -;; (pass-if (true? (gr:file-source 1 "foo" false))) +;; (pass-if (true? (gr:file-source 1 "foo" #f))) ;;; ./io/gr_histo_sink_f.h FIXME: not found ;; gr_make_histo_sink_f (gr_msg_queue_sptr msgq); ;; (pass-if (true? (gr:histo-sink-f 1))) -;;; ./io/gr_message_sink.h FIXME: not found -;; (pass-if (true? (gr:message-sink 1 1 false))) +;;; ./io/gr_message_sink.h +(pass-if (true? (gr:message-sink 1 (gr:msg-queue) #f))) -;;; ./io/gr_message_source.h FIXME: not found -;; (pass-if (true? (gr:message-source 1.0 0))) +;;; ./io/gr_message_source.h +(pass-if (true? (gr:message-source 1 1))) +(pass-if (true? (gr:message-source 1 (gr:msg-queue)))) ;;; ./io/gr_oscope_sink_f.h FIXME: not found ;; _oscope_sink_x (const std::string name, gr_io_signature_sptr input_sig, @@ -65,14 +70,14 @@ ;; (pass-if (true? (gr:oscope_sink_x "foo" 1 1))) ;;; ./io/gr_udp_sink.h FIXME: not found -;; (pass-if (true? (gr:udp-sink 1 "foo" 1472 true))) +;; (pass-if (true? (gr:udp-sink 1 "foo" 1472 #t))) ;;; ./io/gr_udp_source.h FIXME: not found -;; (pass-if (true? (gr:message-source 0 "foo" 0 1472 true true))) +;; (pass-if (true? (gr:message-source 0 "foo" 0 1472 #t #t))) ;;; ./io/gr_wavfile_sink.h FIXME: not found ;; (pass-if (true? (gr:message-source "foo" 1 1 1))) ;;; ./io/gr_wavfile_source.h FIXME: not found -;; (pass-if (true? (gr:message-source "foo" false))) +;; (pass-if (true? (gr:message-source "foo" #f))) |