OLD | NEW |
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 * This program is free software; you can redistribute it and/or modify | 3 * This program is free software; you can redistribute it and/or modify |
4 * it under the terms of the GNU General Public License version 2 as | 4 * it under the terms of the GNU General Public License version 2 as |
5 * published by the Free Software Foundation; | 5 * published by the Free Software Foundation; |
6 * | 6 * |
7 * This program is distributed in the hope that it will be useful, | 7 * This program is distributed in the hope that it will be useful, |
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 * GNU General Public License for more details. | 10 * GNU General Public License for more details. |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 } | 171 } |
172 | 172 |
173 // refer to 1609.4-2010 chapter 5.4.1 | 173 // refer to 1609.4-2010 chapter 5.4.1 |
174 // Management frames are assigned the highest AC (AC_VO). | 174 // Management frames are assigned the highest AC (AC_VO). |
175 SocketPriorityTag priorityTag; | 175 SocketPriorityTag priorityTag; |
176 priorityTag.SetPriority (7); | 176 priorityTag.SetPriority (7); |
177 vsc->AddPacketTag (priorityTag); | 177 vsc->AddPacketTag (priorityTag); |
178 | 178 |
179 WifiTxVector txVector; | 179 WifiTxVector txVector; |
180 txVector.SetChannelWidth (10); | 180 txVector.SetChannelWidth (10); |
181 txVector.SetTxPowerLevel (manager->GetManagementPowerLevel (channel)); | 181 txVector.SetTxPowerLevel (static_cast<uint8_t>(manager->GetManagementPowerLeve
l (channel))); |
182 txVector.SetMode (manager->GetManagementDataRate (channel)); | 182 txVector.SetMode (manager->GetManagementDataRate (channel)); |
183 txVector.SetPreambleType (manager->GetManagementPreamble (channel)); | 183 txVector.SetPreambleType (manager->GetManagementPreamble (channel)); |
184 HigherLayerTxVectorTag tag = HigherLayerTxVectorTag (txVector, manager->GetMan
agementAdaptable (channel)); | 184 HigherLayerTxVectorTag tag = HigherLayerTxVectorTag (txVector, manager->GetMan
agementAdaptable (channel)); |
185 vsc->AddPacketTag (tag); | 185 vsc->AddPacketTag (tag); |
186 | 186 |
187 Ptr<OcbWifiMac> mac = m_device->GetMac (channel); | 187 Ptr<OcbWifiMac> mac = m_device->GetMac (channel); |
188 mac->SendVsc (vsc, peer, oi); | 188 mac->SendVsc (vsc, peer, oi); |
189 } | 189 } |
190 | 190 |
191 void | 191 void |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 NS_ASSERT (oi == oi_1609); | 268 NS_ASSERT (oi == oi_1609); |
269 if (m_vsaReceived.IsNull ()) | 269 if (m_vsaReceived.IsNull ()) |
270 { | 270 { |
271 return true; | 271 return true; |
272 } | 272 } |
273 uint32_t channelNumber = mac->GetWifiPhy ()->GetChannelNumber (); | 273 uint32_t channelNumber = mac->GetWifiPhy ()->GetChannelNumber (); |
274 uint32_t managementId = oi.GetManagementId (); | 274 uint32_t managementId = oi.GetManagementId (); |
275 return m_vsaReceived (vsc, src, managementId, channelNumber); | 275 return m_vsaReceived (vsc, src, managementId, channelNumber); |
276 } | 276 } |
277 } // namespace ns3 | 277 } // namespace ns3 |
OLD | NEW |