LEFT | RIGHT |
(no file at all) | |
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) 2006,2007 INRIA | 3 * Copyright (c) 2006,2007 INRIA |
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 void | 117 void |
118 YansWifiChannel::Receive (Ptr<YansWifiPhy> phy, Ptr<Packet> packet, double rxPow
erDbm, Time duration) | 118 YansWifiChannel::Receive (Ptr<YansWifiPhy> phy, Ptr<Packet> packet, double rxPow
erDbm, Time duration) |
119 { | 119 { |
120 NS_LOG_FUNCTION (phy << packet << rxPowerDbm << duration.GetSeconds ()); | 120 NS_LOG_FUNCTION (phy << packet << rxPowerDbm << duration.GetSeconds ()); |
121 phy->StartReceivePreambleAndHeader (packet, DbmToW (rxPowerDbm + phy->GetRxGai
n ()), duration); | 121 phy->StartReceivePreambleAndHeader (packet, DbmToW (rxPowerDbm + phy->GetRxGai
n ()), duration); |
122 } | 122 } |
123 | 123 |
124 uint32_t | 124 uint32_t |
125 YansWifiChannel::GetNDevices (void) const | 125 YansWifiChannel::GetNDevices (void) const |
126 { | 126 { |
127 return m_phyList.size (); | 127 return static_cast<uint32_t> (m_phyList.size ()); |
128 } | 128 } |
129 | 129 |
130 Ptr<NetDevice> | 130 Ptr<NetDevice> |
131 YansWifiChannel::GetDevice (uint32_t i) const | 131 YansWifiChannel::GetDevice (uint32_t i) const |
132 { | 132 { |
133 return m_phyList[i]->GetDevice ()->GetObject<NetDevice> (); | 133 return m_phyList[i]->GetDevice ()->GetObject<NetDevice> (); |
134 } | 134 } |
135 | 135 |
136 void | 136 void |
137 YansWifiChannel::Add (Ptr<YansWifiPhy> phy) | 137 YansWifiChannel::Add (Ptr<YansWifiPhy> phy) |
138 { | 138 { |
139 m_phyList.push_back (phy); | 139 m_phyList.push_back (phy); |
140 } | 140 } |
141 | 141 |
142 int64_t | 142 int64_t |
143 YansWifiChannel::AssignStreams (int64_t stream) | 143 YansWifiChannel::AssignStreams (int64_t stream) |
144 { | 144 { |
145 NS_LOG_FUNCTION (this << stream); | 145 NS_LOG_FUNCTION (this << stream); |
146 int64_t currentStream = stream; | 146 int64_t currentStream = stream; |
147 currentStream += m_loss->AssignStreams (stream); | 147 currentStream += m_loss->AssignStreams (stream); |
148 return (currentStream - stream); | 148 return (currentStream - stream); |
149 } | 149 } |
150 | 150 |
151 } //namespace ns3 | 151 } //namespace ns3 |
LEFT | RIGHT |