satellite-propagation-delay-model.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013 Magister Solutions Ltd.
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: Jani Puttonen <jani.puttonen@magister.fi>
19  */
20 
22 
23 #include <ns3/double.h>
24 #include <ns3/log.h>
25 #include <ns3/object.h>
26 #include <ns3/string.h>
27 
28 NS_LOG_COMPONENT_DEFINE("SatConstantPropagationDelayModel");
29 
30 namespace ns3
31 {
32 
33 NS_OBJECT_ENSURE_REGISTERED(SatConstantPropagationDelayModel);
34 
35 TypeId
37 {
38  static TypeId tid =
39  TypeId("ns3::SatConstantPropagationDelayModel")
40  .SetParent<PropagationDelayModel>()
41  .AddConstructor<SatConstantPropagationDelayModel>()
42  .AddAttribute("Delay",
43  "The delay",
44  TimeValue(Seconds(0.13)),
46  MakeTimeChecker());
47  return tid;
48 }
49 
51 {
52 }
53 
54 Time
55 SatConstantPropagationDelayModel::GetDelay(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const
56 {
57  NS_LOG_FUNCTION(this);
58  return m_delay;
59 }
60 
61 void
63 {
64  NS_LOG_FUNCTION(this << delay.GetSeconds());
65  m_delay = delay;
66 }
67 
68 Time
70 {
71  NS_LOG_FUNCTION(this);
72  return m_delay;
73 }
74 
75 int64_t
77 {
78  NS_LOG_FUNCTION(this);
79  return 0;
80 }
81 
82 } // namespace ns3
virtual Time GetDelay(void) const
Get the propagation delay in Time.
int64_t DoAssignStreams(int64_t s)
DoAssignStreams need to be implemented due to inheritance from PropagationDelayModel.
void SetDelay(Time delay)
Set constant propagation delay.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.