#include <APSKDecoder.h>
inet::physicallayer::APSKDecoder::APSKDecoder |
( |
| ) |
|
const APSKCode * code
Definition: APSKDecoder.h:31
const IInterleaver * deinterleaver
Definition: APSKDecoder.h:34
const IScrambler * descrambler
Definition: APSKDecoder.h:32
const IFECCoder * fecDecoder
Definition: APSKDecoder.h:33
inet::physicallayer::APSKDecoder::~APSKDecoder |
( |
| ) |
|
|
virtual |
const APSKCode * code
Definition: APSKDecoder.h:31
Implements inet::physicallayer::IDecoder.
69 bool isPacketErrorless =
true;
70 BitVector *decodedBits =
new BitVector(*bitModel->getBits());
74 std::pair<BitVector, bool> fecDecodedDataField =
fecDecoder->
decode(*decodedBits);
75 isPacketErrorless = fecDecodedDataField.second;
76 *decodedBits = fecDecodedDataField.first;
80 return new ReceptionPacketModel(
nullptr, decodedBits,
bps(
NaN), -1, isPacketErrorless);
const IInterleaver * deinterleaver
Definition: APSKDecoder.h:34
const IScrambler * descrambler
Definition: APSKDecoder.h:32
compose< b, pow< s,-1 > > bps
Definition: Units.h:985
#define NaN
Definition: INETMath.h:103
const IFECCoder * fecDecoder
Definition: APSKDecoder.h:33
virtual std::pair< BitVector, bool > decode(const BitVector &encodedBits) const =0
virtual BitVector deinterleave(const BitVector &bits) const =0
virtual BitVector descramble(const BitVector &bits) const =0
virtual const APSKCode* inet::physicallayer::APSKDecoder::getCode |
( |
| ) |
const |
|
inlinevirtual |
const APSKCode * code
Definition: APSKDecoder.h:31
void inet::physicallayer::APSKDecoder::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
43 descrambler =
dynamic_cast<const IScrambler *
>(getSubmodule(
"descrambler"));
44 fecDecoder =
dynamic_cast<const IFECCoder *
>(getSubmodule(
"fecDecoder"));
45 deinterleaver =
dynamic_cast<const IInterleaver *
>(getSubmodule(
"deinterleaver"));
51 code =
new APSKCode(forwardErrorCorrection, interleaving, scrambling);
const APSKCode * code
Definition: APSKDecoder.h:31
Initialization of the physical layer of protocol stacks.
Definition: InitStages.h:53
virtual const IInterleaving * getInterleaving() const =0
const IInterleaver * deinterleaver
Definition: APSKDecoder.h:34
const IScrambler * descrambler
Definition: APSKDecoder.h:32
virtual const IScrambling * getScrambling() const =0
Local initializations.
Definition: InitStages.h:35
virtual const IForwardErrorCorrection * getForwardErrorCorrection() const =0
const IFECCoder * fecDecoder
Definition: APSKDecoder.h:33
virtual int inet::physicallayer::APSKDecoder::numInitStages |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
The number of initialization stages.
Definition: InitStages.h:116
std::ostream & inet::physicallayer::APSKDecoder::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.
57 stream <<
"APSKDecoder";
59 stream <<
", code = " <<
code;
const APSKCode * code
Definition: APSKDecoder.h:31
std::string printObjectToString(const IPrintableObject *object, int level)
Definition: IPrintableObject.h:73
const IInterleaver * deinterleaver
Definition: APSKDecoder.h:34
const IScrambler * descrambler
Definition: APSKDecoder.h:32
Definition: IPrintableObject.h:34
const IFECCoder * fecDecoder
Definition: APSKDecoder.h:33
Definition: IPrintableObject.h:36
const APSKCode* inet::physicallayer::APSKDecoder::code |
|
protected |
const IInterleaver* inet::physicallayer::APSKDecoder::deinterleaver |
|
protected |
const IScrambler* inet::physicallayer::APSKDecoder::descrambler |
|
protected |
const IFECCoder* inet::physicallayer::APSKDecoder::fecDecoder |
|
protected |
The documentation for this class was generated from the following files: