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

#include <Ieee80211UnitDiskReceiver.h>

Inheritance diagram for inet::physicallayer::Ieee80211UnitDiskReceiver:
inet::physicallayer::UnitDiskReceiver inet::physicallayer::ReceiverBase inet::physicallayer::IReceiver inet::IPrintableObject

Public Member Functions

 Ieee80211UnitDiskReceiver ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level, int evFlags=0) const override
 Prints this object to the provided output stream. More...
 
virtual const IReceptionResultcomputeReceptionResult (const IListening *listening, const IReception *reception, const IInterference *interference, const ISnir *snir, const std::vector< const IReceptionDecision * > *decisions) const override
 Returns the complete result of the reception process for the provided reception. More...
 
- Public Member Functions inherited from inet::physicallayer::UnitDiskReceiver
 UnitDiskReceiver ()
 
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 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...
 
- 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 void initialize (int stage) override
 
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 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...
 
- Protected Member Functions inherited from inet::physicallayer::ReceiverBase
virtual int numInitStages () const override
 
virtual W computeSignalPower (const IListening *listening, const ISnir *snir, const IInterference *interference) const
 
virtual PacketcomputeReceivedPacket (const ISnir *snir, bool isReceptionSuccessful) const
 

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

Constructor & Destructor Documentation

◆ Ieee80211UnitDiskReceiver()

inet::physicallayer::Ieee80211UnitDiskReceiver::Ieee80211UnitDiskReceiver ( )
23  :
25 {
26 }

Member Function Documentation

◆ computeIsReceptionPossible() [1/2]

bool inet::physicallayer::Ieee80211UnitDiskReceiver::computeIsReceptionPossible ( const IListening listening,
const IReception reception,
IRadioSignal::SignalPart  part 
) const
overrideprotectedvirtual

Returns whether the reception of the provided part is possible or not.

For example, it might check if the reception power is above sensitivity.

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::UnitDiskReceiver.

47 {
48  auto ieee80211Transmission = dynamic_cast<const Ieee80211UnitDiskTransmission *>(reception->getTransmission());
49  return ieee80211Transmission && /*modeSet->containsMode(ieee80211Transmission->getMode()) &&*/ UnitDiskReceiver::computeIsReceptionPossible(listening, reception, part);
50 }

◆ computeIsReceptionPossible() [2/2]

bool inet::physicallayer::Ieee80211UnitDiskReceiver::computeIsReceptionPossible ( const IListening listening,
const ITransmission transmission 
) const
overrideprotectedvirtual

Returns whether the reception of the provided transmission is possible or not independently of the reception conditions.

For example, it might check if the carrier frequency and the modulation of the transmission matches how the receiver is listening on the medium.

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::ReceiverBase.

41 {
42  auto ieee80211Transmission = dynamic_cast<const Ieee80211UnitDiskTransmission *>(transmission);
43  return ieee80211Transmission && /*modeSet->containsMode(ieee80211Transmission->getMode()) &&*/ ReceiverBase::computeIsReceptionPossible(listening, transmission);
44 }

◆ computeReceptionResult()

const IReceptionResult * inet::physicallayer::Ieee80211UnitDiskReceiver::computeReceptionResult ( const IListening listening,
const IReception reception,
const IInterference interference,
const ISnir snir,
const std::vector< const IReceptionDecision * > *  decisions 
) const
overridevirtual

Returns the complete result of the reception process for the provided reception.

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::UnitDiskReceiver.

53 {
54  auto transmission = check_and_cast<const Ieee80211TransmissionBase *>(reception->getTransmission());
55  auto receptionResult = UnitDiskReceiver::computeReceptionResult(listening, reception, interference, snir, decisions);
56  auto modeInd = const_cast<Packet *>(receptionResult->getPacket())->addTagIfAbsent<Ieee80211ModeInd>();
57  modeInd->setMode(transmission->getMode());
58  auto channelInd = const_cast<Packet *>(receptionResult->getPacket())->addTagIfAbsent<Ieee80211ChannelInd>();
59  channelInd->setChannel(transmission->getChannel());
60  return receptionResult;
61 }

◆ initialize()

void inet::physicallayer::Ieee80211UnitDiskReceiver::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::physicallayer::UnitDiskReceiver.

29 {
30  if (stage == INITSTAGE_LOCAL) {
31  }
32 }

◆ printToStream()

std::ostream & inet::physicallayer::Ieee80211UnitDiskReceiver::printToStream ( std::ostream &  stream,
int  level,
int  evFlags = 0 
) const
overridevirtual

Prints this object to the provided output stream.

Reimplemented from inet::physicallayer::UnitDiskReceiver.

35 {
36  stream << "Ieee80211UnitDiskReceiver";
37  return UnitDiskReceiver::printToStream(stream, level);
38 }

The documentation for this class was generated from the following files:
inet::physicallayer::UnitDiskReceiver::UnitDiskReceiver
UnitDiskReceiver()
Definition: UnitDiskReceiver.cc:22
inet::physicallayer::UnitDiskReceiver::computeReceptionResult
virtual const IReceptionResult * computeReceptionResult(const IListening *listening, const IReception *reception, const IInterference *interference, const ISnir *snir, const std::vector< const IReceptionDecision * > *decisions) const override
Returns the complete result of the reception process for the provided reception.
Definition: UnitDiskReceiver.cc:87
inet::physicallayer::UnitDiskReceiver::computeIsReceptionPossible
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.
Definition: UnitDiskReceiver.cc:43
inet::INITSTAGE_LOCAL
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
inet::physicallayer::ReceiverBase::computeIsReceptionPossible
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 re...
Definition: ReceiverBase.cc:22
inet::physicallayer::UnitDiskReceiver::printToStream
virtual std::ostream & printToStream(std::ostream &stream, int level, int evFlags=0) const override
Prints this object to the provided output stream.
Definition: UnitDiskReceiver.cc:35