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

#include <ReceptionBase.h>

Inheritance diagram for inet::physicallayer::ReceptionBase:
inet::physicallayer::IReception inet::physicallayer::IReceptionAnalogModel inet::physicallayer::IPrintableObject inet::physicallayer::ISignalAnalogModel inet::physicallayer::IPrintableObject inet::physicallayer::IdealReception inet::physicallayer::LayeredReception inet::physicallayer::NarrowbandReceptionBase inet::physicallayer::FlatReceptionBase inet::physicallayer::DimensionalReception inet::physicallayer::ScalarReception

Public Member Functions

 ReceptionBase (const IRadio *receiver, const ITransmission *transmission, const simtime_t startTime, const simtime_t endTime, const Coord startPosition, const Coord endPosition, const EulerAngles startOrientation, const EulerAngles endOrientation)
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const override
 Prints this object to the provided output stream. More...
 
virtual const IRadiogetReceiver () const override
 Returns the receiver that received the corresponding transmission from the radio medium. More...
 
virtual const ITransmissiongetTransmission () const override
 Returns the transmission that corresponds to this reception at the receiver. More...
 
virtual const simtime_t getStartTime () const override
 Returns the time when the receiver started to receive the corresponding transmission. More...
 
virtual const simtime_t getEndTime () const override
 Returns the time when the receiver ended to receive the corresponding transmission. More...
 
virtual const simtime_t getStartTime (IRadioSignal::SignalPart part) const override
 
virtual const simtime_t getEndTime (IRadioSignal::SignalPart part) const override
 
virtual const simtime_t getPreambleStartTime () const override
 
virtual const simtime_t getPreambleEndTime () const override
 
virtual const simtime_t getHeaderStartTime () const override
 
virtual const simtime_t getHeaderEndTime () const override
 
virtual const simtime_t getDataStartTime () const override
 
virtual const simtime_t getDataEndTime () const override
 
virtual const simtime_t getDuration () const override
 Returns the total length of this reception. More...
 
virtual const simtime_t getDuration (IRadioSignal::SignalPart part) const override
 Returns the length of the provided part of this reception. More...
 
virtual const simtime_t getPreambleDuration () const override
 Returns the length of the preamble part of this reception. More...
 
virtual const simtime_t getHeaderDuration () const override
 Returns the length of the header part of this reception. More...
 
virtual const simtime_t getDataDuration () const override
 Returns the length of the data part of this reception. More...
 
virtual const Coord getStartPosition () const override
 Returns the antenna's position when the receiver started to receive the corresponding transmission. More...
 
virtual const Coord getEndPosition () const override
 Returns the antenna's position when the receiver ended to receive the corresponding transmission. More...
 
virtual const EulerAngles getStartOrientation () const override
 Returns the antenna's orientation when the receiver started to receive the corresponding transmission. More...
 
virtual const EulerAngles getEndOrientation () const override
 Returns the antenna's orientation when the receiver ended to receive the corresponding transmission. More...
 
virtual const IReceptionAnalogModelgetAnalogModel () const override
 Returns the analog model of the received signal. 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 IRadioreceiver
 
const ITransmissiontransmission
 
const simtime_t startTime
 
const simtime_t endTime
 
const simtime_t preambleDuration
 
const simtime_t headerDuration
 
const simtime_t dataDuration
 
const Coord startPosition
 
const Coord endPosition
 
const EulerAngles startOrientation
 
const EulerAngles endOrientation
 

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::ReceptionBase::ReceptionBase ( const IRadio receiver,
const ITransmission transmission,
const simtime_t  startTime,
const simtime_t  endTime,
const Coord  startPosition,
const Coord  endPosition,
const EulerAngles  startOrientation,
const EulerAngles  endOrientation 
)
24  :
36 {
37 }
const Coord startPosition
Definition: ReceptionBase.h:39
virtual const simtime_t getPreambleDuration() const =0
Returns the length of the preamble part of this transmission.
const simtime_t preambleDuration
Definition: ReceptionBase.h:36
const simtime_t endTime
Definition: ReceptionBase.h:35
const simtime_t dataDuration
Definition: ReceptionBase.h:38
const IRadio * receiver
Definition: ReceptionBase.h:32
virtual const simtime_t getHeaderDuration() const =0
Returns the length of the header part of this transmission.
const EulerAngles endOrientation
Definition: ReceptionBase.h:42
const simtime_t headerDuration
Definition: ReceptionBase.h:37
const ITransmission * transmission
Definition: ReceptionBase.h:33
const Coord endPosition
Definition: ReceptionBase.h:40
const EulerAngles startOrientation
Definition: ReceptionBase.h:41
virtual const simtime_t getDataDuration() const =0
Returns the length of the data part of this transmission.
const simtime_t startTime
Definition: ReceptionBase.h:34

Member Function Documentation

virtual const IReceptionAnalogModel* inet::physicallayer::ReceptionBase::getAnalogModel ( ) const
inlineoverridevirtual

Returns the analog model of the received signal.

Implements inet::physicallayer::IReception.

Reimplemented in inet::physicallayer::LayeredReception.

77 { return check_and_cast<const IReceptionAnalogModel *>(this); }
virtual const simtime_t inet::physicallayer::ReceptionBase::getDataDuration ( ) const
inlineoverridevirtual

Returns the length of the data part of this reception.

Implements inet::physicallayer::IReception.

Referenced by getDuration().

69 { return dataDuration; }
const simtime_t dataDuration
Definition: ReceptionBase.h:38
virtual const simtime_t inet::physicallayer::ReceptionBase::getDataEndTime ( ) const
inlineoverridevirtual

Implements inet::physicallayer::IReception.

Referenced by getEndTime().

62 { return endTime; }
const simtime_t endTime
Definition: ReceptionBase.h:35
virtual const simtime_t inet::physicallayer::ReceptionBase::getDataStartTime ( ) const
inlineoverridevirtual

Implements inet::physicallayer::IReception.

Referenced by getStartTime().

61 { return endTime - dataDuration; }
const simtime_t endTime
Definition: ReceptionBase.h:35
const simtime_t dataDuration
Definition: ReceptionBase.h:38
virtual const simtime_t inet::physicallayer::ReceptionBase::getDuration ( ) const
inlineoverridevirtual

Returns the total length of this reception.

Implements inet::physicallayer::IReception.

Referenced by getDuration().

64 { return endTime - startTime; }
const simtime_t endTime
Definition: ReceptionBase.h:35
const simtime_t startTime
Definition: ReceptionBase.h:34
const simtime_t inet::physicallayer::ReceptionBase::getDuration ( IRadioSignal::SignalPart  part) const
overridevirtual

Returns the length of the provided part of this reception.

Implements inet::physicallayer::IReception.

90 {
91  switch (part) {
93  return getDuration();
95  return getPreambleDuration();
97  return getHeaderDuration();
99  return getDataDuration();
100  default:
101  throw cRuntimeError("Unknown signal part: '%s'", IRadioSignal::getSignalPartName(part));
102  }
103 }
virtual const simtime_t getHeaderDuration() const override
Returns the length of the header part of this reception.
Definition: ReceptionBase.h:68
static const char * getSignalPartName(SignalPart signalPart)
Returns the name of the provided signal part.
Definition: IRadioSignal.cc:33
virtual const simtime_t getDuration() const override
Returns the total length of this reception.
Definition: ReceptionBase.h:64
virtual const simtime_t getPreambleDuration() const override
Returns the length of the preamble part of this reception.
Definition: ReceptionBase.h:67
virtual const simtime_t getDataDuration() const override
Returns the length of the data part of this reception.
Definition: ReceptionBase.h:69
virtual const EulerAngles inet::physicallayer::ReceptionBase::getEndOrientation ( ) const
inlineoverridevirtual

Returns the antenna's orientation when the receiver ended to receive the corresponding transmission.

Implements inet::physicallayer::IReception.

75 { return endOrientation; }
const EulerAngles endOrientation
Definition: ReceptionBase.h:42
virtual const Coord inet::physicallayer::ReceptionBase::getEndPosition ( ) const
inlineoverridevirtual

Returns the antenna's position when the receiver ended to receive the corresponding transmission.

Implements inet::physicallayer::IReception.

72 { return endPosition; }
const Coord endPosition
Definition: ReceptionBase.h:40
virtual const simtime_t inet::physicallayer::ReceptionBase::getEndTime ( ) const
inlineoverridevirtual

Returns the time when the receiver ended to receive the corresponding transmission.

It is the end of the last bit's reception.

Implements inet::physicallayer::IReception.

Referenced by getEndTime().

53 { return endTime; }
const simtime_t endTime
Definition: ReceptionBase.h:35
const simtime_t inet::physicallayer::ReceptionBase::getEndTime ( IRadioSignal::SignalPart  part) const
overridevirtual

Implements inet::physicallayer::IReception.

74 {
75  switch (part) {
77  return getEndTime();
79  return getPreambleEndTime();
81  return getHeaderEndTime();
83  return getDataEndTime();
84  default:
85  throw cRuntimeError("Unknown signal part: '%s'", IRadioSignal::getSignalPartName(part));
86  }
87 }
virtual const simtime_t getDataEndTime() const override
Definition: ReceptionBase.h:62
static const char * getSignalPartName(SignalPart signalPart)
Returns the name of the provided signal part.
Definition: IRadioSignal.cc:33
virtual const simtime_t getPreambleEndTime() const override
Definition: ReceptionBase.h:58
virtual const simtime_t getHeaderEndTime() const override
Definition: ReceptionBase.h:60
virtual const simtime_t getEndTime() const override
Returns the time when the receiver ended to receive the corresponding transmission.
Definition: ReceptionBase.h:53
virtual const simtime_t inet::physicallayer::ReceptionBase::getHeaderDuration ( ) const
inlineoverridevirtual

Returns the length of the header part of this reception.

Implements inet::physicallayer::IReception.

Referenced by getDuration().

68 { return headerDuration; }
const simtime_t headerDuration
Definition: ReceptionBase.h:37
virtual const simtime_t inet::physicallayer::ReceptionBase::getHeaderEndTime ( ) const
inlineoverridevirtual

Implements inet::physicallayer::IReception.

Referenced by getEndTime().

60 { return endTime - dataDuration; }
const simtime_t endTime
Definition: ReceptionBase.h:35
const simtime_t dataDuration
Definition: ReceptionBase.h:38
virtual const simtime_t inet::physicallayer::ReceptionBase::getHeaderStartTime ( ) const
inlineoverridevirtual

Implements inet::physicallayer::IReception.

Referenced by getStartTime().

59 { return startTime + preambleDuration; }
const simtime_t preambleDuration
Definition: ReceptionBase.h:36
const simtime_t startTime
Definition: ReceptionBase.h:34
virtual const simtime_t inet::physicallayer::ReceptionBase::getPreambleDuration ( ) const
inlineoverridevirtual

Returns the length of the preamble part of this reception.

Implements inet::physicallayer::IReception.

Referenced by getDuration().

67 { return preambleDuration; }
const simtime_t preambleDuration
Definition: ReceptionBase.h:36
virtual const simtime_t inet::physicallayer::ReceptionBase::getPreambleEndTime ( ) const
inlineoverridevirtual

Implements inet::physicallayer::IReception.

Referenced by getEndTime().

58 { return startTime + preambleDuration; }
const simtime_t preambleDuration
Definition: ReceptionBase.h:36
const simtime_t startTime
Definition: ReceptionBase.h:34
virtual const simtime_t inet::physicallayer::ReceptionBase::getPreambleStartTime ( ) const
inlineoverridevirtual

Implements inet::physicallayer::IReception.

Referenced by getStartTime().

57 { return startTime; }
const simtime_t startTime
Definition: ReceptionBase.h:34
virtual const IRadio* inet::physicallayer::ReceptionBase::getReceiver ( ) const
inlineoverridevirtual

Returns the receiver that received the corresponding transmission from the radio medium.

This function never returns nullptr.

Implements inet::physicallayer::IReception.

49 { return receiver; }
const IRadio * receiver
Definition: ReceptionBase.h:32
virtual const EulerAngles inet::physicallayer::ReceptionBase::getStartOrientation ( ) const
inlineoverridevirtual

Returns the antenna's orientation when the receiver started to receive the corresponding transmission.

Implements inet::physicallayer::IReception.

74 { return startOrientation; }
const EulerAngles startOrientation
Definition: ReceptionBase.h:41
virtual const Coord inet::physicallayer::ReceptionBase::getStartPosition ( ) const
inlineoverridevirtual

Returns the antenna's position when the receiver started to receive the corresponding transmission.

Implements inet::physicallayer::IReception.

71 { return startPosition; }
const Coord startPosition
Definition: ReceptionBase.h:39
virtual const simtime_t inet::physicallayer::ReceptionBase::getStartTime ( ) const
inlineoverridevirtual

Returns the time when the receiver started to receive the corresponding transmission.

It is the start of the first bit's reception.

Implements inet::physicallayer::IReception.

Referenced by getStartTime().

52 { return startTime; }
const simtime_t startTime
Definition: ReceptionBase.h:34
const simtime_t inet::physicallayer::ReceptionBase::getStartTime ( IRadioSignal::SignalPart  part) const
overridevirtual

