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

#include <APSKDemodulator.h>

Inheritance diagram for inet::physicallayer::APSKDemodulator:
inet::physicallayer::IDemodulator inet::physicallayer::IPrintableObject

Public Member Functions

 APSKDemodulator ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const override
 Prints this object to the provided output stream. More...
 
virtual const APSKModulationBasegetModulation () const
 
virtual const IReceptionBitModeldemodulate (const IReceptionSymbolModel *symbolModel) const override
 
- Public Member Functions inherited from inet::physicallayer::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::string getInfoStringRepresentation () const
 
virtual std::string getDetailStringRepresentation () const
 
virtual std::string getDebugStringRepresentation () const
 
virtual std::string getTraceStringRepresentation () const
 
virtual std::string getCompleteStringRepresentation () const
 

Protected Member Functions

virtual int numInitStages () const override
 
virtual void initialize (int stage) override
 

Protected Attributes

const APSKModulationBasemodulation
 

Additional Inherited Members

- Public Types inherited from inet::physicallayer::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 

Constructor & Destructor Documentation

inet::physicallayer::APSKDemodulator::APSKDemodulator ( )
32  :
33  modulation(nullptr)
34 {
35 }
const APSKModulationBase * modulation
Definition: APSKDemodulator.h:35

Member Function Documentation

const IReceptionBitModel * inet::physicallayer::APSKDemodulator::demodulate ( const IReceptionSymbolModel symbolModel) const
overridevirtual

Implements inet::physicallayer::IDemodulator.

52 {
53  const std::vector<const ISymbol *> *symbols = symbolModel->getSymbols();
54  BitVector *bits = new BitVector();
55  for (auto & symbols_i : *symbols) {
56  const APSKSymbol *symbol = dynamic_cast<const APSKSymbol *>(symbols_i);
57  ShortBitVector symbolBits = modulation->demapToBitRepresentation(symbol);
58  for (unsigned int j = 0; j < symbolBits.getSize(); j++)
59  bits->appendBit(symbolBits.getBit(j));
60  }
61  return new ReceptionBitModel(-1, bps(NaN), -1, bps(NaN), bits);
62 }
void appendBit(bool value)
Definition: ShortBitVector.h:66
virtual ShortBitVector demapToBitRepresentation(const APSKSymbol *symbol) const
Definition: APSKModulationBase.cc:77
compose< b, pow< s,-1 > > bps
Definition: Units.h:985
#define NaN
Definition: INETMath.h:103
const APSKModulationBase * modulation
Definition: APSKDemodulator.h:35
virtual const APSKModulationBase* inet::physicallayer::APSKDemodulator::getModulation ( ) const
inlinevirtual
45 { return modulation; }
const APSKModulationBase * modulation
Definition: APSKDemodulator.h:35
void inet::physicallayer::APSKDemodulator::initialize ( int  stage)
overrideprotectedvirtual
38 {
39  if (stage == INITSTAGE_LOCAL)
41 }
static const APSKModulationBase * findModulation(const char *name)
Definition: APSKModulationBase.cc:47
Local initializations.
Definition: InitStages.h:35
const APSKModulationBase * modulation
Definition: APSKDemodulator.h:35
virtual int inet::physicallayer::APSKDemodulator::numInitStages ( ) const
inlineoverrideprotectedvirtual
38 { return NUM_INIT_STAGES; }
The number of initialization stages.
Definition: InitStages.h:116
std::ostream & inet::physicallayer::APSKDemodulator::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.

44 {
45  stream << "APSKDemodulator";
46  if (level <= PRINT_LEVEL_DETAIL)
47  stream << ", modulation = " << printObjectToString(modulation, level + 1);
48  return stream;
49 }
std::string printObjectToString(const IPrintableObject *object, int level)
Definition: IPrintableObject.h:73
const APSKModulationBase * modulation
Definition: APSKDemodulator.h:35

Member Data Documentation

const APSKModulationBase* inet::physicallayer::APSKDemodulator::modulation
protected

The documentation for this class was generated from the following files: