OFDM-Code: DC-Carriers and ofdm_mapper


I’m currently trying to get a hang of the OFDM-internals and I’m stuck
in gr_ofdm_mapper_bcv. I hope someone might be able to enlighten me…

First of all, how exactly does gr_ofdm_mapper_bcv decide which carriers
are used? I really, really hate having to ask this kind of question when
I have the source code right here, but - with all respect to the
authors - I find some of the code pretty obscure.

Say I want to use an IFFT length of 16 (for academic reasons). A call

gr.ofdm_mapper_bcv(constellation, 2, oc, 16)

will always throw an exception unless oc is 14 or 16. Using 8
subcarriers should not be a problem physically? What’s the rule of
possible combinations of FFT-length occupied carriers?

Next, I noticed that the DC carrier(s) are left unused. Logically, this
should happen in gr_ofdm_mapper_bcv, but I can’t really find where.
However, this is slightly confusing: say you set options.occupied in
ofdm_mod to 200, then what you really get are 198 occupied subcarriers,
or am I mistaken?

By the way, why can’t I use try:except to catch an instance of
‘std::invalid_argument’? Is this a SWIG-problem?

Thanks for any insight you may have!