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

#include <ReceptionDecision.h>

Inheritance diagram for inet::physicallayer::ReceptionDecision:
inet::physicallayer::IReceptionDecision inet::IPrintableObject

Public Member Functions

 ReceptionDecision (const IReception *reception, IRadioSignal::SignalPart part, bool isReceptionPossible, bool isReceptionAttempted, bool isReceptionSuccessful)
 
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 IReceptiongetReception () const override
 Returns the corresponding reception that also specifies the receiver and the received transmission. More...
 
virtual IRadioSignal::SignalPart getSignalPart () const override
 Returns the signal part of this decision. More...
 
virtual bool isReceptionPossible () const override
 Returns whether reception was possible according to the physical properties of the received radio signal. More...
 
virtual bool isReceptionAttempted () const override
 Returns whether the receiver decided to attempt the reception or it decided to ignore it. More...
 
virtual bool isReceptionSuccessful () const override
 Returns whether the reception was completely successful or not. 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 Attributes

const IReceptionreception
 
IRadioSignal::SignalPart part
 
const bool isReceptionPossible_
 
const bool isReceptionAttempted_
 
const bool isReceptionSuccessful_
 

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) }
 

Constructor & Destructor Documentation

◆ ReceptionDecision()

inet::physicallayer::ReceptionDecision::ReceptionDecision ( const IReception reception,
IRadioSignal::SignalPart  part,
bool  isReceptionPossible,
bool  isReceptionAttempted,
bool  isReceptionSuccessful 
)

Member Function Documentation

◆ getReception()

virtual const IReception* inet::physicallayer::ReceptionDecision::getReception ( ) const
inlineoverridevirtual

Returns the corresponding reception that also specifies the receiver and the received transmission.

This function never returns nullptr.

Implements inet::physicallayer::IReceptionDecision.

30 { return reception; }

◆ getSignalPart()

virtual IRadioSignal::SignalPart inet::physicallayer::ReceptionDecision::getSignalPart ( ) const
inlineoverridevirtual

Returns the signal part of this decision.

Implements inet::physicallayer::IReceptionDecision.

31 { return part; }

◆ isReceptionAttempted()

virtual bool inet::physicallayer::ReceptionDecision::isReceptionAttempted ( ) const
inlineoverridevirtual

Returns whether the receiver decided to attempt the reception or it decided to ignore it.

Implements inet::physicallayer::IReceptionDecision.

34 { return isReceptionAttempted_; }

◆ isReceptionPossible()

virtual bool inet::physicallayer::ReceptionDecision::isReceptionPossible ( ) const
inlineoverridevirtual

Returns whether reception was possible according to the physical properties of the received radio signal.

Implements inet::physicallayer::IReceptionDecision.

33 { return isReceptionPossible_; }

◆ isReceptionSuccessful()

virtual bool inet::physicallayer::ReceptionDecision::isReceptionSuccessful ( ) const
inlineoverridevirtual

Returns whether the reception was completely successful or not.

Implements inet::physicallayer::IReceptionDecision.

35 { return isReceptionSuccessful_; }

◆ printToStream()

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

Prints this object to the provided output stream.

Reimplemented from inet::IPrintableObject.

23 {
24  stream << "ReceptionDecision";
25  if (level <= PRINT_LEVEL_DETAIL)
26  stream << (isReceptionPossible_ ? ", possible" : ", impossible")
27  << (isReceptionAttempted_ ? ", attempted" : ", ignored")
28  << (isReceptionSuccessful_ ? ", successful" : ", unsuccessful");
29  return stream;
30 }

Member Data Documentation

◆ isReceptionAttempted_

const bool inet::physicallayer::ReceptionDecision::isReceptionAttempted_
protected

Referenced by printToStream().

◆ isReceptionPossible_

const bool inet::physicallayer::ReceptionDecision::isReceptionPossible_
protected

Referenced by printToStream().

◆ isReceptionSuccessful_

const bool inet::physicallayer::ReceptionDecision::isReceptionSuccessful_
protected

Referenced by printToStream().

◆ part

IRadioSignal::SignalPart inet::physicallayer::ReceptionDecision::part
protected

◆ reception

const IReception* inet::physicallayer::ReceptionDecision::reception
protected

The documentation for this class was generated from the following files:
inet::IPrintableObject::PRINT_LEVEL_DETAIL
@ PRINT_LEVEL_DETAIL
Definition: IPrintableObject.h:24
inet::physicallayer::ReceptionDecision::part
IRadioSignal::SignalPart part
Definition: ReceptionDecision.h:20
inet::physicallayer::ReceptionDecision::isReceptionAttempted
virtual bool isReceptionAttempted() const override
Returns whether the receiver decided to attempt the reception or it decided to ignore it.
Definition: ReceptionDecision.h:34
inet::physicallayer::ReceptionDecision::isReceptionAttempted_
const bool isReceptionAttempted_
Definition: ReceptionDecision.h:22
inet::physicallayer::ReceptionDecision::isReceptionPossible_
const bool isReceptionPossible_
Definition: ReceptionDecision.h:21
inet::physicallayer::ReceptionDecision::isReceptionPossible
virtual bool isReceptionPossible() const override
Returns whether reception was possible according to the physical properties of the received radio sig...
Definition: ReceptionDecision.h:33
inet::physicallayer::ReceptionDecision::reception
const IReception * reception
Definition: ReceptionDecision.h:19
inet::physicallayer::ReceptionDecision::isReceptionSuccessful_
const bool isReceptionSuccessful_
Definition: ReceptionDecision.h:23
inet::physicallayer::ReceptionDecision::isReceptionSuccessful
virtual bool isReceptionSuccessful() const override
Returns whether the reception was completely successful or not.
Definition: ReceptionDecision.h:35