Implements inet::physicallayer::IReception.

58 {
59  switch (part) {
61  return getStartTime();
63  return getPreambleStartTime();
65  return getHeaderStartTime();
67  return getDataStartTime();
68  default:
69  throw cRuntimeError("Unknown signal part: '%s'", IRadioSignal::getSignalPartName(part));
70  }
71 }
static const char * getSignalPartName(SignalPart signalPart)
Returns the name of the provided signal part.
Definition: IRadioSignal.cc:33
virtual const simtime_t getHeaderStartTime() const override
Definition: ReceptionBase.h:59
virtual const simtime_t getStartTime() const override
Returns the time when the receiver started to receive the corresponding transmission.
Definition: ReceptionBase.h:52
virtual const simtime_t getDataStartTime() const override
Definition: ReceptionBase.h:61
virtual const simtime_t getPreambleStartTime() const override
Definition: ReceptionBase.h:57
virtual const ITransmission* inet::physicallayer::ReceptionBase::getTransmission ( ) const
inlineoverridevirtual

Returns the transmission that corresponds to this reception at the receiver.

This function never returns nullptr.

Implements inet::physicallayer::IReception.

50 { return transmission; }
const ITransmission * transmission
Definition: ReceptionBase.h:33
std::ostream & inet::physicallayer::ReceptionBase::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::IdealReception, inet::physicallayer::LayeredReception, inet::physicallayer::NarrowbandReceptionBase, and inet::physicallayer::ScalarReception.

Referenced by inet::physicallayer::NarrowbandReceptionBase::printToStream(), inet::physicallayer::LayeredReception::printToStream(), and inet::physicallayer::IdealReception::printToStream().

40 {
41  if (level <= PRINT_LEVEL_DETAIL)
42  stream << ", transmissionId = " << transmission->getId();
43  if (level <= PRINT_LEVEL_TRACE)
44  stream << ", receiverId = " << receiver->getId()
45  << ", startTime = " << startTime
46  << ", endTime = " << endTime
47  << ", preambleDuration = " << preambleDuration
48  << ", headerPosition = " << headerDuration
49  << ", dataPosition = " << dataDuration
50  << ", startPosition = " << startPosition
51  << ", endPosition = " << endPosition
52  << ", startOrientation = " << startOrientation
53  << ", endOrientation = " << endOrientation;
54  return stream;
55 }
const Coord startPosition
Definition: ReceptionBase.h:39
const simtime_t preambleDuration
Definition: ReceptionBase.h:36
const simtime_t endTime
Definition: ReceptionBase.h:35
const simtime_t dataDuration
Definition: ReceptionBase.h:38
const IRadio * receiver
Definition: ReceptionBase.h:32
virtual int getId() const =0
Returns an identifier for this transmission which is globally unique for the whole lifetime of the si...
const EulerAngles endOrientation
Definition: ReceptionBase.h:42
const simtime_t headerDuration
Definition: ReceptionBase.h:37
const ITransmission * transmission
Definition: ReceptionBase.h:33
const Coord endPosition
Definition: ReceptionBase.h:40
const EulerAngles startOrientation
Definition: ReceptionBase.h:41
virtual int getId() const =0
Returns an identifier for this radio which is globally unique for the whole lifetime of the simulatio...
const simtime_t startTime
Definition: ReceptionBase.h:34

Member Data Documentation

const simtime_t inet::physicallayer::ReceptionBase::dataDuration
protected

Referenced by printToStream().

const EulerAngles inet::physicallayer::ReceptionBase::endOrientation
protected

Referenced by printToStream().

const Coord inet::physicallayer::ReceptionBase::endPosition
protected

Referenced by printToStream().

const simtime_t inet::physicallayer::ReceptionBase::endTime
protected

Referenced by printToStream().

const simtime_t inet::physicallayer::ReceptionBase::headerDuration
protected

Referenced by printToStream().

const simtime_t inet::physicallayer::ReceptionBase::preambleDuration
protected

Referenced by printToStream().

const IRadio* inet::physicallayer::ReceptionBase::receiver
protected

Referenced by printToStream().

const EulerAngles inet::physicallayer::ReceptionBase::startOrientation
protected

Referenced by printToStream().

const Coord inet::physicallayer::ReceptionBase::startPosition
protected

Referenced by printToStream().

const simtime_t inet::physicallayer::ReceptionBase::startTime
protected

Referenced by printToStream().

const ITransmission* inet::physicallayer::ReceptionBase::transmission
protected

Referenced by printToStream().


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