LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2007 University of Washington | 3 * Copyright (c) 2007 University of Washington |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 */ | 84 */ |
85 Ptr<PointToPointNetDevice> GetPointToPointDevice (uint32_t i) const; | 85 Ptr<PointToPointNetDevice> GetPointToPointDevice (uint32_t i) const; |
86 | 86 |
87 /* | 87 /* |
88 * \brief Get NetDevice corresponding to index i on this channel | 88 * \brief Get NetDevice corresponding to index i on this channel |
89 * \param i Index number of the device requested | 89 * \param i Index number of the device requested |
90 * \returns Ptr to NetDevice requested | 90 * \returns Ptr to NetDevice requested |
91 */ | 91 */ |
92 virtual Ptr<NetDevice> GetDevice (uint32_t i) const; | 92 virtual Ptr<NetDevice> GetDevice (uint32_t i) const; |
93 | 93 |
| 94 protected: |
94 /* | 95 /* |
95 * \brief Get the delay associated with this channel | 96 * \brief Get the delay associated with this channel |
96 * \returns Time delay | 97 * \returns Time delay |
97 */ | 98 */ |
98 Time GetDelay (void); | 99 Time GetDelay (void) const; |
99 | 100 |
100 protected:· | 101 /* |
| 102 * \brief Check to make sure the link is initialized |
| 103 * \returns true if initialized, asserts otherwise |
| 104 */ |
| 105 bool IsInitialized (void) const; |
| 106 |
| 107 /* |
| 108 * \brief Get the net-device source· |
| 109 * \param i the link requested |
| 110 * \returns Ptr to PointToPointNetDevice source for the· |
| 111 * specified link |
| 112 */ |
| 113 Ptr<PointToPointNetDevice> GetSource (uint32_t i) const; |
| 114 |
| 115 /* |
| 116 * \brief Get the net-device destination |
| 117 * \param i the link requested |
| 118 * \returns Ptr to PointToPointNetDevice destination for· |
| 119 * the specifed link |
| 120 */ |
| 121 Ptr<PointToPointNetDevice> GetDestination (uint32_t i) const; |
| 122 |
| 123 private: |
101 // Each point to point link has exactly two net devices | 124 // Each point to point link has exactly two net devices |
102 static const int N_DEVICES = 2; | 125 static const int N_DEVICES = 2; |
103 | 126 |
104 Time m_delay; | 127 Time m_delay; |
105 int32_t m_nDevices; | 128 int32_t m_nDevices; |
106 | 129 |
107 /** | 130 /** |
108 * The trace source for the packet transmission animation events that the· | 131 * The trace source for the packet transmission animation events that the· |
109 * device can fire. | 132 * device can fire. |
110 * Arguments to the callback are the packet, transmitting | 133 * Arguments to the callback are the packet, transmitting |
(...skipping 25 matching lines...) Expand all Loading... |
136 Ptr<PointToPointNetDevice> m_src; | 159 Ptr<PointToPointNetDevice> m_src; |
137 Ptr<PointToPointNetDevice> m_dst; | 160 Ptr<PointToPointNetDevice> m_dst; |
138 }; | 161 }; |
139 ···· | 162 ···· |
140 Link m_link[N_DEVICES]; | 163 Link m_link[N_DEVICES]; |
141 }; | 164 }; |
142 | 165 |
143 } // namespace ns3 | 166 } // namespace ns3 |
144 | 167 |
145 #endif /* POINT_TO_POINT_CHANNEL_H */ | 168 #endif /* POINT_TO_POINT_CHANNEL_H */ |
LEFT | RIGHT |