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

#include <ReceptionResult.h>

Inheritance diagram for inet::physicallayer::ReceptionResult:
inet::physicallayer::IReceptionResult inet::physicallayer::IPrintableObject inet::physicallayer::LayeredReceptionResult

Public Member Functions

 ReceptionResult (const IReception *reception, const std::vector< const IReceptionDecision * > *decisions, const ReceptionIndication *indication)
 
 ~ReceptionResult ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level) 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 const std::vector< const IReceptionDecision * > * getDecisions () const override
 Returns the reception decisions made by the receiver in the order of received signal parts. More...
 
virtual const ReceptionIndicationgetIndication () const override
 Returns the physical properties of the reception. More...
 
virtual const cPacket * getPhyFrame () const override
 Returns the PHY frame corresponding to the reception. More...
 
virtual const cPacket * getMacFrame () const override
 Returns the MAC frame corresponding to this reception. 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 Attributes

const IReceptionreception
 
const std::vector< const IReceptionDecision * > * decisions
 
const ReceptionIndicationindication
 
const cPacket * macFrame
 

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::ReceptionResult::ReceptionResult ( const IReception reception,
const std::vector< const IReceptionDecision * > *  decisions,
const ReceptionIndication indication 
)
24  :
28  macFrame(nullptr)
29 {
31  bool isReceptionSuccessful = true;
32  for (auto decision : *decisions)
33  isReceptionSuccessful &= decision->isReceptionSuccessful();
34  const_cast<cPacket *>(macFrame)->setBitError(!isReceptionSuccessful);
35 }
virtual const ITransmission * getTransmission() const =0
Returns the transmission that corresponds to this reception at the receiver.
const IReception * reception
Definition: ReceptionResult.h:31
virtual const cPacket * getMacFrame() const =0
Returns the MAC frame corresponding to this transmission.
const std::vector< const IReceptionDecision * > * decisions
Definition: ReceptionResult.h:32
const ReceptionIndication * indication
Definition: ReceptionResult.h:33
const cPacket * macFrame
Definition: ReceptionResult.h:34
inet::physicallayer::ReceptionResult::~ReceptionResult ( )
38 {
39  delete macFrame;
40  delete decisions;
41 }
const std::vector< const IReceptionDecision * > * decisions
Definition: ReceptionResult.h:32
const cPacket * macFrame
Definition: ReceptionResult.h:34

Member Function Documentation

virtual const std::vector<const IReceptionDecision *>* inet::physicallayer::ReceptionResult::getDecisions ( ) const
inlineoverridevirtual

Returns the reception decisions made by the receiver in the order of received signal parts.

This function never returns an empty vector.

Implements inet::physicallayer::IReceptionResult.

43 { return decisions; }
const std::vector< const IReceptionDecision * > * decisions
Definition: ReceptionResult.h:32
virtual const ReceptionIndication* inet::physicallayer::ReceptionResult::getIndication ( ) const
inlineoverridevirtual

Returns the physical properties of the reception.

This function never returns nullptr.

Implements inet::physicallayer::IReceptionResult.

44 { return indication; }
const ReceptionIndication * indication
Definition: ReceptionResult.h:33
const cPacket * inet::physicallayer::ReceptionResult::getMacFrame ( ) const
overridevirtual

Returns the MAC frame corresponding to this reception.

This function may return nullptr.

Implements inet::physicallayer::IReceptionResult.

Reimplemented in inet::physicallayer::LayeredReceptionResult.

57 {
58  return macFrame;
59 }
const cPacket * macFrame
Definition: ReceptionResult.h:34
const cPacket * inet::physicallayer::ReceptionResult::getPhyFrame ( ) const
overridevirtual

Returns the PHY frame corresponding to the reception.

This function may return nullptr.

Implements inet::physicallayer::IReceptionResult.

Reimplemented in inet::physicallayer::LayeredReceptionResult.

52 {
53  return nullptr;
54 }
virtual const IReception* inet::physicallayer::ReceptionResult::getReception ( ) const
inlineoverridevirtual

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

This function never returns nullptr.

Implements inet::physicallayer::IReceptionResult.

42 { return reception; }
const IReception * reception
Definition: ReceptionResult.h:31
std::ostream & inet::physicallayer::ReceptionResult::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::IPrintableObject.

Reimplemented in inet::physicallayer::LayeredReceptionResult.

44 {
45  stream << "ReceptionResult";
46  if (level <= PRINT_LEVEL_DETAIL)
47  stream << ", indication = " << indication;
48  return stream;
49 }
const ReceptionIndication * indication
Definition: ReceptionResult.h:33

Member Data Documentation

const std::vector<const IReceptionDecision *>* inet::physicallayer::ReceptionResult::decisions
protected

Referenced by ~ReceptionResult().

const ReceptionIndication* inet::physicallayer::ReceptionResult::indication
protected

Referenced by printToStream().

const cPacket* inet::physicallayer::ReceptionResult::macFrame
protected
const IReception* inet::physicallayer::ReceptionResult::reception
protected

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