|
INET Framework for OMNeT++/OMNEST
|
#include <FlatReceiverBase.h>
|
| | FlatReceiverBase () |
| |
| virtual std::ostream & | printToStream (std::ostream &stream, int level, int evFlags=0) const override |
| | Prints this object to the provided output stream. More...
|
| |
| virtual W | getMinReceptionPower () const override |
| | Returns the minimum reception power below which successful reception is definitely not possible. More...
|
| |
| virtual const IListeningDecision * | computeListeningDecision (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 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. More...
|
| |
| virtual const IErrorModel * | getErrorModel () 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 IListening * | createListening (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 IReceptionDecision * | computeReceptionDecision (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 IModulation * | getModulation () const |
| |
| virtual void | setModulation (const IModulation *modulation) |
| |
| virtual Hz | getCenterFrequency () const |
| |
| virtual void | setCenterFrequency (Hz centerFrequency) |
| |
| virtual Hz | getBandwidth () const |
| |
| virtual void | setBandwidth (Hz bandwidth) |
| |
| virtual double | getSNIRThreshold () const |
| |
| | 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 | ~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 |
| |
|
| virtual void | initialize (int stage) override |
| |
| 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 Packet * | computeReceivedPacket (const ISnir *snir, bool isReceptionSuccessful) const override |
| |
| virtual bool | computeIsReceptionPossible (const IListening *listening, const ITransmission *transmission) const override |
| |
| virtual bool | computeIsReceptionPossible (const IListening *listening, const IReception *reception, IRadioSignal::SignalPart part) const override |
| |
| virtual int | numInitStages () const override |
| |
| virtual W | computeSignalPower (const IListening *listening, const ISnir *snir, const IInterference *interference) const |
| |
◆ FlatReceiverBase()
| inet::physicallayer::FlatReceiverBase::FlatReceiverBase |
( |
| ) |
|
◆ computeIsReceptionPossible() [1/3]
| bool inet::physicallayer::NarrowbandReceiverBase::computeIsReceptionPossible |
|
overrideprotected |
65 const BandListening *bandListening = check_and_cast<const BandListening *>(listening);
66 const NarrowbandReceptionBase *narrowbandReception = check_and_cast<const NarrowbandReceptionBase *>(reception);
67 if (bandListening->getCenterFrequency() != narrowbandReception->getCenterFrequency() || bandListening->getBandwidth() < narrowbandReception->getBandwidth()) {
68 EV_DEBUG <<
"Computing whether reception is possible: listening and reception bands are different -> reception is impossible" << endl;
◆ computeIsReceptionPossible() [2/3]
◆ computeIsReceptionPossible() [3/3]
| bool inet::physicallayer::NarrowbandReceiverBase::computeIsReceptionPossible |
|
overrideprotected |
58 const NarrowbandTransmissionBase *narrowbandTransmission = check_and_cast<const NarrowbandTransmissionBase *>(transmission);
59 return centerFrequency == narrowbandTransmission->getCenterFrequency() &&
bandwidth >= narrowbandTransmission->getBandwidth();
◆ computeIsReceptionSuccessful()
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.
Reimplemented from inet::physicallayer::SnirReceiverBase.
87 if (packetErrorRate == 0.0)
89 else if (packetErrorRate == 1.0)
92 ASSERT(0.0 < packetErrorRate && packetErrorRate <= 1.0);
93 return dblrand() > packetErrorRate;
◆ computeListeningDecision()
Returns the result of the listening process specifying the reception state of the receiver.
This function must be purely functional and support optimistic parallel computation.
Implements inet::physicallayer::IReceiver.
52 const IRadio *receiver = listening->getReceiver();
53 const IRadioMedium *radioMedium = receiver->getMedium();
54 const IAnalogModel *analogModel = radioMedium->getAnalogModel();
55 const INoise *noise = analogModel->computeNoise(listening, interference);
56 const NarrowbandNoiseBase *narrowbandNoise = check_and_cast<const NarrowbandNoiseBase *>(noise);
57 W maxPower = narrowbandNoise->computeMaxPower(listening->getStartTime(), listening->getEndTime());
60 EV_DEBUG <<
"Computing whether listening is possible: maximum power = " << maxPower <<
", energy detection = " <<
energyDetection <<
" -> listening is " << (isListeningPossible ?
"possible" :
"impossible") << endl;
61 return new ListeningDecision(listening, isListeningPossible);
◆ computeReceivedPacket()
| Packet * inet::physicallayer::FlatReceiverBase::computeReceivedPacket |
( |
const ISnir * |
snir, |
|
|
bool |
isReceptionSuccessful |
|
) |
| const |
|
overrideprotectedvirtual |
◆ computeReceptionResult()
◆ getEnergyDetection()
| virtual W inet::physicallayer::FlatReceiverBase::getEnergyDetection |
( |
| ) |
const |
|
inlinevirtual |
◆ getErrorModel()
| virtual const IErrorModel* inet::physicallayer::FlatReceiverBase::getErrorModel |
( |
| ) |
const |
|
inlinevirtual |
◆ getMinReceptionPower()
| virtual W inet::physicallayer::FlatReceiverBase::getMinReceptionPower |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns the minimum reception power below which successful reception is definitely not possible.
Returns a value in the range [0, +infinity) or NaN if unspecified.
Reimplemented from inet::physicallayer::ReceiverBase.
◆ getSensitivity()
| virtual W inet::physicallayer::FlatReceiverBase::getSensitivity |
( |
| ) |
const |
|
inlinevirtual |
◆ initialize()
| void inet::physicallayer::FlatReceiverBase::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
◆ printToStream()
| std::ostream & inet::physicallayer::FlatReceiverBase::printToStream |
( |
std::ostream & |
stream, |
|
|
int |
level, |
|
|
int |
evFlags = 0 |
|
) |
| const |
|
overridevirtual |
Prints this object to the provided output stream.
Reimplemented from inet::physicallayer::NarrowbandReceiverBase.
Reimplemented in inet::physicallayer::Ieee80211ReceiverBase, inet::physicallayer::ApskDimensionalReceiver, inet::physicallayer::ApskScalarReceiver, inet::physicallayer::Ieee80211DimensionalReceiver, inet::physicallayer::Ieee80211ScalarReceiver, inet::physicallayer::Ieee802154NarrowbandDimensionalReceiver, and inet::physicallayer::Ieee802154NarrowbandScalarReceiver.
Referenced by inet::physicallayer::ApskDimensionalReceiver::printToStream(), inet::physicallayer::Ieee802154NarrowbandScalarReceiver::printToStream(), inet::physicallayer::Ieee802154NarrowbandDimensionalReceiver::printToStream(), inet::physicallayer::ApskScalarReceiver::printToStream(), and inet::physicallayer::Ieee80211ReceiverBase::printToStream().
◆ setEnergyDetection()
| virtual void inet::physicallayer::FlatReceiverBase::setEnergyDetection |
( |
W |
energyDetection | ) |
|
|
inlinevirtual |
◆ setSensitivity()
| virtual void inet::physicallayer::FlatReceiverBase::setSensitivity |
( |
W |
sensitivity | ) |
|
|
inlinevirtual |
◆ energyDetection
| W inet::physicallayer::FlatReceiverBase::energyDetection |
|
protected |
◆ errorModel
| const IErrorModel* inet::physicallayer::FlatReceiverBase::errorModel |
|
protected |
◆ sensitivity
| W inet::physicallayer::FlatReceiverBase::sensitivity |
|
protected |
The documentation for this class was generated from the following files:
const IErrorModel * errorModel
Definition: FlatReceiverBase.h:21
Hz centerFrequency
Definition: NarrowbandReceiverBase.h:23
virtual double computeBitErrorRate(const ISnir *snir, IRadioSignal::SignalPart part) const =0
Returns the bit error rate based on SNIR, modulation, FEC encoding and any other physical layer chara...
@ SIGNAL_PART_WHOLE
Definition: IRadioSignal.h:26
virtual double computePacketErrorRate(const ISnir *snir, IRadioSignal::SignalPart part) const =0
Returns the packet error rate based on SNIR, modulation, FEC encoding and any other physical layer ch...
NarrowbandReceiverBase()
Definition: NarrowbandReceiverBase.cc:23
@ PRINT_LEVEL_INFO
Definition: IPrintableObject.h:25
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.
Definition: SnirReceiverBase.cc:39
double dBmW2mW(double dBm)
Converts a dBmW value to mW.
Definition: INETMath.h:163
Hz bandwidth
Definition: NarrowbandReceiverBase.h:24
compose< J, pow< s, -1 > > W
Definition: Units.h:939
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: NarrowbandReceiverBase.cc:55
milli< W >::type mW
Definition: Units.h:1080
std::string printFieldToString(const IPrintableObject *object, int level, int evFlags=0)
Definition: IPrintableObject.h:98
virtual double computeSymbolErrorRate(const ISnir *snir, IRadioSignal::SignalPart part) const =0
Returns the symbol error rate based on SNIR, modulation, and any other physical layer characteristics...
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: ReceiverBase.cc:72
#define EV_FIELD(...)
Definition: INETDefs.h:112
virtual Packet * computeReceivedPacket(const ISnir *snir, bool isReceptionSuccessful) const
Definition: ReceiverBase.cc:106
W energyDetection
Definition: FlatReceiverBase.h:22
#define NaN
Definition: INETMath.h:91
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
@ PRINT_LEVEL_TRACE
Definition: IPrintableObject.h:22
int evFlags
Definition: INETDefs.cc:12
virtual void initialize(int stage) override
Definition: NarrowbandReceiverBase.cc:31
virtual std::ostream & printToStream(std::ostream &stream, int level, int evFlags=0) const override
Prints this object to the provided output stream.
Definition: NarrowbandReceiverBase.cc:41
W sensitivity
Definition: FlatReceiverBase.h:23
virtual Packet * computeCorruptedPacket(const ISnir *snir) const =0