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

#include <ConstantTimePropagation.h>

Inheritance diagram for inet::physicallayer::ConstantTimePropagation:
inet::physicallayer::PropagationBase inet::physicallayer::IPropagation inet::physicallayer::IPrintableObject

Public Member Functions

 ConstantTimePropagation ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const override
 Prints this object to the provided output stream. More...
 
virtual const IArrivalcomputeArrival (const ITransmission *transmission, IMobility *mobility) const override
 Returns the time and space coordinates when the transmission arrives at the object that moves with the provided mobility. More...
 
- Public Member Functions inherited from inet::physicallayer::PropagationBase
 PropagationBase ()
 
virtual mps getPropagationSpeed () const override
 Returns the theoretical propagation speed of radio signals in the range (0, +infinity). 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

void initialize (int stage) override
 
- Protected Member Functions inherited from inet::physicallayer::PropagationBase
virtual void finish () override
 

Protected Attributes

simtime_t propagationTime
 
- Protected Attributes inherited from inet::physicallayer::PropagationBase
mps propagationSpeed
 
long arrivalComputationCount
 

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::ConstantTimePropagation::ConstantTimePropagation ( )
27  :
29 {
30 }
PropagationBase()
Definition: PropagationBase.cc:24

Member Function Documentation

const IArrival * inet::physicallayer::ConstantTimePropagation::computeArrival ( const ITransmission transmission,
IMobility mobility 
) const
overridevirtual

Returns the time and space coordinates when the transmission arrives at the object that moves with the provided mobility.

The result might be an approximation only, because there's a tradeoff between precision and performance. This function never returns nullptr.

Implements inet::physicallayer::IPropagation.

40 {
42  const Coord position = mobility->getCurrentPosition();
43  const EulerAngles orientation = mobility->getCurrentAngularPosition();
44  const simtime_t startTime = transmission->getStartTime();
45  const simtime_t endTime = transmission->getEndTime();
46  const simtime_t preambleDuration = transmission->getPreambleDuration();
47  const simtime_t headerDuration = transmission->getHeaderDuration();
48  const simtime_t dataDuration = transmission->getDataDuration();
49  return new Arrival(propagationTime, propagationTime, startTime + propagationTime, endTime + propagationTime, preambleDuration, headerDuration, dataDuration, position, position, orientation, orientation);
50 }
simtime_t propagationTime
Definition: ConstantTimePropagation.h:30
long arrivalComputationCount
Definition: PropagationBase.h:31
void inet::physicallayer::ConstantTimePropagation::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::physicallayer::PropagationBase.

33 {
35  if (stage == INITSTAGE_LOCAL)
36  propagationTime = par("propagationTime");
37 }
simtime_t propagationTime
Definition: ConstantTimePropagation.h:30
virtual void initialize(int stage) override
Definition: PropagationBase.cc:30
Local initializations.
Definition: InitStages.h:35
std::ostream & inet::physicallayer::ConstantTimePropagation::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::PropagationBase.

53 {
54  stream << "ConstantTimePropagation";
55  if (level <= PRINT_LEVEL_TRACE)
56  stream << ", propagationTime = " << propagationTime;
57  return PropagationBase::printToStream(stream, level);
58 }
virtual std::ostream & printToStream(std::ostream &stream, int level) const override
Prints this object to the provided output stream.
Definition: PropagationBase.cc:36
simtime_t propagationTime
Definition: ConstantTimePropagation.h:30

Member Data Documentation

simtime_t inet::physicallayer::ConstantTimePropagation::propagationTime
protected

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