#include <Ieee80211OFDMInterleaver.h>
int getNumberOfCodedBitsPerSubcarrier() const
Definition: Ieee80211OFDMInterleaving.h:38
const Ieee80211OFDMInterleaving * interleaving
Definition: Ieee80211OFDMInterleaver.h:42
double max(double a, double b)
Returns the greater of the given parameters.
Definition: INETMath.h:161
int numberOfCodedBitsPerSymbol
Definition: Ieee80211OFDMInterleaver.h:39
int getNumberOfCodedBitsPerSymbol() const
Definition: Ieee80211OFDMInterleaving.h:39
int numberOfCodedBitsPerSubcarrier
Definition: Ieee80211OFDMInterleaver.h:40
int s
Definition: Ieee80211OFDMInterleaver.h:41
BitVector inet::physicallayer::Ieee80211OFDMInterleaver::deinterleave |
( |
const BitVector & |
bits | ) |
const |
|
overridevirtual |
Implements inet::physicallayer::IInterleaver.
Referenced by inet::physicallayer::Ieee80211OFDMInterleaverModule::deinterleave().
58 throw cRuntimeError(
"interleavedBits length must be a multiple of numberOfCodedBitsPerSymbol = %d",
numberOfCodedBitsPerSymbol);
59 EV_DEBUG <<
"Deinterleaving the following bits: " << interleavedBits << endl;
61 BitVector deinterleavedBits;
62 for (
int i = 0; i < numberOfSymbols; i++) {
66 int firstPerm =
s * floor(j /
s) + (j + (int)floor(16 * j / numberOfCodedBitsPerSymbol)) %
s;
68 int secondPerm = 16 * firstPerm - (numberOfCodedBitsPerSymbol - 1) * floor(16 * firstPerm / numberOfCodedBitsPerSymbol);
70 deinterleavedBits.setBit(shiftedSecondPerm, interleavedBits.getBit(i * numberOfCodedBitsPerSymbol + j));
73 EV_DEBUG <<
"The deinterleaved bits are: " << deinterleavedBits << endl;
74 return deinterleavedBits;
int numberOfCodedBitsPerSymbol
Definition: Ieee80211OFDMInterleaver.h:39
int s
Definition: Ieee80211OFDMInterleaver.h:41
int inet::physicallayer::Ieee80211OFDMInterleaver::getNumberOfCodedBitsPerSubcarrier |
( |
| ) |
const |
|
inline |
int numberOfCodedBitsPerSubcarrier
Definition: Ieee80211OFDMInterleaver.h:40
int inet::physicallayer::Ieee80211OFDMInterleaver::getNumberOfCodedBitsPerSymbol |
( |
| ) |
const |
|
inline |
int numberOfCodedBitsPerSymbol
Definition: Ieee80211OFDMInterleaver.h:39
BitVector inet::physicallayer::Ieee80211OFDMInterleaver::interleave |
( |
const BitVector & |
bits | ) |
const |
|
overridevirtual |
Implements inet::physicallayer::IInterleaver.
Referenced by inet::physicallayer::Ieee80211OFDMInterleaverModule::interleave().
35 throw cRuntimeError(
"deinterleavedBits length = %d must be a multiple of numberOfCodedBitsPerSymbol = %d", deinterleavedBits.getSize(),
numberOfCodedBitsPerSymbol);
37 EV_DEBUG <<
"Interleaving the following bits: " << deinterleavedBits << endl;
38 BitVector interleavedBits;
39 for (
int i = 0; i < numberOfSymbols; i++) {
42 int firstPerm = (numberOfCodedBitsPerSymbol / 16) * (j % 16) + floor(j / 16);
45 int secondPerm =
s * floor(firstPerm /
s)
46 + (firstPerm + numberOfCodedBitsPerSymbol - (int)floor(16 * firstPerm / numberOfCodedBitsPerSymbol)) %
s;
48 interleavedBits.setBit(shiftedSecondPerm, deinterleavedBits.getBit(i * numberOfCodedBitsPerSymbol + j));
51 EV_DEBUG <<
"The interleaved bits are: " << interleavedBits << endl;
52 return interleavedBits;
int numberOfCodedBitsPerSymbol
Definition: Ieee80211OFDMInterleaver.h:39
int s
Definition: Ieee80211OFDMInterleaver.h:41
std::ostream & inet::physicallayer::Ieee80211OFDMInterleaver::printToStream |
( |
std::ostream & |
stream, |
|
|
int |
level |
|
) |
| const |
|
overridevirtual |
Prints this object to the provided output stream.
Function calls to operator<< with pointers or references either const or not are all forwarded to this function.
Reimplemented from inet::physicallayer::IPrintableObject.
Referenced by inet::physicallayer::Ieee80211OFDMInterleaverModule::printToStream().
26 stream <<
"Ieee80211Interleaver";
std::string printObjectToString(const IPrintableObject *object, int level)
Definition: IPrintableObject.h:73
const Ieee80211OFDMInterleaving * interleaving
Definition: Ieee80211OFDMInterleaver.h:42
Definition: IPrintableObject.h:34
int inet::physicallayer::Ieee80211OFDMInterleaver::numberOfCodedBitsPerSubcarrier |
|
protected |
int inet::physicallayer::Ieee80211OFDMInterleaver::numberOfCodedBitsPerSymbol |
|
protected |
int inet::physicallayer::Ieee80211OFDMInterleaver::s |
|
protected |
The documentation for this class was generated from the following files: