A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
wifi-types.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2025 Universita' degli Studi di Napoli Federico II
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Stefano Avallone <stavallo@unina.it>
7
*/
8
9
#include "
wifi-types.h
"
10
11
#include "
wifi-phy.h
"
12
13
namespace
ns3
14
{
15
16
WifiChannelConfig::WifiChannelConfig
(
const
std::list<TupleWithoutUnits>& tuples)
17
{
18
std::for_each(tuples.cbegin(), tuples.cend(), [
this
](
auto
&& t) {
19
segments.emplace_back(std::make_from_tuple<SegmentWithoutUnits>(t));
20
});
21
}
22
23
WifiChannelConfig
24
WifiChannelConfig::FromString
(
const
std::string& settings,
WifiStandard
standard)
25
{
26
WifiPhy::ChannelSettingsValue
value;
27
value.DeserializeFromString(settings,
WifiPhy::GetChannelSegmentsChecker
());
28
auto
channelCfg =
WifiChannelConfig
(value.Get());
29
if
(standard !=
WIFI_STANDARD_UNSPECIFIED
)
30
{
31
WifiPhy::SetUnspecifiedChannelParams
(channelCfg, standard);
32
}
33
return
channelCfg;
34
}
35
36
}
// namespace ns3
ns3::WifiPhy::SetUnspecifiedChannelParams
static void SetUnspecifiedChannelParams(WifiChannelConfig &channelCfg, WifiStandard standard)
The ChannelSettings attribute allows users to leave some parameters (e.g., the channel width) unspeci...
Definition
wifi-phy.cc:1226
ns3::WifiPhy::ChannelSettingsValue
AttributeContainerValue< ChannelTupleValue, ';'> ChannelSettingsValue
AttributeValue type of a ChannelSegments object.
Definition
wifi-phy.h:959
ns3::WifiPhy::GetChannelSegmentsChecker
static Ptr< const AttributeChecker > GetChannelSegmentsChecker()
Get a checker for the ChannelSettings attribute, which can be used to deserialize a ChannelSegments o...
Definition
wifi-phy.cc:371
ns3::WifiStandard
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
Definition
wifi-standards.h:29
ns3::WIFI_STANDARD_UNSPECIFIED
@ WIFI_STANDARD_UNSPECIFIED
Definition
wifi-standards.h:30
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WifiChannelConfig
Struct defining the configuration of a wifi channel, which can be made of one or multiple channel seg...
Definition
wifi-types.h:94
ns3::WifiChannelConfig::FromString
static WifiChannelConfig FromString(const std::string &settings, WifiStandard standard=WIFI_STANDARD_UNSPECIFIED)
Get the wifi channel config from a WifiPhy::ChannelSettings string.
Definition
wifi-types.cc:24
ns3::WifiChannelConfig::WifiChannelConfig
WifiChannelConfig()=default
wifi-phy.h
wifi-types.h
src
wifi
model
wifi-types.cc
Generated on Fri Oct 3 2025 18:23:04 for ns-3 by
1.13.2