src/devices/point-to-point/point-to-point-channel.h
author Craig Dowell <craigdo@ee.washington.edu>
Mon, 29 Oct 2007 12:48:01 -0700
changeset 1867 16deaedc0380
parent 1794 1e3a6022bcb1
parent 1866 e7dbcc4df546
child 2592 3ebf97150166
permissions -rw-r--r--
merge in packet.bundle
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
 *
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
 */
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    19
#ifndef POINT_TO_POINT_CHANNEL_H
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    20
#define POINT_TO_POINT_CHANNEL_H
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    21
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    22
#include <list>
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    23
#include "ns3/channel.h"
568
e1660959ecbb use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 378
diff changeset
    24
#include "ns3/ptr.h"
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    25
#include "ns3/nstime.h"
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
    26
#include "ns3/data-rate.h"
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
namespace ns3 {
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    29
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
    30
class PointToPointNetDevice;
1866
e7dbcc4df546 do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 973
diff changeset
    31
class Packet;
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    32
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    33
/**
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    34
 * \brief Simple Point To Point Channel.
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    35
 *
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
    36
 * This class represents a very simple point to point channel.  Think full
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
    37
 * duplex RS-232 or RS-422 with null modem and no handshaking.  There is no
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
    38
 * multi-drop capability on this channel -- there can be a maximum of two 
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
    39
 * point-to-point net devices connected.  Once we start talking about multi-
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
    40
 * drop, or CSMA, or some other sharing mechanism, things begin getting 
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
    41
 * complicated quickly.  Rather than invent some ad-hoc mechanism, we just
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
    42
 * Keep It Simple everywhere.
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
 * When the channel is instaniated, the constructor takes parameters for
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
    45
 * a single speed, in bits per second, and a speed-of-light delay time as a
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
    46
 * Time object.  Both directions use the same speed and delay time.
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    47
 *
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    48
 * There are two "wires" in the channel.  The first device connected gets the
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    49
 * [0] wire to transmit on.  The second device gets the [1] wire.  There is a
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    50
 * state (IDLE, TRANSMITTING) associated with each wire.
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
class PointToPointChannel : public Channel {
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    53
public:
624
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    54
  /**
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    55
   * \brief Create a PointToPointChannel
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    56
   *
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    57
   * By default, you get a channel with the name "PointToPoint Channel" that
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    58
   * has an "infitely" fast transmission speed and zero delay.
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    59
   */
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    60
  PointToPointChannel ();
624
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    61
  
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    62
  /**
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    63
   * \brief Create a PointToPointChannel
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    64
   *
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 624
diff changeset
    65
   * \param bps The maximum bitrate of the channel
624
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    66
   * \param delay Transmission delay through the channel
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    67
   */  
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    68
  PointToPointChannel (const DataRate& bps, const Time& delay);
624
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    69
  
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    70
  /**
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    71
   * \brief Create a PointToPointChannel
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    72
   *
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    73
   * \param name the name of the channel for identification purposes
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 624
diff changeset
    74
   * \param bps The maximum bitrate of the channel
624
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    75
   * \param delay Transmission delay through the channel
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    76
   */
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    77
  PointToPointChannel (const std::string& name,
1867
16deaedc0380 merge in packet.bundle
Craig Dowell <craigdo@ee.washington.edu>
parents: 1794 1866
diff changeset
    78
                       const DataRate& bps, const Time& delay);
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    79
624
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    80
  /**
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    81
   * \brief Attach a given netdevice to this channel
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    82
   * \param device pointer to the netdevice to attach to the channel
11cc5c692eb4 datarate, packet, defaultvalue, object dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 568
diff changeset
    83
   */
568
e1660959ecbb use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 378
diff changeset
    84
  void Attach (Ptr<PointToPointNetDevice> device);
1794
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
    85
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
    86
  /**
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
    87
   * \brief Attach a given netdevice to this channel
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
    88
   * \param p Packet to transmit
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
    89
   * \param src Source PointToPointNetDevice
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
    90
   * \param txTime Transmit time to apply
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
    91
   */
1866
e7dbcc4df546 do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 973
diff changeset
    92
  bool TransmitStart (Ptr<Packet> p, Ptr<PointToPointNetDevice> src,
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 624
diff changeset
    93
                      const Time& txTime);
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    94
1794
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
    95
  /**
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
    96
   * \brief Get number of devices on this channel
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
    97
   * \returns number of devices on this channel
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
    98
   */
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
    99
  virtual uint32_t GetNDevices (void) const;
1792
bca29198a7dd Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents: 973
diff changeset
   100
  /*
1794
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   101
   * \brief Get PointToPointNetDevice corresponding to index i on this channel
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   102
   * \param i Index number of the device requested
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   103
   * \returns Ptr to PointToPointNetDevice requested
1792
bca29198a7dd Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents: 973
diff changeset
   104
   */
bca29198a7dd Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents: 973
diff changeset
   105
  Ptr<PointToPointNetDevice> GetDevice (uint32_t i) const;
1794
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   106
  /*
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   107
   * \brief Get reference to DataRate for this channel
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   108
   * \returns const reference to underlying DataRate object
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   109
   */
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   110
  const DataRate& GetDataRate (void);
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   111
  /*
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   112
   * \brief Get reference to Time object storing the delay on this channel
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   113
   * \returns const reference to underlying Time object
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   114
   */
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   115
  const Time&     GetDelay (void);
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   116
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   117
private:
1792
bca29198a7dd Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents: 973
diff changeset
   118
1794
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   119
  // Each point to point link has exactly two net devices
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   120
  static const int N_DEVICES = 2;
1e3a6022bcb1 miscellaneous point-to-point-channel.h cleanups
Tom Henderson <tomh@tomh.org>
parents: 1792
diff changeset
   121
1792
bca29198a7dd Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents: 973
diff changeset
   122
  virtual Ptr<NetDevice> DoGetDevice (uint32_t i) const;
bca29198a7dd Make GetDevice return pointer to appropriately subclassed NetDevice
Tom Henderson <tomh@tomh.org>
parents: 973
diff changeset
   123
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   124
  DataRate      m_bps;
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   125
  Time          m_delay;
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   126
  int32_t       m_nDevices;
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   127
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   128
  enum WireState
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   129
    {
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   130
      INITIALIZING,
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   131
      IDLE,
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
   132
      TRANSMITTING,
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 373
diff changeset
   133
      PROPAGATING
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   134
    };
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   135
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   136
  class Link
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   137
  {
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   138
  public:
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   139
    Link() : m_state (INITIALIZING), m_src (0), m_dst (0) {}
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
    WireState              m_state;
568
e1660959ecbb use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 378
diff changeset
   141
    Ptr<PointToPointNetDevice> m_src;
e1660959ecbb use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 378
diff changeset
   142
    Ptr<PointToPointNetDevice> m_dst;
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   143
  };
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
  Link    m_link[N_DEVICES];
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   146
};
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   147
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   148
} // namespace ns3
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   149
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
   150
#endif /* POINT_TO_POINT_CHANNEL_H */