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()
This commit is contained in:
Dimitri Stolnikov 2012-08-05 21:46:36 +02:00
parent bb0adf48e5
commit 69a74abc78
1 changed files with 14 additions and 0 deletions

View File

@ -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"