src/devices/point-to-point/point-to-point-channel.cc
author Tom Henderson <tomh@tomh.org>
Wed, 14 Nov 2007 21:59:14 -0800
changeset 1828 6ab68edddf45
parent 1792 bca29198a7dd
child 1870 67b3d2dea3d5
permissions -rw-r--r--
nicer logging of parameters (bug 79 patch from Gustavo)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
 * All rights reserved.
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
     5
 *
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
     6
 * 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
     7
 * 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
     8
 * published by the Free Software Foundation;
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
     9
 *
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    10
 * 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
    11
 * 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
    12
 * 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
    13
 * GNU General Public License for more details.
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    14
 *
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    15
 * 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
    16
 * 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
    17
 * 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
    18
 *
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    19
 * Author: Craig Dowell <craigdo@ee.washington.edu>
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    20
 */
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    21
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
    22
#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
    23
#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
    24
#include "ns3/packet.h"
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    25
#include "ns3/simulator.h"
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 973
diff changeset
    26
#include "ns3/log.h"
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    27
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 973
diff changeset
    28
NS_LOG_COMPONENT_DEFINE ("PointToPointChannel");
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    29
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    30
namespace ns3 {
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    31
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    32
//
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    33
// 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
    34
// 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
    35
PointToPointChannel::PointToPointChannel()
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    36
: 
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    37
  Channel ("PointToPoint Channel"), 
373
960c8e8721de Move simple-p2p.cc to DataRate; fix small bug in DataRate and add include guards
Tom Henderson <tomh@tomh.org>
parents: 369
diff changeset
    38
  m_bps (DataRate(0xffffffff)),
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    39
  m_delay (Seconds(0)),
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    40
  m_nDevices(0)
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    41
{
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 973
diff changeset
    42
  NS_LOG_FUNCTION;
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    43
}
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    44
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    45
PointToPointChannel::PointToPointChannel(
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    46
  const DataRate& bps, 
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    47
  const Time& delay)
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    48
: 
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    49
  Channel ("PointToPoint Channel"), 
373
960c8e8721de Move simple-p2p.cc to DataRate; fix small bug in DataRate and add include guards
Tom Henderson <tomh@tomh.org>
parents: 369
diff changeset
    50
  m_bps (bps),
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    51
  m_delay (delay),
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    52
  m_nDevices(0)
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    53
{
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 973
diff changeset
    54
  NS_LOG_FUNCTION;
1828
6ab68edddf45 nicer logging of parameters (bug 79 patch from Gustavo)
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
    55
  NS_LOG_PARAMS (this << Channel::GetName() << bps.GetBitRate() << delay);
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    56
}
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    57
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    58
PointToPointChannel::PointToPointChannel(
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    59
  const std::string& name,
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    60
  const DataRate& bps, 
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    61
  const Time& delay)
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    62
: 
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    63
  Channel (name),
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    64
  m_bps (bps), 
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    65
  m_delay (delay),
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    66
  m_nDevices(0)
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    67
{
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 973
diff changeset
    68
  NS_LOG_FUNCTION;
1828
6ab68edddf45 nicer logging of parameters (bug 79 patch from Gustavo)
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
    69
  NS_LOG_PARAMS (this << name << bps.GetBitRate() << delay);
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    70
}
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    71
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 973
diff changeset
    72
void
568
e1660959ecbb use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 378
diff changeset
    73
PointToPointChannel::Attach(Ptr<PointToPointNetDevice> device)
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    74
{
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 973
diff changeset
    75
  NS_LOG_FUNCTION;
1828
6ab68edddf45 nicer logging of parameters (bug 79 patch from Gustavo)
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
    76
  NS_LOG_PARAMS (this << device);
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    77
  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
    78
  NS_ASSERT(device != 0);
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    79
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
    80
  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
    81
//
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    82
// 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
    83
// 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
    84
//
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    85
  if (m_nDevices == N_DEVICES)
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    86
    {
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    87
      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
    88
      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
    89
      m_link[0].m_state = IDLE;
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    90
      m_link[1].m_state = IDLE;
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    91
    }
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    92
}
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    93
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 973
diff changeset
    94
bool
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 973
diff changeset
    95
PointToPointChannel::TransmitStart(Packet& p,
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
    96
                                        Ptr<PointToPointNetDevice> src,
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
    97
                                        const Time& txTime)
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    98
{
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 973
diff changeset
    99
  NS_LOG_FUNCTION;
1828
6ab68edddf45 nicer logging of parameters (bug 79 patch from Gustavo)
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   100
  NS_LOG_PARAMS (this << &p << src);
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 973
diff changeset
   101
  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
   102
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   103
  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
   104
  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
   105
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   106
  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
   107
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   108
  // 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
   109
  // 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
   110
  // 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
   111
  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
   112
                       &PointToPointNetDevice::Receive,
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   113
                       m_link[wire].m_dst, p);
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   114
  return true;
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   115
}
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   116
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   117
uint32_t 
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
   118
PointToPointChannel::GetNDevices (void) const
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   119
{
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 973
diff changeset
   120
  NS_LOG_FUNCTION;
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   121
  return m_nDevices;
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   122
}
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
   123
1792
bca29198a7dd Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents: 1504
diff changeset
   124
Ptr<PointToPointNetDevice>
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
   125
PointToPointChannel::GetDevice (uint32_t i) const
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   126
{
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 973
diff changeset
   127
  NS_LOG_FUNCTION;
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
  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
   129
  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
   130
}
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
   131
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   132
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
   133
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
   134
{
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 973
diff changeset
   135
  NS_LOG_FUNCTION;
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
   136
  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
   137
}
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
   138
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   139
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
   140
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
   141
{
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 973
diff changeset
   142
  NS_LOG_FUNCTION;
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
   143
  return m_delay;
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   144
}
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   145
1792
bca29198a7dd Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents: 1504
diff changeset
   146
Ptr<NetDevice>
bca29198a7dd Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents: 1504
diff changeset
   147
PointToPointChannel::DoGetDevice (uint32_t i) const
bca29198a7dd Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents: 1504
diff changeset
   148
{
bca29198a7dd Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents: 1504
diff changeset
   149
  NS_LOG_FUNCTION;
bca29198a7dd Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents: 1504
diff changeset
   150
  return GetDevice (i);
bca29198a7dd Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents: 1504
diff changeset
   151
}
bca29198a7dd Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents: 1504
diff changeset
   152
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   153
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   154
} // namespace ns3