Mercurial > hg > aimc
changeset 55:d8d7757b83a6
- Better python support for signals
author | tomwalters |
---|---|
date | Wed, 04 Aug 2010 07:20:26 +0000 |
parents | 90eebc3c02ca |
children | 5d4f1e1524bb |
files | src/Support/SignalBank.h swig/aim_modules.i |
diffstat | 2 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Support/SignalBank.h Wed Aug 04 06:41:56 2010 +0000 +++ b/src/Support/SignalBank.h Wed Aug 04 07:20:26 2010 +0000 @@ -58,6 +58,10 @@ return signals_[channel]; }; + inline const vector<float> &get_signal(int channel) const { + return signals_[channel]; + }; + inline float sample(int channel, int index) const { return signals_[channel][index]; }
--- a/swig/aim_modules.i Wed Aug 04 06:41:56 2010 +0000 +++ b/swig/aim_modules.i Wed Aug 04 07:20:26 2010 +0000 @@ -18,6 +18,12 @@ %module aimc %include "std_string.i" %include stl.i +%include "std_vector.i" + +namespace std { + %template(FloatVector) vector<float>; +} + %{ #include "Support/Common.h" #include "Support/Module.h" @@ -35,6 +41,7 @@ %} %include "Support/Parameters.h" +using namespace std; %include "Support/SignalBank.h" namespace aimc {