Tom Tsou | 3522229 | 2016-06-22 16:16:30 -0700 | [diff] [blame] | 1 | #ifndef _CHANNELIZER_RX_H_ |
| 2 | #define _CHANNELIZER_RX_H_ |
| 3 | |
| 4 | #include "ChannelizerBase.h" |
| 5 | |
| 6 | class Channelizer : public ChannelizerBase { |
| 7 | public: |
| 8 | /** Constructor for channelizing filter bank |
| 9 | @param m number of physical channels |
| 10 | @param blockLen number of samples per output of each iteration |
| 11 | @param hLen number of taps in each constituent filter path |
| 12 | */ |
| 13 | Channelizer(size_t m, size_t blockLen, size_t hLen = 16); |
| 14 | ~Channelizer(); |
| 15 | |
| 16 | /* Return required input and output buffer lengths */ |
| 17 | size_t inputLen() const; |
| 18 | size_t outputLen() const; |
| 19 | |
| 20 | /** Rotate "input commutator" and drive samples through filterbank |
| 21 | @param in complex input vector |
| 22 | @param iLen number of samples in buffer (must match block length) |
| 23 | @return false on error and true otherwise |
| 24 | */ |
| 25 | bool rotate(const float *in, size_t iLen); |
| 26 | |
| 27 | /** Get buffer for an output path |
| 28 | @param chan channel number of filterbank |
| 29 | @return NULL on error and pointer to buffer otherwise |
| 30 | */ |
| 31 | float *outputBuffer(size_t chan) const; |
| 32 | }; |
| 33 | |
| 34 | #endif /* _CHANNELIZER_RX_H_ */ |