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

#include <AdditiveScramblerModule.h>

Inheritance diagram for inet::physicallayer::AdditiveScramblerModule:
inet::physicallayer::IScrambler inet::physicallayer::IPrintableObject

Public Member Functions

virtual ~AdditiveScramblerModule ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const override
 Prints this object to the provided output stream. More...
 
virtual BitVector scramble (const BitVector &bits) const override
 
virtual BitVector descramble (const BitVector &bits) const override
 
virtual const AdditiveScramblinggetScrambling () 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
 
virtual void handleMessage (cMessage *msg) override
 

Protected Attributes

const AdditiveScramblerscrambler
 

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::AdditiveScramblerModule::~AdditiveScramblerModule ( )
virtual
42 {
43  delete scrambler;
44 }
const AdditiveScrambler * scrambler
Definition: AdditiveScramblerModule.h:31

Member Function Documentation

virtual BitVector inet::physicallayer::AdditiveScramblerModule::descramble ( const BitVector bits) const
inlineoverridevirtual

Implements inet::physicallayer::IScrambler.

43 { return scrambler->descramble(bits); }
BitVector descramble(const BitVector &bits) const override
Definition: AdditiveScrambler.h:51
const AdditiveScrambler * scrambler
Definition: AdditiveScramblerModule.h:31
virtual const AdditiveScrambling* inet::physicallayer::AdditiveScramblerModule::getScrambling ( ) const
inlineoverridevirtual

Implements inet::physicallayer::IScrambler.

44 { return scrambler->getScrambling(); }
const AdditiveScrambling * getScrambling() const override
Definition: AdditiveScrambler.h:52
const AdditiveScrambler * scrambler
Definition: AdditiveScramblerModule.h:31
virtual void inet::physicallayer::AdditiveScramblerModule::handleMessage ( cMessage *  msg)
inlineoverrideprotectedvirtual
36 { throw cRuntimeError("This module doesn't handle self messages"); }
void inet::physicallayer::AdditiveScramblerModule::initialize ( int  stage)
overrideprotectedvirtual
27 {
28  if (stage == INITSTAGE_LOCAL) {
29  ShortBitVector seed(par("seed").stringValue());
30  ShortBitVector generatorPolynomial(par("generatorPolynomial").stringValue());
31  const AdditiveScrambling *scrambling = new AdditiveScrambling(seed, generatorPolynomial);
32  scrambler = new AdditiveScrambler(scrambling);
33  }
34 }
Local initializations.
Definition: InitStages.h:35
const AdditiveScrambler * scrambler
Definition: AdditiveScramblerModule.h:31
#define stringValue()
Definition: NedFunctions.cc:24
virtual int inet::physicallayer::AdditiveScramblerModule::numInitStages ( ) const
inlineoverrideprotectedvirtual
34 { return NUM_INIT_STAGES; }
The number of initialization stages.
Definition: InitStages.h:116
std::ostream & inet::physicallayer::AdditiveScramblerModule::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.

37 {
38  return scrambler->printToStream(stream, level);
39 }
const AdditiveScrambler * scrambler
Definition: AdditiveScramblerModule.h:31
virtual std::ostream & printToStream(std::ostream &stream, int level) const override
Prints this object to the provided output stream.
Definition: AdditiveScrambler.cc:25
virtual BitVector inet::physicallayer::AdditiveScramblerModule::scramble ( const BitVector bits) const
inlineoverridevirtual

Implements inet::physicallayer::IScrambler.

42 { return scrambler->scramble(bits); }
const AdditiveScrambler * scrambler
Definition: AdditiveScramblerModule.h:31
BitVector scramble(const BitVector &bits) const override
Definition: AdditiveScrambler.cc:33

Member Data Documentation

const AdditiveScrambler* inet::physicallayer::AdditiveScramblerModule::scrambler
protected

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