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

#include <Ieee80211ReceiverBase.h>

Inheritance diagram for inet::physicallayer::Ieee80211ReceiverBase:
inet::physicallayer::FlatReceiverBase inet::physicallayer::NarrowbandReceiverBase inet::physicallayer::SNIRReceiverBase inet::physicallayer::ReceiverBase inet::physicallayer::IReceiver inet::physicallayer::IPrintableObject inet::physicallayer::Ieee80211DimensionalReceiver inet::physicallayer::Ieee80211ScalarReceiver

Public Member Functions

 Ieee80211ReceiverBase ()
 
virtual ~Ieee80211ReceiverBase ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const override
 Prints this object to the provided output stream. More...
 
virtual void setModeSet (const Ieee80211ModeSet *modeSet)
 
virtual void setBand (const IIeee80211Band *band)
 
virtual void setChannel (const Ieee80211Channel *channel)
 
virtual void setChannelNumber (int channelNumber)
 
- Public Member Functions inherited from inet::physicallayer::FlatReceiverBase
 FlatReceiverBase ()
 
virtual W getMinReceptionPower () const override
 Returns the minimum reception power below which successful reception is definitely not possible. More...
 
virtual const IListeningDecisioncomputeListeningDecision (const IListening *listening, const IInterference *interference) const override
 Returns the result of the listening process specifying the reception state of the receiver. More...
 
virtual const IErrorModelgetErrorModel () const
 
virtual W getEnergyDetection () const
 
virtual void setEnergyDetection (W energyDetection)
 
virtual W getSensitivity () const
 
virtual void setSensitivity (W sensitivity)
 
- Public Member Functions inherited from inet::physicallayer::NarrowbandReceiverBase
 NarrowbandReceiverBase ()
 
virtual const IListeningcreateListening (const IRadio *radio, const simtime_t startTime, const simtime_t endTime, const Coord startPosition, const Coord endPosition) const override
 Returns a description of how the receiver is listening on the medium. More...
 
virtual bool computeIsReceptionPossible (const IListening *listening, const ITransmission *transmission) const override
 Returns whether the reception of the provided transmission is possible or not independently of the reception conditions. More...
 
virtual const IReceptionDecisioncomputeReceptionDecision (const IListening *listening, const IReception *reception, IRadioSignal::SignalPart part, const IInterference *interference, const ISNIR *snir) const override
 Returns the reception decision for the transmission part that specifies whether the reception is possible, attempted, and successful. More...
 
virtual const IModulationgetModulation () const
 
virtual void setModulation (const IModulation *modulation)
 
virtual Hz getCarrierFrequency () const
 
virtual void setCarrierFrequency (Hz carrierFrequency)
 
virtual Hz getBandwidth () const
 
virtual void setBandwidth (Hz bandwidth)
 
- Public Member Functions inherited from inet::physicallayer::SNIRReceiverBase
 SNIRReceiverBase ()
 
virtual double getSNIRThreshold () const
 
- Public Member Functions inherited from inet::physicallayer::ReceiverBase
 ReceiverBase ()
 
virtual W getMinInterferencePower () const override
 Returns the minimum interference power below which receptions are to be ignored while computing the interference. More...
 
virtual bool computeIsReceptionAttempted (const IListening *listening, const IReception *reception, IRadioSignal::SignalPart part, const IInterference *interference) const override
 Returns whether the reception of the provided part is actually attempted or ignored by the receiver. More...
 
virtual const IReceptionResultcomputeReceptionResult (const IListening *listening, const IReception *reception, const IInterference *interference, const ISNIR *snir) const override
 Returns the complete result of the reception process for the provided reception. More...
 
- 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 void initialize (int stage) override
 
virtual ReceptionIndicationcreateReceptionIndication () const override
 Returns an empty reception indication (control info). More...
 
virtual const ReceptionIndicationcomputeReceptionIndication (const ISNIR *snir) const override
 Returns the physical properties of the reception including noise and signal related measures, error probabilities, actual error counts, etc. More...
 
- Protected Member Functions inherited from inet::physicallayer::FlatReceiverBase
virtual bool computeIsReceptionPossible (const IListening *listening, const IReception *reception, IRadioSignal::SignalPart part) const override
 Returns whether the reception of the provided part is possible or not. More...
 
virtual bool computeIsReceptionSuccessful (const IListening *listening, const IReception *reception, IRadioSignal::SignalPart part, const IInterference *interference, const ISNIR *snir) const override
 Returns whether the reception of the provided part is actually successful or failed by the receiver. More...
 
