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 |
| 22 #include <ns3/log.h> |
| 23 #include "penetration-loss-model.h" |
| 24 #include <ns3/simulator.h> |
| 25 |
| 26 NS_LOG_COMPONENT_DEFINE ("PenetrationLossModel"); |
| 27 |
| 28 namespace ns3 { |
| 29 |
| 30 |
| 31 NS_OBJECT_ENSURE_REGISTERED (PenetrationLossModel); |
| 32 |
| 33 PenetrationLossModel::PenetrationLossModel () |
| 34 { |
| 35 NS_LOG_FUNCTION (this); |
| 36 SetLastUpdate (); |
| 37 SetSamplingPeriod (0.5); //defauld value |
| 38 m_pnl = 10; |
| 39 } |
| 40 |
| 41 |
| 42 TypeId |
| 43 PenetrationLossModel::GetTypeId (void) |
| 44 { |
| 45 static TypeId tid = TypeId ("ns3::PenetrationLossModel") |
| 46 .SetParent<LossModel> () |
| 47 .AddConstructor<PenetrationLossModel> () |
| 48 ; |
| 49 return tid; |
| 50 } |
| 51 |
| 52 |
| 53 PenetrationLossModel::~PenetrationLossModel () |
| 54 { |
| 55 } |
| 56 |
| 57 |
| 58 void· |
| 59 PenetrationLossModel::SetValue (double pnl) |
| 60 { |
| 61 NS_LOG_FUNCTION (this << pnl); |
| 62 m_pnl = pnl; |
| 63 } |
| 64 |
| 65 |
| 66 double |
| 67 PenetrationLossModel::GetValue (void) |
| 68 { |
| 69 NS_LOG_FUNCTION (this); |
| 70 return m_pnl; |
| 71 } |
| 72 |
| 73 |
| 74 } // namespace ns3 |
OLD | NEW |