From 69a74abc78ffe91da37fd099f2d066951b5cb048 Mon Sep 17 00:00:00 2001 From: Dimitri Stolnikov Date: Sun, 5 Aug 2012 21:46:36 +0200 Subject: [PATCH] add swig hints for range and device objects Use case: print "\nSupported rates:" for rate in self.osmosdr_source_c_0.get_sample_rates(): print rate.start() print "\nSupported gains:" for gain in self.osmosdr_source_c_0.get_gain_range(): print gain.start() --- swig/osmosdr_swig.i | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/swig/osmosdr_swig.i b/swig/osmosdr_swig.i index 8dfa213..afdbb0e 100644 --- a/swig/osmosdr_swig.i +++ b/swig/osmosdr_swig.i @@ -16,6 +16,20 @@ //#include "osmosdr_sink_c.h" %} +%template(string_vector_t) std::vector; + +%template(size_vector_t) std::vector; + +%include + +%ignore osmosdr::device_t::operator[]; //ignore warnings about %extend + +%template(string_string_dict_t) std::map; //define before device +%include + +%template(range_vector_t) std::vector; //define before range +%include + GR_SWIG_BLOCK_MAGIC(osmosdr,source_c); %include "osmosdr_source_c.h"