author | Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
Mon, 21 Apr 2008 09:04:08 -0700 | |
changeset 2989 | b7eb3929096c |
parent 2983 | e3a416fe9dd5 |
parent 2965 | 4b28e9740e3b |
child 3086 | 5370849d0b76 |
permissions | -rw-r--r-- |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
2 |
/* |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
3 |
* Copyright (c) 2007 University of Washington |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
4 |
* |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
7 |
* published by the Free Software Foundation; |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
8 |
* |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
12 |
* GNU General Public License for more details. |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
13 |
* |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
17 |
* |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
18 |
* Author: Craig Dowell <craigdo@ee.washington.edu> |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
19 |
*/ |
245
28ba3a5cdff8
add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
20 |
|
973
2aea9e9f698c
src/devices/point-to-point/p2p-* -> src/devices/point-to-point/point-to-point-*
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents:
972
diff
changeset
|
21 |
#include "point-to-point-channel.h" |
2aea9e9f698c
src/devices/point-to-point/p2p-* -> src/devices/point-to-point/point-to-point-*
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents:
972
diff
changeset
|
22 |
#include "point-to-point-net-device.h" |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
23 |
#include "ns3/packet.h" |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
24 |
#include "ns3/simulator.h" |
1504
36ecc970ba96
checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents:
973
diff
changeset
|
25 |
#include "ns3/log.h" |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
26 |
|
1504
36ecc970ba96
checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents:
973
diff
changeset
|
27 |
NS_LOG_COMPONENT_DEFINE ("PointToPointChannel"); |
245
28ba3a5cdff8
add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
28 |
|
28ba3a5cdff8
add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
29 |
namespace ns3 { |
28ba3a5cdff8
add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
30 |
|
2743
242775731804
ensure type is registered
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2734
diff
changeset
|
31 |
NS_OBJECT_ENSURE_REGISTERED (PointToPointChannel); |
242775731804
ensure type is registered
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2734
diff
changeset
|
32 |
|
2592
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1870
diff
changeset
|
33 |
TypeId |
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1870
diff
changeset
|
34 |
PointToPointChannel::GetTypeId (void) |
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1870
diff
changeset
|
35 |
{ |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2592
diff
changeset
|
36 |
static TypeId tid = TypeId ("ns3::PointToPointChannel") |
2592
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1870
diff
changeset
|
37 |
.SetParent<Channel> () |
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1870
diff
changeset
|
38 |
.AddConstructor<PointToPointChannel> () |
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1870
diff
changeset
|
39 |
.AddAttribute ("BitRate", "The maximum bitrate of the channel", |
2965
4b28e9740e3b
get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
40 |
DataRateValue (DataRate (0xffffffff)), |
2592
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1870
diff
changeset
|
41 |
MakeDataRateAccessor (&PointToPointChannel::m_bps), |
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1870
diff
changeset
|
42 |
MakeDataRateChecker ()) |
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1870
diff
changeset
|
43 |
.AddAttribute ("Delay", "Transmission delay through the channel", |
2965
4b28e9740e3b
get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
44 |
TimeValue (Seconds (0)), |
2592
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1870
diff
changeset
|
45 |
MakeTimeAccessor (&PointToPointChannel::m_delay), |
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1870
diff
changeset
|
46 |
MakeTimeChecker ()) |
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1870
diff
changeset
|
47 |
; |
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1870
diff
changeset
|
48 |
return tid; |
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1870
diff
changeset
|
49 |
} |
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1870
diff
changeset
|
50 |
|
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
51 |
// |
369
29ea5d1a83c8
Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents:
368
diff
changeset
|
52 |
// By default, you get a channel with the name "PointToPoint Channel" that |
29ea5d1a83c8
Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents:
368
diff
changeset
|
53 |
// has an "infitely" fast transmission speed and zero delay. |
29ea5d1a83c8
Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents:
368
diff
changeset
|
54 |
PointToPointChannel::PointToPointChannel() |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
55 |
: |
369
29ea5d1a83c8
Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents:
368
diff
changeset
|
56 |
Channel ("PointToPoint Channel"), |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
57 |
m_nDevices(0) |
245
28ba3a5cdff8
add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
58 |
{ |
2983
e3a416fe9dd5
NS_LOG_FUNCTION -> NS_LOG_FUNCTION_NOARGS and NS_LOG_PARAMS -> NS_LOG_FUNCTION
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
59 |
NS_LOG_FUNCTION_NOARGS (); |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
60 |
} |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
61 |
|
1504
36ecc970ba96
checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents:
973
diff
changeset
|
62 |
void |
568
e1660959ecbb
use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
378
diff
changeset
|
63 |
PointToPointChannel::Attach(Ptr<PointToPointNetDevice> device) |
245
28ba3a5cdff8
add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
64 |
{ |
2983
e3a416fe9dd5
NS_LOG_FUNCTION -> NS_LOG_FUNCTION_NOARGS and NS_LOG_PARAMS -> NS_LOG_FUNCTION
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
65 |
NS_LOG_FUNCTION (this << device); |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
66 |
NS_ASSERT(m_nDevices < N_DEVICES && "Only two devices permitted"); |
568
e1660959ecbb
use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
378
diff
changeset
|
67 |
NS_ASSERT(device != 0); |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
68 |
|
926
1fdec986d774
Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents:
773
diff
changeset
|
69 |
m_link[m_nDevices++].m_src = device; |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
70 |
// |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
71 |
// If we have both devices connected to the channel, then finish introducing |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
72 |
// the two halves and set the links to IDLE. |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
73 |
// |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
74 |
if (m_nDevices == N_DEVICES) |
245
28ba3a5cdff8
add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
75 |
{ |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
76 |
m_link[0].m_dst = m_link[1].m_src; |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
77 |
m_link[1].m_dst = m_link[0].m_src; |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
78 |
m_link[0].m_state = IDLE; |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
79 |
m_link[1].m_state = IDLE; |
245
28ba3a5cdff8
add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
80 |
} |
28ba3a5cdff8
add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
81 |
} |
28ba3a5cdff8
add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
82 |
|
1504
36ecc970ba96
checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents:
973
diff
changeset
|
83 |
bool |
1866
e7dbcc4df546
do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1504
diff
changeset
|
84 |
PointToPointChannel::TransmitStart(Ptr<Packet> p, |
e7dbcc4df546
do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1504
diff
changeset
|
85 |
Ptr<PointToPointNetDevice> src, |
e7dbcc4df546
do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1504
diff
changeset
|
86 |
const Time& txTime) |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
87 |
{ |
2983
e3a416fe9dd5
NS_LOG_FUNCTION -> NS_LOG_FUNCTION_NOARGS and NS_LOG_PARAMS -> NS_LOG_FUNCTION
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
88 |
NS_LOG_FUNCTION (this << p << src); |
1866
e7dbcc4df546
do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1504
diff
changeset
|
89 |
NS_LOG_LOGIC ("UID is " << p->GetUid () << ")"); |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
90 |
|
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
91 |
NS_ASSERT(m_link[0].m_state != INITIALIZING); |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
92 |
NS_ASSERT(m_link[1].m_state != INITIALIZING); |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
93 |
|
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
94 |
uint32_t wire = src == m_link[0].m_src ? 0 : 1; |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
95 |
|
926
1fdec986d774
Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents:
773
diff
changeset
|
96 |
// Here we schedule the packet receive event at the receiver, |
1fdec986d774
Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents:
773
diff
changeset
|
97 |
// which simplifies this model quite a bit. The channel just |
1fdec986d774
Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents:
773
diff
changeset
|
98 |
// adds the propagation delay time |
1fdec986d774
Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents:
773
diff
changeset
|
99 |
Simulator::Schedule (txTime + m_delay, |
1fdec986d774
Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents:
773
diff
changeset
|
100 |
&PointToPointNetDevice::Receive, |
1fdec986d774
Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents:
773
diff
changeset
|
101 |
m_link[wire].m_dst, p); |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
102 |
return true; |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
103 |
} |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
104 |
|
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
105 |
uint32_t |
369
29ea5d1a83c8
Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents:
368
diff
changeset
|
106 |
PointToPointChannel::GetNDevices (void) const |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
107 |
{ |
2983
e3a416fe9dd5
NS_LOG_FUNCTION -> NS_LOG_FUNCTION_NOARGS and NS_LOG_PARAMS -> NS_LOG_FUNCTION
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
108 |
NS_LOG_FUNCTION_NOARGS (); |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
109 |
return m_nDevices; |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
110 |
} |
378
32bd402ea5ea
remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents:
373
diff
changeset
|
111 |
|
1792
bca29198a7dd
Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents:
1504
diff
changeset
|
112 |
Ptr<PointToPointNetDevice> |
2720
3c7d9f8c9034
make ns3::Channel wholy pure.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2602
diff
changeset
|
113 |
PointToPointChannel::GetPointToPointDevice (uint32_t i) const |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
114 |
{ |
2983
e3a416fe9dd5
NS_LOG_FUNCTION -> NS_LOG_FUNCTION_NOARGS and NS_LOG_PARAMS -> NS_LOG_FUNCTION
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
115 |
NS_LOG_FUNCTION_NOARGS (); |
378
32bd402ea5ea
remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents:
373
diff
changeset
|
116 |
NS_ASSERT(i < 2); |
32bd402ea5ea
remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents:
373
diff
changeset
|
117 |
return m_link[i].m_src; |
32bd402ea5ea
remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents:
373
diff
changeset
|
118 |
} |
32bd402ea5ea
remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents:
373
diff
changeset
|
119 |
|
926
1fdec986d774
Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents:
773
diff
changeset
|
120 |
const DataRate& |
378
32bd402ea5ea
remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents:
373
diff
changeset
|
121 |
PointToPointChannel::GetDataRate (void) |
32bd402ea5ea
remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents:
373
diff
changeset
|
122 |
{ |
2983
e3a416fe9dd5
NS_LOG_FUNCTION -> NS_LOG_FUNCTION_NOARGS and NS_LOG_PARAMS -> NS_LOG_FUNCTION
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
123 |
NS_LOG_FUNCTION_NOARGS (); |
378
32bd402ea5ea
remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents:
373
diff
changeset
|
124 |
return m_bps; |
32bd402ea5ea
remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents:
373
diff
changeset
|
125 |
} |
32bd402ea5ea
remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents:
373
diff
changeset
|
126 |
|
926
1fdec986d774
Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents:
773
diff
changeset
|
127 |
const Time& |
378
32bd402ea5ea
remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents:
373
diff
changeset
|
128 |
PointToPointChannel::GetDelay (void) |
32bd402ea5ea
remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents:
373
diff
changeset
|
129 |
{ |
2983
e3a416fe9dd5
NS_LOG_FUNCTION -> NS_LOG_FUNCTION_NOARGS and NS_LOG_PARAMS -> NS_LOG_FUNCTION
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
130 |
NS_LOG_FUNCTION_NOARGS (); |
378
32bd402ea5ea
remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents:
373
diff
changeset
|
131 |
return m_delay; |
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
132 |
} |
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
133 |
|
1792
bca29198a7dd
Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents:
1504
diff
changeset
|
134 |
Ptr<NetDevice> |
2720
3c7d9f8c9034
make ns3::Channel wholy pure.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2602
diff
changeset
|
135 |
PointToPointChannel::GetDevice (uint32_t i) const |
1792
bca29198a7dd
Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents:
1504
diff
changeset
|
136 |
{ |
2983
e3a416fe9dd5
NS_LOG_FUNCTION -> NS_LOG_FUNCTION_NOARGS and NS_LOG_PARAMS -> NS_LOG_FUNCTION
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
137 |
NS_LOG_FUNCTION_NOARGS (); |
2734
b9fc3b64e593
Fix a typo that caused stack overflow
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
2720
diff
changeset
|
138 |
return GetPointToPointDevice (i); |
1792
bca29198a7dd
Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents:
1504
diff
changeset
|
139 |
} |
bca29198a7dd
Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents:
1504
diff
changeset
|
140 |
|
368
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
141 |
|
1df1165d6a68
Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents:
331
diff
changeset
|
142 |
} // namespace ns3 |