aboutsummaryrefslogtreecommitdiffstats
path: root/swig
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2012-08-05 21:46:36 +0200
committerDimitri Stolnikov <horiz0n@gmx.net>2012-08-05 21:46:36 +0200
commit69a74abc78ffe91da37fd099f2d066951b5cb048 (patch)
tree8ff6b3ee1269413492fe3022bf4904b84e3f320f /swig
parentbb0adf48e5a7443772fd4784e090dab44dc2a4d7 (diff)
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()
Diffstat (limited to 'swig')
-rw-r--r--swig/osmosdr_swig.i14
1 files changed, 14 insertions, 0 deletions
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<std::string>;
+
+%template(size_vector_t) std::vector<size_t>;
+
+%include <osmosdr_pimpl.h>
+
+%ignore osmosdr::device_t::operator[]; //ignore warnings about %extend
+
+%template(string_string_dict_t) std::map<std::string, std::string>; //define before device
+%include <osmosdr_device.h>
+
+%template(range_vector_t) std::vector<osmosdr::range_t>; //define before range
+%include <osmosdr_ranges.h>
+
GR_SWIG_BLOCK_MAGIC(osmosdr,source_c);
%include "osmosdr_source_c.h"