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

#include <SNIRReceiverBase.h>

Inheritance diagram for inet::physicallayer::SNIRReceiverBase:
inet::physicallayer::ReceiverBase inet::physicallayer::IReceiver inet::physicallayer::IPrintableObject inet::physicallayer::APSKLayeredReceiver inet::physicallayer::Ieee80211LayeredOFDMReceiver inet::physicallayer::NarrowbandReceiverBase inet::physicallayer::FlatReceiverBase inet::physicallayer::APSKDimensionalReceiver inet::physicallayer::APSKScalarReceiver inet::physicallayer::Ieee80211ReceiverBase inet::physicallayer::Ieee802154NarrowbandScalarReceiver inet::physicallayer::Ieee80211DimensionalReceiver inet::physicallayer::Ieee80211ScalarReceiver

Public Member Functions

 SNIRReceiverBase ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const override
 Prints this object to the provided output stream. More...
 
virtual double getSNIRThreshold () const
 
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...
 
- 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 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 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::IReceiver
virtual const IListeningcreateListening (const IRadio *radio, const simtime_t startTime, const simtime_t endTime, const Coord startPosition, const Coord endPosition) const =0
 Returns a description of how the receiver is listening on the medium. More...
 
virtual const IListeningDecisioncomputeListeningDecision (const IListening *listening, const IInterference *interference) const =0
 Returns the result of the listening process specifying the reception state of the receiver. 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 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::ReceiverBase
virtual int numInitStages () const override
 

Protected Attributes

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::SNIRReceiverBase::SNIRReceiverBase ( )
26  :
27  ReceiverBase(),
29 {
30 }
#define NaN
Definition: INETMath.h:103
double snirThreshold
Definition: SNIRReceiverBase.h:31
ReceiverBase()
Definition: ReceiverBase.h:35

Member Function Documentation

bool inet::physicallayer::SNIRReceiverBase::computeIsReceptionSuccessful ( const IListening listening,
const IReception reception,
IRadioSignal::SignalPart  part,
const IInterference interference,
const ISNIR snir 
) const
overridevirtual

Returns whether the reception of the provided part is actually successful or failed by the receiver.

For example, it might compute the error rate and draw a random number to make the decision.

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

Implements inet::physicallayer::IReceiver.

Reimplemented in inet::physicallayer::FlatReceiverBase.

Referenced by inet::physicallayer::FlatReceiverBase::computeIsReceptionSuccessful().

47 {
48  return snir->getMin() > snirThreshold;
49 }
double snirThreshold
Definition: SNIRReceiverBase.h:31
const ReceptionIndication * inet::physicallayer::SNIRReceiverBase::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::ReceiverBase.

Reimplemented in inet::physicallayer::FlatReceiverBase, and inet::physicallayer::Ieee80211ReceiverBase.

Referenced by inet::physicallayer::FlatReceiverBase::computeReceptionIndication().

52 {
53  auto indication = const_cast<ReceptionIndication *>(ReceiverBase::computeReceptionIndication(snir));
54  indication->setMinSNIR(snir->getMin());
55  return indication;
56 }
virtual const ReceptionIndication * computeReceptionIndication(const ISNIR *snir) const override
Returns the reception indication (control info) that is sent up to the MAC.
Definition: ReceiverBase.cc:70
virtual double inet::physicallayer::SNIRReceiverBase::getSNIRThreshold ( ) const
inlinevirtual
49 { return snirThreshold; }
double snirThreshold
Definition: SNIRReceiverBase.h:31
void inet::physicallayer::SNIRReceiverBase::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented in inet::physicallayer::Ieee80211LayeredOFDMReceiver, inet::physicallayer::APSKLayeredReceiver, inet::physicallayer::Ieee80211ReceiverBase, inet::physicallayer::NarrowbandReceiverBase, inet::physicallayer::FlatReceiverBase, and inet::physicallayer::Ieee802154NarrowbandScalarReceiver.

Referenced by inet::physicallayer::NarrowbandReceiverBase::initialize().

33 {
34  ReceiverBase::initialize(stage);
35  if (stage == INITSTAGE_LOCAL)
36  snirThreshold = math::dB2fraction(par("snirThreshold"));
37 }
double dB2fraction(double dB)
Converts a dB value to fraction.
Definition: INETMath.h:166
Local initializations.
Definition: InitStages.h:35
double snirThreshold
Definition: SNIRReceiverBase.h:31
std::ostream & inet::physicallayer::SNIRReceiverBase::printToStream ( std::ostream &  stream,
int  level 
) const
overridevirtual

Member Data Documentation

double inet::physicallayer::SNIRReceiverBase::snirThreshold
protected

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