OLD | NEW |
(Empty) | |
| 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari |
| 4 * |
| 5 * This program is free software; you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 2 as |
| 7 * published by the Free Software Foundation; |
| 8 * |
| 9 * This program is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. |
| 13 * |
| 14 * You should have received a copy of the GNU General Public License |
| 15 * along with this program; if not, write to the Free Software |
| 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 * |
| 18 * Author: Giuseppe Piro <g.piro@poliba.it> |
| 19 */ |
| 20 |
| 21 #ifndef LOSS_MODEL_H |
| 22 #define LOSS_MODEL_H |
| 23 |
| 24 |
| 25 #include <ns3/nstime.h> |
| 26 #include "ns3/object.h" |
| 27 |
| 28 |
| 29 namespace ns3 { |
| 30 |
| 31 |
| 32 /** |
| 33 * \brief The LossModel class offers a basic implementation |
| 34 * for all propagation loss models used for LTE networks |
| 35 */ |
| 36 |
| 37 class LossModel : public Object |
| 38 { |
| 39 |
| 40 public: |
| 41 LossModel (); |
| 42 virtual ~LossModel (); |
| 43 |
| 44 static TypeId GetTypeId (void); |
| 45 |
| 46 /** |
| 47 * \brief Set the time in which the model has been |
| 48 * updated. |
| 49 * |
| 50 * Each model can be updated every Sampling interval. Every time |
| 51 * the model is updated, the variable m_lastUpdate will be set to |
| 52 * the current simulation time. |
| 53 */ |
| 54 void SetLastUpdate (void); |
| 55 |
| 56 /** |
| 57 * \brief Get the time in which the model has been |
| 58 * updated |
| 59 * |
| 60 * \return the time instant in which the model have been updated |
| 61 */ |
| 62 Time GetLastUpdate (void); |
| 63 |
| 64 /** |
| 65 * \brief Set the time interval every time the model |
| 66 * should be updated |
| 67 * |
| 68 * \param sp the time interval |
| 69 */ |
| 70 void SetSamplingPeriod (double sp); |
| 71 |
| 72 /** |
| 73 * \brief Get the time interval every time the model |
| 74 * should be updated |
| 75 * |
| 76 * \return the time interval |
| 77 */ |
| 78 double GetSamplingPeriod (void); |
| 79 |
| 80 /** |
| 81 * \brief Check if the model should be updated |
| 82 */ |
| 83 bool NeedForUpdate (void); |
| 84 |
| 85 |
| 86 private: |
| 87 Time m_lastUpdate; |
| 88 double m_samplingPeriod; |
| 89 }; |
| 90 |
| 91 |
| 92 } |
| 93 |
| 94 #endif /* LOSS_MODEL_H */ |
OLD | NEW |