INET Framework for OMNeT++/OMNEST
inet::physicallayer::Ieee80211OfdmEncoderModule Class Reference

#include <Ieee80211OfdmEncoderModule.h>

Inheritance diagram for inet::physicallayer::Ieee80211OfdmEncoderModule:
inet::physicallayer::IEncoder inet::IPrintableObject

Public Member Functions

virtual ~Ieee80211OfdmEncoderModule ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level, int evFlags=0) const override
 Prints this object to the provided output stream. More...
 
const Ieee80211OfdmCodegetCode () const override
 
virtual const ITransmissionBitModelencode (const ITransmissionPacketModel *packetModel) const override
 
- Public Member Functions inherited from inet::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::string printToString () const
 
virtual std::string printToString (int level, int evFlags=0) const
 
virtual std::string getInfoStringRepresentation (int evFlags=0) const
 
virtual std::string getDetailStringRepresentation (int evFlags=0) const
 
virtual std::string getDebugStringRepresentation (int evFlags=0) const
 
virtual std::string getTraceStringRepresentation (int evFlags=0) const
 
virtual std::string getCompleteStringRepresentation (int evFlags=0) const
 

Protected Member Functions

virtual int numInitStages () const override
 
virtual void initialize (int stage) override
 
virtual void handleMessage (cMessage *msg) override
 

Protected Attributes

const Ieee80211OfdmEncoderencoder = nullptr
 
const IScramblerscrambler = nullptr
 
const IFecCoderconvolutionalCoder = nullptr
 
const IInterleaverinterleaver = nullptr
 
const Ieee80211OfdmCodecode = nullptr
 

Additional Inherited Members

- Public Types inherited from inet::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 
enum  PrintFlag { PRINT_FLAG_FORMATTED = (1 << 0), PRINT_FLAG_MULTILINE = (1 << 1) }
 

Constructor & Destructor Documentation

◆ ~Ieee80211OfdmEncoderModule()

inet::physicallayer::Ieee80211OfdmEncoderModule::~Ieee80211OfdmEncoderModule ( )
virtual
37 {
38  delete code;
39  delete encoder;
40 }

Member Function Documentation

◆ encode()

const ITransmissionBitModel * inet::physicallayer::Ieee80211OfdmEncoderModule::encode ( const ITransmissionPacketModel packetModel) const
overridevirtual

Implements inet::physicallayer::IEncoder.

32 {
33  return encoder->encode(packetModel);
34 }

◆ getCode()

const Ieee80211OfdmCode* inet::physicallayer::Ieee80211OfdmEncoderModule::getCode ( ) const
inlineoverridevirtual

◆ handleMessage()

virtual void inet::physicallayer::Ieee80211OfdmEncoderModule::handleMessage ( cMessage *  msg)
inlineoverrideprotectedvirtual
29 { throw cRuntimeError("This module doesn't handle self messages"); }

◆ initialize()

void inet::physicallayer::Ieee80211OfdmEncoderModule::initialize ( int  stage)
overrideprotectedvirtual
16 {
17  if (stage == INITSTAGE_LOCAL) {
18  scrambler = dynamic_cast<IScrambler *>(getSubmodule("scrambler"));
19  convolutionalCoder = dynamic_cast<IFecCoder *>(getSubmodule("fecEncoder"));
20  interleaver = dynamic_cast<IInterleaver *>(getSubmodule("interleaver"));
21  }
22  else if (stage == INITSTAGE_PHYSICAL_LAYER) {
23  const ConvolutionalCode *convolutionalCode = convolutionalCoder ? check_and_cast<const ConvolutionalCode *>(convolutionalCoder->getForwardErrorCorrection()) : nullptr;
24  const Ieee80211OfdmInterleaving *interleaving = interleaver ? check_and_cast<const Ieee80211OfdmInterleaving *>(interleaver->getInterleaving()) : nullptr;
25  const AdditiveScrambling *scrambling = scrambler ? check_and_cast<const AdditiveScrambling *>(scrambler->getScrambling()) : nullptr;
26  code = new Ieee80211OfdmCode(convolutionalCode, interleaving, scrambling);
27  encoder = new Ieee80211OfdmEncoder(code);
28  }
29 }

◆ numInitStages()

virtual int inet::physicallayer::Ieee80211OfdmEncoderModule::numInitStages ( ) const
inlineoverrideprotectedvirtual
27 { return NUM_INIT_STAGES; }

◆ printToStream()

virtual std::ostream& inet::physicallayer::Ieee80211OfdmEncoderModule::printToStream ( std::ostream &  stream,
int  level,
int  evFlags = 0 
) const
inlineoverridevirtual

Prints this object to the provided output stream.

Reimplemented from inet::IPrintableObject.

34 { return encoder->printToStream(stream, level); }

Member Data Documentation

◆ code

const Ieee80211OfdmCode* inet::physicallayer::Ieee80211OfdmEncoderModule::code = nullptr
protected

◆ convolutionalCoder

const IFecCoder* inet::physicallayer::Ieee80211OfdmEncoderModule::convolutionalCoder = nullptr
protected

Referenced by initialize().

◆ encoder

const Ieee80211OfdmEncoder* inet::physicallayer::Ieee80211OfdmEncoderModule::encoder = nullptr
protected

◆ interleaver

const IInterleaver* inet::physicallayer::Ieee80211OfdmEncoderModule::interleaver = nullptr
protected

Referenced by initialize().

◆ scrambler

const IScrambler* inet::physicallayer::Ieee80211OfdmEncoderModule::scrambler = nullptr
protected

Referenced by initialize().


The documentation for this class was generated from the following files:
inet::physicallayer::Ieee80211OfdmEncoderModule::code
const Ieee80211OfdmCode * code
Definition: Ieee80211OfdmEncoderModule.h:24
inet::physicallayer::Ieee80211OfdmEncoder::printToStream
virtual std::ostream & printToStream(std::ostream &stream, int level, int evFlags=0) const override
Prints this object to the provided output stream.
Definition: Ieee80211OfdmEncoder.cc:26
inet::physicallayer::Ieee80211OfdmEncoderModule::interleaver
const IInterleaver * interleaver
Definition: Ieee80211OfdmEncoderModule.h:23
inet::INITSTAGE_LOCAL
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
inet::physicallayer::Ieee80211OfdmEncoderModule::encoder
const Ieee80211OfdmEncoder * encoder
Definition: Ieee80211OfdmEncoderModule.h:20
inet::INITSTAGE_PHYSICAL_LAYER
INET_API InitStage INITSTAGE_PHYSICAL_LAYER
Initialization of physical layer protocols includes:
inet::physicallayer::Ieee80211OfdmEncoderModule::scrambler
const IScrambler * scrambler
Definition: Ieee80211OfdmEncoderModule.h:21
NUM_INIT_STAGES
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
inet::physicallayer::Ieee80211OfdmEncoder::encode
virtual const ITransmissionBitModel * encode(const ITransmissionPacketModel *packetModel) const override
Definition: Ieee80211OfdmEncoder.cc:37
inet::physicallayer::IInterleaver::getInterleaving
virtual const IInterleaving * getInterleaving() const =0
inet::physicallayer::Ieee80211OfdmEncoderModule::convolutionalCoder
const IFecCoder * convolutionalCoder
Definition: Ieee80211OfdmEncoderModule.h:22
inet::physicallayer::IFecCoder::getForwardErrorCorrection
virtual const IForwardErrorCorrection * getForwardErrorCorrection() const =0
inet::physicallayer::IScrambler::getScrambling
virtual const IScrambling * getScrambling() const =0