wifi: Use meter_u weak alias

This commit is contained in:
Sébastien Deronne
2024-06-13 20:40:24 +02:00
committed by Sébastien Deronne
parent 9ffc5f6290
commit d54e5c4e91
20 changed files with 46 additions and 46 deletions

View File

@@ -85,7 +85,7 @@ main(int argc, char* argv[])
{
uint32_t payloadSize{1472}; // bytes
Time simulationTime{"10s"};
double distance{5}; // meters
meter_u distance{5};
bool enablePcap{false};
bool verifyResults{false}; // used for regression
Time txopLimit{"4096us"};

View File

@@ -73,7 +73,7 @@ main(int argc, char* argv[])
{
uint32_t payloadSize{1472}; // bytes
Time simulationTime{"10s"};
double distance{5}; // meters
meter_u distance{5};
bool enableRts{false};
bool enablePcap{false};
bool verifyResults{false}; // used for regression

View File

@@ -144,7 +144,7 @@ main(int argc, char* argv[])
uint16_t auxPhyChWidth{20};
bool auxPhyTxCapable{true};
Time simulationTime{"10s"};
double distance{1.0}; // meters
meter_u distance{1.0};
double frequency{5}; // whether the first link operates in the 2.4, 5 or 6 GHz
double frequency2{0}; // whether the second link operates in the 2.4, 5 or 6 GHz (0 means no
// second link exists)

View File

@@ -64,8 +64,8 @@ main(int argc, char* argv[])
bool use80Plus80{false};
bool useExtendedBlockAck{false};
Time simulationTime{"10s"};
double distance{1.0}; // meters
double frequency{5}; // whether 2.4, 5 or 6 GHz
meter_u distance{1.0};
double frequency{5}; // whether 2.4, 5 or 6 GHz
std::size_t nStations{1};
std::string dlAckSeqType{"NO-OFDMA"};
bool enableUlOfdma{false};

View File

@@ -57,9 +57,9 @@ main(int argc, char* argv[])
bool udp{true};
bool useRts{false};
Time simulationTime{"10s"};
double distance{1.0}; // meters
double frequency{5}; // whether 2.4 or 5 GHz
int mcs{-1}; // -1 indicates an unset value
meter_u distance{1.0};
double frequency{5}; // whether 2.4 or 5 GHz
int mcs{-1}; // -1 indicates an unset value
double minExpectedThroughput{0.0};
double maxExpectedThroughput{0.0};

View File

@@ -38,7 +38,7 @@ main(int argc, char* argv[])
{
uint32_t nWifi{4};
Time simulationTime{"10s"};
double distance{1.0}; // meters
meter_u distance{1.0};
uint16_t mcs{7};
uint8_t channelWidth{20}; // MHz
bool useShortGuardInterval{false};

View File

@@ -393,7 +393,7 @@ main(int argc, char* argv[])
int sta1_x{5};
int sta1_y{0};
uint32_t steps{200};
uint32_t stepsSize{1};
meter_u stepsSize{1};
Time stepsTime{"1s"};
CommandLine cmd(__FILE__);

View File

@@ -139,7 +139,7 @@ int
main(int argc, char* argv[])
{
std::string phyMode{"DsssRate1Mbps"};
double distance{100}; // m
meter_u distance{100};
uint32_t packetSize{1000}; // bytes
uint32_t numPackets{1};
uint32_t numNodes{25}; // by default, 5x5

View File

@@ -161,7 +161,7 @@ main(int argc, char* argv[])
uint32_t numPackets{1};
Time interPacketInterval{"1s"};
Time startTime{"10s"};
double distanceToRx{100.0}; // meters
meter_u distanceToRx{100.0};
double offset{91}; // This is a magic number used to set the
// transmit power, based on other configuration

View File

@@ -146,9 +146,9 @@ int
main(int argc, char* argv[])
{
Time duration{"10s"};
double d1{30.0}; // meters
double d2{30.0}; // meters
double d3{150.0}; // meters
meter_u d1{30.0};
meter_u d2{30.0};
meter_u d3{150.0};
dBm_u powSta1{10.0};
dBm_u powSta2{10.0};
dBm_u powAp1{21.0};

View File

@@ -118,7 +118,7 @@ int
main(int argc, char* argv[])
{
bool udp{true};
double distance{50};
meter_u distance{50};
Time simulationTime{"10s"};
uint16_t index{256};
std::string wifiType{"ns3::SpectrumWifiPhy"};

View File

@@ -169,7 +169,7 @@ int
main(int argc, char* argv[])
{
bool udp{true};
double distance{50};
meter_u distance{50};
Time simulationTime{"10s"};
uint16_t index{256};
std::string wifiType{"ns3::SpectrumWifiPhy"};

View File

@@ -89,7 +89,7 @@ NS_LOG_COMPONENT_DEFINE("WifiSpectrumSaturationExample");
int
main(int argc, char* argv[])
{
double distance{1};
meter_u distance{1};
Time simulationTime{"10s"};
uint16_t index{256};
uint32_t channelWidth{0};

View File

@@ -100,7 +100,7 @@ main(int argc, char* argv[])
uint32_t payloadSize{1472}; // bytes
Time simulationTime{"10s"};
double txopLimit{3520}; // microseconds
double distance{5}; // meters
meter_u distance{5};
bool enableRts{false};
bool enablePcap{false};
bool verifyResults{false}; // used for regression

View File

@@ -57,8 +57,8 @@ main(int argc, char* argv[])
bool useRts{false};
bool use80Plus80{false};
Time simulationTime{"10s"};
double distance{1.0}; // meters
int mcs{-1}; // -1 indicates an unset value
meter_u distance{1.0};
int mcs{-1}; // -1 indicates an unset value
std::string phyModel{"Yans"};
double minExpectedThroughput{0.0};
double maxExpectedThroughput{0.0};

View File

@@ -81,7 +81,7 @@ main(int argc, char* argv[])
backboneDevices = csma.Install(backboneNodes);
double wifiX = 0.0;
meter_u wifiX = 0.0;
YansWifiPhyHelper wifiPhy;
wifiPhy.SetPcapDataLinkType(WifiPhyHelper::DLT_IEEE802_11_RADIO);

View File

@@ -2399,7 +2399,7 @@ class Experiment
* \param pcap flag to enable/disable PCAP files generation
* \param infra flag to enable infrastructure model, ring adhoc network if not set
* \param guardIntervalNs the guard interval in ns
* \param distanceM the distance in meters
* \param distance the distance
* \param apTxPower the AP transmit power
* \param staTxPower the STA transmit power
* \param pktInterval the packet interval
@@ -2415,7 +2415,7 @@ class Experiment
bool pcap,
bool infra,
uint16_t guardIntervalNs,
double distanceM,
meter_u distance,
dBm_u apTxPower,
dBm_u staTxPower,
Time pktInterval);
@@ -2436,7 +2436,7 @@ Experiment::Run(const WifiHelper& helper,
bool pcap,
bool infra,
uint16_t guardIntervalNs,
double distance,
meter_u distance,
dBm_u apTxPower,
dBm_u staTxPower,
Time pktInterval)
@@ -2705,9 +2705,9 @@ main(int argc, char* argv[])
uint16_t pktInterval =
1000; ///< The socket packet interval in microseconds (a higher value is needed to reach
///< saturation conditions as the channel bandwidth or the MCS increases)
double distance = 0.001; ///< The distance in meters between the AP and the STAs
dBm_u apTxPower = 16; ///< The transmit power of the AP (if infrastructure only)
dBm_u staTxPower = 16; ///< The transmit power of each STA (or all STAs if adhoc)
meter_u distance = 0.001; ///< The distance in meters between the AP and the STAs
dBm_u apTxPower = 16; ///< The transmit power of the AP (if infrastructure only)
dBm_u staTxPower = 16; ///< The transmit power of each STA (or all STAs if adhoc)
// Disable fragmentation and RTS/CTS
Config::SetDefault("ns3::WifiRemoteStationManager::FragmentationThreshold",

View File

@@ -28,7 +28,7 @@ class PsrExperiment
struct Input
{
Input();
double distance; ///< distance
meter_u distance; ///< distance
std::string txMode; ///< transmit mode
uint8_t txPowerLevel; ///< transmit power level
uint32_t packetSize; ///< packet size

View File

@@ -73,8 +73,8 @@ class InterferenceExperiment
{
Input();
Time interval; ///< interval
double xA; ///< x A
double xB; ///< x B
meter_u xA; ///< x A
meter_u xB; ///< x B
std::string txModeA; ///< transmit mode A
std::string txModeB; ///< transmit mode B
double txPowerLevelA; ///< transmit power level A

View File

@@ -87,18 +87,18 @@ class TestInterBssConstantObssPdAlgo : public TestCase
/**
* Allocate the node positions
* \param d1 distance d1 (in meters)
* \param d2 distance d2 (in meters)
* \param d3 distance d3 (in meters)
* \param d4 distance d4 (in meters)
* \param d5 distance d5 (in meters)
* \param d1 distance d1
* \param d2 distance d2
* \param d3 distance d3
* \param d4 distance d4
* \param d5 distance d5
* \return the node positions
*/
Ptr<ListPositionAllocator> AllocatePositions(double d1,
double d2,
double d3,
double d4,
double d5);
Ptr<ListPositionAllocator> AllocatePositions(meter_u d1,
meter_u d2,
meter_u d3,
meter_u d4,
meter_u d5);
/**
* Set the expected transmit power
@@ -233,11 +233,11 @@ TestInterBssConstantObssPdAlgo::~TestInterBssConstantObssPdAlgo()
}
Ptr<ListPositionAllocator>
TestInterBssConstantObssPdAlgo::AllocatePositions(double d1,
double d2,
double d3,
double d4,
double d5)
TestInterBssConstantObssPdAlgo::AllocatePositions(meter_u d1,
meter_u d2,
meter_u d3,
meter_u d4,
meter_u d5)
{
Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator>();
positionAlloc->Add(Vector(0.0, 0.0, 0.0)); // AP1