Left: | ||
Right: |
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 * Copyright (c) 2016 | 3 * Copyright (c) 2016 |
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
76 } | 76 } |
77 return false; | 77 return false; |
78 } | 78 } |
79 | 79 |
80 uint16_t | 80 uint16_t |
81 ConvertGuardIntervalToNanoSeconds (WifiMode mode, bool htShortGuardInterval, Tim e heGuardInterval) | 81 ConvertGuardIntervalToNanoSeconds (WifiMode mode, bool htShortGuardInterval, Tim e heGuardInterval) |
82 { | 82 { |
83 uint16_t gi; | 83 uint16_t gi; |
84 if (mode.GetModulationClass () == WIFI_MOD_CLASS_HE) | 84 if (mode.GetModulationClass () == WIFI_MOD_CLASS_HE) |
85 { | 85 { |
86 gi = heGuardInterval.GetNanoSeconds (); | 86 gi = static_cast<uint16_t>(heGuardInterval.GetNanoSeconds ()); |
S. Deronne
2018/03/30 06:56:54
define gi as int64_t? More globally we should do t
ammo6818-vandals.uidaho.edu
2018/04/05 17:51:01
no, gi is used in lots of places as uint16_t so it
| |
87 } | 87 } |
88 else if (mode.GetModulationClass () == WIFI_MOD_CLASS_HT || mode.GetModulation Class () == WIFI_MOD_CLASS_VHT) | 88 else if (mode.GetModulationClass () == WIFI_MOD_CLASS_HT || mode.GetModulation Class () == WIFI_MOD_CLASS_VHT) |
89 { | 89 { |
90 gi = htShortGuardInterval ? 400 : 800; | 90 gi = htShortGuardInterval ? 400 : 800; |
91 } | 91 } |
92 else | 92 else |
93 { | 93 { |
94 gi = 800; | 94 gi = 800; |
95 } | 95 } |
96 return gi; | 96 return gi; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
165 size = packet->GetSize (); | 165 size = packet->GetSize (); |
166 } | 166 } |
167 else | 167 else |
168 { | 168 { |
169 size = packet->GetSize () + hdr->GetSize () + fcs.GetSerializedSize (); | 169 size = packet->GetSize () + hdr->GetSize () + fcs.GetSerializedSize (); |
170 } | 170 } |
171 return size; | 171 return size; |
172 } | 172 } |
173 | 173 |
174 } //namespace ns3 | 174 } //namespace ns3 |
OLD | NEW |