- Protected Member Functions inherited from inet::physicallayer::ReceiverBase
virtual int numInitStages () const override
 

Protected Attributes

const Ieee80211ModeSetmodeSet
 
const IIeee80211Bandband
 
const Ieee80211Channelchannel
 
- Protected Attributes inherited from inet::physicallayer::FlatReceiverBase
const IErrorModelerrorModel
 
W energyDetection
 
W sensitivity
 
- Protected Attributes inherited from inet::physicallayer::NarrowbandReceiverBase
const IModulationmodulation
 
Hz carrierFrequency
 
Hz bandwidth
 
- Protected Attributes inherited from inet::physicallayer::SNIRReceiverBase
double snirThreshold
 

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::Ieee80211ReceiverBase::Ieee80211ReceiverBase ( )
27  :
28  modeSet(nullptr),
29  band(nullptr),
30  channel(nullptr)
31 {
32 }
const IIeee80211Band * band
Definition: Ieee80211ReceiverBase.h:34
const Ieee80211Channel * channel
Definition: Ieee80211ReceiverBase.h:35
const Ieee80211ModeSet * modeSet
Definition: Ieee80211ReceiverBase.h:33
inet::physicallayer::Ieee80211ReceiverBase::~Ieee80211ReceiverBase ( )
virtual
35 {
36  delete channel;
37 }
const Ieee80211Channel * channel
Definition: Ieee80211ReceiverBase.h:35

Member Function Documentation

const ReceptionIndication * inet::physicallayer::Ieee80211ReceiverBase::computeReceptionIndication ( const ISNIR snir) const
overrideprotectedvirtual

Returns the physical properties of the reception including noise and signal related measures, error probabilities, actual error counts, etc.

This function must be purely functional and support optimistic parallel computation.

Reimplemented from inet::physicallayer::FlatReceiverBase.

98 {
99  Ieee80211ReceptionIndication *indication = check_and_cast<Ieee80211ReceptionIndication *>(const_cast<ReceptionIndication *>(FlatReceiverBase::computeReceptionIndication(snir)));
100 
101  const Ieee80211TransmissionBase *transmission = check_and_cast<const Ieee80211TransmissionBase *>(snir->getReception()->getTransmission());
102  //FIXME fill indication
103  indication->setMode(transmission->getMode());
104  indication->setChannel(const_cast<Ieee80211Channel *>(transmission->getChannel()));
105  //indication->setSnr();
106  //indication->setLossRate();
107  //indication->setRecPow();
108  //indication->setAirtimeMetric();
109  //indication->setTestFrameDuration();
110  //indication->setTestFrameError());
111  //indication->setTestFrameSize();
112 
113  return indication;
114 }
virtual const ReceptionIndication * computeReceptionIndication(const ISNIR *snir) const override
Returns the physical properties of the reception including noise and signal related measures...
Definition: FlatReceiverBase.cc:104
ReceptionIndication * inet::physicallayer::Ieee80211ReceiverBase::createReceptionIndication ( ) const
overrideprotectedvirtual

Returns an empty reception indication (control info).

This function called from computeReceptionIndication().

Reimplemented from inet::physicallayer::ReceiverBase.

93 {
94  return new Ieee80211ReceptionIndication();
95 }
void inet::physicallayer::Ieee80211ReceiverBase::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::physicallayer::FlatReceiverBase.

40 {
42  if (stage == INITSTAGE_LOCAL) {
43  const char *opMode = par("opMode");
44  setModeSet(*opMode ? Ieee80211ModeSet::getModeSet(opMode) : nullptr);
45  const char *bandName = par("bandName");
46  setBand(*bandName != '\0' ? Ieee80211CompliantBands::getBand(bandName) : nullptr);
47  int channelNumber = par("channelNumber");
48  if (channelNumber != -1)
49  setChannelNumber(channelNumber);
50  }
51 }
virtual void initialize(int stage) override
Definition: FlatReceiverBase.cc:39
virtual void setBand(const IIeee80211Band *band)
Definition: Ieee80211ReceiverBase.cc:68
static const Ieee80211ModeSet * getModeSet(const char *mode)
Definition: Ieee80211ModeSet.cc:285
virtual void setModeSet(const Ieee80211ModeSet *modeSet)
Definition: Ieee80211ReceiverBase.cc:63
Local initializations.
Definition: InitStages.h:35
virtual void setChannelNumber(int channelNumber)
Definition: Ieee80211ReceiverBase.cc:86
static const IIeee80211Band * getBand(const char *name)
Definition: Ieee80211Band.cc:89
std::ostream & inet::physicallayer::Ieee80211ReceiverBase::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::FlatReceiverBase.

