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

#include <Ieee80211IdealReceiver.h>

Inheritance diagram for inet::physicallayer::Ieee80211IdealReceiver:
inet::physicallayer::IdealReceiver inet::physicallayer::ReceiverBase inet::physicallayer::IReceiver inet::physicallayer::IPrintableObject

Public Member Functions

 Ieee80211IdealReceiver ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const override
 Prints this object to the provided output stream. More...
 
- Public Member Functions inherited from inet::physicallayer::IdealReceiver
 IdealReceiver ()
 
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...
 
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 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...
 
- 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 W getMinReceptionPower () const override
 Returns the minimum reception power below which successful reception is definitely not possible. 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 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 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 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...
 
virtual ReceptionIndicationcreateReceptionIndication () const
 Returns an empty reception indication (control info). 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 const ReceptionIndicationcomputeReceptionIndication (const ISNIR *snir) const override
 Returns the reception indication (control info) that is sent up to the MAC. More...
 
- Protected Member Functions inherited from inet::physicallayer::ReceiverBase
virtual int numInitStages () const override
 

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
}
 
- Protected Attributes inherited from inet::physicallayer::IdealReceiver
bool ignoreInterference
 

Constructor & Destructor Documentation

inet::physicallayer::Ieee80211IdealReceiver::Ieee80211IdealReceiver ( )
34  :
36 {
37 }
IdealReceiver()
Definition: IdealReceiver.cc:31

Member Function Documentation

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

Returns the reception indication (control info) that is sent up to the MAC.

This function may be called before the reception actually starts at the receiver, thus it must be purely functional and support optimistic parallel computation.

Reimplemented from inet::physicallayer::IdealReceiver.

52 {
53  auto indication = new Ieee80211ReceptionIndication();
54  auto reception = check_and_cast<const IdealReception *>(snir->getReception());
55  auto noise = check_and_cast_nullable<const IdealNoise *>(snir->getNoise());
56  double errorRate = reception->getPower() == IdealReception::POWER_RECEIVABLE && (noise == nullptr || !noise->isInterfering()) ? 0 : 1;
57  indication->setSymbolErrorRate(errorRate);
58  indication->setBitErrorRate(errorRate);
59  indication->setPacketErrorRate(errorRate);
60  // TODO: should match and get the mode and channel from the receiver
61  const Ieee80211TransmissionBase *transmission = check_and_cast<const Ieee80211TransmissionBase *>(snir->getReception()->getTransmission());
62  indication->setMode(transmission->getMode());
63  indication->setChannel(const_cast<Ieee80211Channel *>(transmission->getChannel()));
64  return indication;
65 }
void inet::physicallayer::Ieee80211IdealReceiver::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::physicallayer::IdealReceiver.

40 {
41  if (stage == INITSTAGE_LOCAL) {
42  }
43 }
Local initializations.
Definition: InitStages.h:35
std::ostream & inet::physicallayer::Ieee80211IdealReceiver::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::IdealReceiver.

46 {
47  stream << "Ieee80211IdealReceiver";
48  return IdealReceiver::printToStream(stream, level);
49 }
virtual std::ostream & printToStream(std::ostream &stream, int level) const override
Prints this object to the provided output stream.
Definition: IdealReceiver.cc:44

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