diff --git a/src/propagation/model/cost231-propagation-loss-model.h b/src/propagation/model/cost231-propagation-loss-model.h index e369376be..bb458ca9f 100644 --- a/src/propagation/model/cost231-propagation-loss-model.h +++ b/src/propagation/model/cost231-propagation-loss-model.h @@ -138,15 +138,15 @@ private: */ Cost231PropagationLossModel & operator = (const Cost231PropagationLossModel &); - virtual double DoCalcRxPower (double txPowerDbm, Ptr a, Ptr b) const; - virtual int64_t DoAssignStreams (int64_t stream); + double DoCalcRxPower (double txPowerDbm, Ptr a, Ptr b) const override; + int64_t DoAssignStreams (int64_t stream) override; + double m_BSAntennaHeight; //!< BS Antenna Height [m] double m_SSAntennaHeight; //!< SS Antenna Height [m] double m_lambda; //!< The wavelength double m_minDistance; //!< minimum distance [m] double m_frequency; //!< frequency [Hz] double m_shadowing; //!< Shadowing loss [dB] - }; } diff --git a/src/propagation/model/itu-r-1411-los-propagation-loss-model.h b/src/propagation/model/itu-r-1411-los-propagation-loss-model.h index 272f3672e..3d3930532 100644 --- a/src/propagation/model/itu-r-1411-los-propagation-loss-model.h +++ b/src/propagation/model/itu-r-1411-los-propagation-loss-model.h @@ -86,11 +86,12 @@ private: */ ItuR1411LosPropagationLossModel & operator = (const ItuR1411LosPropagationLossModel &); - virtual double DoCalcRxPower (double txPowerDbm, - Ptr a, - Ptr b) const; - virtual int64_t DoAssignStreams (int64_t stream); - + double DoCalcRxPower (double txPowerDbm, + Ptr a, + Ptr b) const override; + + int64_t DoAssignStreams (int64_t stream) override; + double m_lambda; //!< wavelength }; diff --git a/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.h b/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.h index 5ee5bcaa2..460dc9519 100644 --- a/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.h +++ b/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.h @@ -86,11 +86,11 @@ private: */ ItuR1411NlosOverRooftopPropagationLossModel & operator = (const ItuR1411NlosOverRooftopPropagationLossModel &); - virtual double DoCalcRxPower (double txPowerDbm, - Ptr a, - Ptr b) const; - virtual int64_t DoAssignStreams (int64_t stream); - + double DoCalcRxPower (double txPowerDbm, + Ptr a, + Ptr b) const override; + int64_t DoAssignStreams (int64_t stream) override; + double m_frequency; //!< frequency in MHz double m_lambda; //!< wavelength EnvironmentType m_environment; //!< Environment Scenario @@ -107,4 +107,3 @@ private: #endif // ITU_R_1411_NLOS_OVER_ROOFTOP_PROPAGATION_LOSS_MODEL_H - diff --git a/src/propagation/model/jakes-propagation-loss-model.h b/src/propagation/model/jakes-propagation-loss-model.h index 86f56fd8f..b1d577ca8 100644 --- a/src/propagation/model/jakes-propagation-loss-model.h +++ b/src/propagation/model/jakes-propagation-loss-model.h @@ -62,8 +62,9 @@ private: JakesPropagationLossModel & operator = (const JakesPropagationLossModel &); double DoCalcRxPower (double txPowerDbm, Ptr a, - Ptr b) const; - virtual int64_t DoAssignStreams (int64_t stream); + Ptr b) const override; + + int64_t DoAssignStreams (int64_t stream) override; /** * Get the underlying RNG stream diff --git a/src/propagation/model/kun-2600-mhz-propagation-loss-model.h b/src/propagation/model/kun-2600-mhz-propagation-loss-model.h index 58fb182d7..649e796c5 100644 --- a/src/propagation/model/kun-2600-mhz-propagation-loss-model.h +++ b/src/propagation/model/kun-2600-mhz-propagation-loss-model.h @@ -76,11 +76,10 @@ private: Kun2600MhzPropagationLossModel & operator = (const Kun2600MhzPropagationLossModel &); // inherited from PropagationLossModel - virtual double DoCalcRxPower (double txPowerDbm, - Ptr a, - Ptr b) const; - virtual int64_t DoAssignStreams (int64_t stream); - + double DoCalcRxPower (double txPowerDbm, + Ptr a, + Ptr b) const override; + int64_t DoAssignStreams (int64_t stream) override; }; } // namespace ns3 diff --git a/src/propagation/model/okumura-hata-propagation-loss-model.h b/src/propagation/model/okumura-hata-propagation-loss-model.h index d374a90e0..4e9c364a6 100644 --- a/src/propagation/model/okumura-hata-propagation-loss-model.h +++ b/src/propagation/model/okumura-hata-propagation-loss-model.h @@ -78,11 +78,11 @@ private: */ OkumuraHataPropagationLossModel & operator = (const OkumuraHataPropagationLossModel &); - virtual double DoCalcRxPower (double txPowerDbm, - Ptr a, - Ptr b) const; - virtual int64_t DoAssignStreams (int64_t stream); - + double DoCalcRxPower (double txPowerDbm, + Ptr a, + Ptr b) const override; + int64_t DoAssignStreams (int64_t stream) override; + EnvironmentType m_environment; //!< Environment Scenario CitySize m_citySize; //!< Size of the city double m_frequency; //!< frequency in Hz diff --git a/src/propagation/model/propagation-delay-model.h b/src/propagation/model/propagation-delay-model.h index d03b9c5fc..179934df3 100644 --- a/src/propagation/model/propagation-delay-model.h +++ b/src/propagation/model/propagation-delay-model.h @@ -62,7 +62,7 @@ public: * \return the number of stream indices assigned by this model */ int64_t AssignStreams (int64_t stream); -private: +protected: /** * Subclasses must implement this; those not using random variables * can return zero @@ -89,9 +89,9 @@ public: */ RandomPropagationDelayModel (); virtual ~RandomPropagationDelayModel (); - virtual Time GetDelay (Ptr a, Ptr b) const; + Time GetDelay (Ptr a, Ptr b) const override; private: - virtual int64_t DoAssignStreams (int64_t stream); + int64_t DoAssignStreams (int64_t stream) override; Ptr m_variable; //!< random generator }; @@ -113,7 +113,7 @@ public: * Use the default parameters from PropagationDelayConstantSpeed. */ ConstantSpeedPropagationDelayModel (); - virtual Time GetDelay (Ptr a, Ptr b) const; + Time GetDelay (Ptr a, Ptr b) const override; /** * \param speed the new speed (m/s) */ @@ -123,7 +123,7 @@ public: */ double GetSpeed (void) const; private: - virtual int64_t DoAssignStreams (int64_t stream); + int64_t DoAssignStreams (int64_t stream) override; double m_speed; //!< speed }; diff --git a/src/propagation/model/propagation-loss-model.h b/src/propagation/model/propagation-loss-model.h index 17adfad6d..c43af732b 100644 --- a/src/propagation/model/propagation-loss-model.h +++ b/src/propagation/model/propagation-loss-model.h @@ -106,21 +106,7 @@ public: */ int64_t AssignStreams (int64_t stream); -private: - /** - * \brief Copy constructor - * - * Defined and unimplemented to avoid misuse - */ - PropagationLossModel (const PropagationLossModel &); - /** - * \brief Copy constructor - * - * Defined and unimplemented to avoid misuse - * \returns - */ - PropagationLossModel &operator = (const PropagationLossModel &); - +protected: /** * Returns the Rx Power taking into account only the particular * PropagationLossModel. @@ -140,6 +126,22 @@ private: */ virtual int64_t DoAssignStreams (int64_t stream) = 0; +private: + /** + * \brief Copy constructor + * + * Defined and unimplemented to avoid misuse + */ + PropagationLossModel (const PropagationLossModel &); + + /** + * \brief Copy constructor + * + * Defined and unimplemented to avoid misuse + * \returns + */ + PropagationLossModel &operator = (const PropagationLossModel &); + Ptr m_next; //!< Next propagation loss model in the list }; @@ -174,10 +176,12 @@ private: * \returns */ RandomPropagationLossModel & operator = (const RandomPropagationLossModel &); - virtual double DoCalcRxPower (double txPowerDbm, - Ptr a, - Ptr b) const; - virtual int64_t DoAssignStreams (int64_t stream); + + double DoCalcRxPower (double txPowerDbm, + Ptr a, + Ptr b) const override; + int64_t DoAssignStreams (int64_t stream) override; + Ptr m_variable; //!< random generator }; @@ -318,10 +322,10 @@ private: */ FriisPropagationLossModel & operator = (const FriisPropagationLossModel &); - virtual double DoCalcRxPower (double txPowerDbm, - Ptr a, - Ptr b) const; - virtual int64_t DoAssignStreams (int64_t stream); + double DoCalcRxPower (double txPowerDbm, + Ptr a, + Ptr b) const override; + int64_t DoAssignStreams (int64_t stream) override; /** * Transforms a Dbm value to Watt @@ -438,10 +442,10 @@ private: */ TwoRayGroundPropagationLossModel & operator = (const TwoRayGroundPropagationLossModel &); - virtual double DoCalcRxPower (double txPowerDbm, - Ptr a, - Ptr b) const; - virtual int64_t DoAssignStreams (int64_t stream); + double DoCalcRxPower (double txPowerDbm, + Ptr a, + Ptr b) const override; + int64_t DoAssignStreams (int64_t stream) override; /** * Transforms a Dbm value to Watt @@ -526,10 +530,11 @@ private: */ LogDistancePropagationLossModel & operator = (const LogDistancePropagationLossModel &); - virtual double DoCalcRxPower (double txPowerDbm, - Ptr a, - Ptr b) const; - virtual int64_t DoAssignStreams (int64_t stream); + double DoCalcRxPower (double txPowerDbm, + Ptr a, + Ptr b) const override; + + int64_t DoAssignStreams (int64_t stream) override; /** * Creates a default reference loss model @@ -609,10 +614,11 @@ private: */ ThreeLogDistancePropagationLossModel& operator= (const ThreeLogDistancePropagationLossModel&); - virtual double DoCalcRxPower (double txPowerDbm, - Ptr a, - Ptr b) const; - virtual int64_t DoAssignStreams (int64_t stream); + double DoCalcRxPower (double txPowerDbm, + Ptr a, + Ptr b) const override; + + int64_t DoAssignStreams (int64_t stream) override; double m_distance0; //!< Beginning of the first (near) distance field double m_distance1; //!< Beginning of the second (middle) distance field. @@ -680,10 +686,11 @@ private: */ NakagamiPropagationLossModel& operator= (const NakagamiPropagationLossModel&); - virtual double DoCalcRxPower (double txPowerDbm, - Ptr a, - Ptr b) const; - virtual int64_t DoAssignStreams (int64_t stream); + double DoCalcRxPower (double txPowerDbm, + Ptr a, + Ptr b) const override; + + int64_t DoAssignStreams (int64_t stream) override; double m_distance1; //!< Distance1 double m_distance2; //!< Distance2 @@ -742,11 +749,12 @@ private: */ FixedRssLossModel & operator = (const FixedRssLossModel &); - virtual double DoCalcRxPower (double txPowerDbm, - Ptr a, - Ptr b) const; + double DoCalcRxPower (double txPowerDbm, + Ptr a, + Ptr b) const override; + + int64_t DoAssignStreams (int64_t stream) override; - virtual int64_t DoAssignStreams (int64_t stream); double m_rss; //!< the received signal strength }; @@ -801,12 +809,12 @@ private: */ MatrixPropagationLossModel &operator = (const MatrixPropagationLossModel &); - virtual double DoCalcRxPower (double txPowerDbm, - Ptr a, - Ptr b) const; + double DoCalcRxPower (double txPowerDbm, + Ptr a, + Ptr b) const override; + + int64_t DoAssignStreams (int64_t stream) override; - virtual int64_t DoAssignStreams (int64_t stream); -private: double m_default; //!< default loss /// Typedef: Mobility models pair @@ -848,11 +856,13 @@ private: * \returns */ RangePropagationLossModel& operator= (const RangePropagationLossModel&); - virtual double DoCalcRxPower (double txPowerDbm, - Ptr a, - Ptr b) const; - virtual int64_t DoAssignStreams (int64_t stream); -private: + + double DoCalcRxPower (double txPowerDbm, + Ptr a, + Ptr b) const override; + + int64_t DoAssignStreams (int64_t stream) override; + double m_range; //!< Maximum Transmission Range (meters) };