Reimplemented in inet::physicallayer::Ieee80211DimensionalReceiver, and inet::physicallayer::Ieee80211ScalarReceiver.

Referenced by inet::physicallayer::Ieee80211DimensionalReceiver::printToStream(), and inet::physicallayer::Ieee80211ScalarReceiver::printToStream().

54 {
55  if (level <= PRINT_LEVEL_TRACE)
56  stream << ", modeSet = " << printObjectToString(modeSet, level + 1)
57  << ", band = " << printObjectToString(band, level + 1);
58  if (level <= PRINT_LEVEL_INFO)
59  stream << ", channel = " << printObjectToString(channel, level + 1);
60  return FlatReceiverBase::printToStream(stream, level);
61 }
std::string printObjectToString(const IPrintableObject *object, int level)
Definition: IPrintableObject.h:73
const IIeee80211Band * band
Definition: Ieee80211ReceiverBase.h:34
const Ieee80211Channel * channel
Definition: Ieee80211ReceiverBase.h:35
virtual std::ostream & printToStream(std::ostream &stream, int level) const override
Prints this object to the provided output stream.
Definition: FlatReceiverBase.cc:49
const Ieee80211ModeSet * modeSet
Definition: Ieee80211ReceiverBase.h:33
void inet::physicallayer::Ieee80211ReceiverBase::setBand ( const IIeee80211Band band)
virtual

Referenced by initialize(), and inet::physicallayer::Ieee80211Radio::setBand().

69 {
70  if (this->band != band) {
71  this->band = band;
72  if (channel != nullptr)
73  setChannel(new Ieee80211Channel(band, channel->getChannelNumber()));
74  }
75 }
const IIeee80211Band * band
Definition: Ieee80211ReceiverBase.h:34
const Ieee80211Channel * channel
Definition: Ieee80211ReceiverBase.h:35
virtual void setChannel(const Ieee80211Channel *channel)
Definition: Ieee80211ReceiverBase.cc:77
virtual int getChannelNumber() const
Definition: Ieee80211Channel.h:39
void inet::physicallayer::Ieee80211ReceiverBase::setChannel ( const Ieee80211Channel channel)
virtual

Referenced by setBand(), inet::physicallayer::Ieee80211Radio::setChannel(), and setChannelNumber().

78 {
79  if (this->channel != channel) {
80  delete this->channel;
81  this->channel = channel;
83  }
84 }
virtual Hz getCenterFrequency() const
Definition: Ieee80211Channel.h:40
virtual void setCarrierFrequency(Hz carrierFrequency)
Definition: NarrowbandReceiverBase.h:55
const Ieee80211Channel * channel
Definition: Ieee80211ReceiverBase.h:35
void inet::physicallayer::Ieee80211ReceiverBase::setChannelNumber ( int  channelNumber)
virtual

Referenced by initialize(), and inet::physicallayer::Ieee80211Radio::setChannelNumber().

87 {
88  if (channel == nullptr || channelNumber != channel->getChannelNumber())
89  setChannel(new Ieee80211Channel(band, channelNumber));
90 }
const IIeee80211Band * band
Definition: Ieee80211ReceiverBase.h:34
const Ieee80211Channel * channel
Definition: Ieee80211ReceiverBase.h:35
virtual void setChannel(const Ieee80211Channel *channel)
Definition: Ieee80211ReceiverBase.cc:77
virtual int getChannelNumber() const
Definition: Ieee80211Channel.h:39
void inet::physicallayer::Ieee80211ReceiverBase::setModeSet ( const Ieee80211ModeSet modeSet)
virtual

Referenced by initialize(), and inet::physicallayer::Ieee80211Radio::setModeSet().

64 {
65  this->modeSet = modeSet;
66 }
const Ieee80211ModeSet * modeSet
Definition: Ieee80211ReceiverBase.h:33

Member Data Documentation

const IIeee80211Band* inet::physicallayer::Ieee80211ReceiverBase::band
protected
const Ieee80211Channel* inet::physicallayer::Ieee80211ReceiverBase::channel
protected

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