16#include "ns3/multi-link-element.h"
17#include "ns3/packet.h"
18#include "ns3/simulator.h"
56 m_actionValue =
static_cast<uint8_t
>(action.radioMeasurementAction);
68 m_actionValue =
static_cast<uint8_t
>(action.selfProtectedAction);
80 m_actionValue =
static_cast<uint8_t
>(action.unprotectedDmgAction);
84 m_actionValue =
static_cast<uint8_t
>(action.protectedEhtAction);
483 .SetGroupName(
"Wifi")
494std::pair<WifiActionHeader::CategoryValue, WifiActionHeader::ActionValue>
498 pkt->PeekHeader(actionHdr);
502std::pair<WifiActionHeader::CategoryValue, WifiActionHeader::ActionValue>
506 pkt->RemoveHeader(actionHdr);
513#define CASE_ACTION_VALUE(x) \
556 os <<
"RADIO_MEASUREMENT[";
599 os <<
"SELF_PROTECTED[";
656 os <<
"UNPROTECTED_DMG[";
670 os <<
"PROTECTED_EHT[";
688 os <<
"VENDOR_SPECIFIC_ACTION";
693#undef CASE_ACTION_VALUE
727 static TypeId tid =
TypeId(
"ns3::MgtAddBaRequestHeader")
729 .SetGroupName(
"Wifi")
920std::optional<Mac48Address>
941 m_tid = (params >> 2) & 0x0f;
954 static TypeId tid =
TypeId(
"ns3::MgtAddBaResponseHeader")
956 .SetGroupName(
"Wifi")
983 size +=
m_code.GetSerializedSize();
1026 i =
m_code.Deserialize(i);
1134std::optional<Mac48Address>
1155 m_tid = (params >> 2) & 0x0f;
1170 .SetGroupName(
"Wifi")
1246 auto tid =
static_cast<uint8_t
>(
m_tid);
1266 m_tid =
static_cast<uint16_t
>(tid);
1275std::optional<Mac48Address>
1294 m_tid = (params >> 12) & 0x0f;
1306 static TypeId tid =
TypeId(
"ns3::MgtEmlOperatingModeNotification")
1308 .SetGroupName(
"Wifi")
1323 <<
" EMLSR Parameter Update Control=" << +
m_emlControl.emlsrParamUpdateCtrl;
1326 os <<
" Link bitmap=" << std::hex << *
m_emlControl.linkBitmap << std::dec;
1330 os <<
" EMLSR Padding Delay="
1333 <<
" EMLSR Transition Delay="
1365 "EMLSR Mode and EMLMR Mode cannot be both set to 1");
1372 "The EMLSR/EMLMR Link Bitmap is present if and only if either of the EMLSR "
1373 "Mode and EMLMR Mode subfields are set to 1");
1382 "The EMLSR Parameter Update field is present "
1384 <<
" if and only if the EMLSR "
1385 "Parameter Update Control subfield is set to 1 "
1401 uint8_t val = i.
ReadU8();
1407 "EMLSR Mode and EMLMR Mode cannot be both set to 1");
1441 std::list<uint8_t>
list;
1444 for (uint8_t linkId = 0; linkId < 16; linkId++)
1446 if ((bitmap & 0x0001) == 1)
1448 list.push_back(linkId);
1466 .SetGroupName(
"Wifi")
1504 size +=
m_len.has_value() ? 1 : 0;
1505 size +=
m_fdCap.has_value() ? 2 : 0;
1519 size +=
m_rnr.has_value() ?
m_rnr->GetSerializedSize() : 0;
1520 size +=
m_tim.has_value() ?
m_tim->GetSerializedSize() : 0;
1539 NS_ABORT_MSG_IF(infoFieldSize < nonOptSubfieldsSize,
"Length subfield is less than 0");
1540 m_len = infoFieldSize - nonOptSubfieldsSize;
1549 <<
"SSID=" <<
m_ssid <<
", ";
1550 if (
m_len.has_value())
1552 os <<
"Length=" << *
m_len <<
", ";
1556 os <<
"FD Capability=" << *
m_fdCap <<
", ";
1560 os <<
"Operating Class=" << *
m_opClass <<
", ";
1578 if (
m_tim.has_value())
1580 os <<
"Traffic Indicator Map=" << *
m_tim;
1592 if (
m_len.has_value())
1621 i =
m_rnr.has_value() ?
m_rnr->Serialize(i) : i;
1622 i =
m_tim.has_value() ?
m_tim->Serialize(i) : i;
1633 std::vector<uint8_t> ssid(
m_frameCtl.m_ssidLen + 2);
1636 m_ssid = std::string(
reinterpret_cast<char*
>(ssid.data()));
1644 nOctets =
m_fdCap->Deserialize(i);
1667 i =
m_rnr->DeserializeIfPresent(i);
1675 i =
m_tim->DeserializeIfPresent(i);
1707 start.WriteHtolsbU16(val);
1713 auto val = start.ReadLsbtohU16();
1732 os <<
"ess:" << capability.
m_ess <<
" privacy:" << capability.
m_privacy
1733 <<
" channelWidth:" << capability.
m_chWidth <<
" maxNss:" << capability.
m_maxNss
1744 start.WriteHtolsbU16(val);
1750 auto val = start.ReadLsbtohU16();
1752 m_ess = val & 0x0001;
1767 : (width ==
MHz_u{40}) ? 1
1768 : (width ==
MHz_u{80}) ? 2
1769 : (width ==
MHz_u{160}) ? 3
1770 : (width ==
MHz_u{320}) ? 4
1801 m_maxNss = std::min<uint8_t>(maxNss, 4);
1848 "Invalid PHY band (" << band <<
") with PHY index of 1");
The IEEE 802.11 ADDBA Extension Element (Sec.
ExtParamSet m_extParamSet
ADDBA Extended Parameter Set field.
iterator in a Buffer instance
void WriteHtolsbU16(uint16_t data)
void WriteU8(uint8_t data)
void Write(const uint8_t *buffer, uint32_t size)
void Read(uint8_t *buffer, uint32_t size)
void WriteHtolsbU64(uint64_t data)
uint32_t GetDistanceFrom(const Iterator &o) const
void Next()
go forward by one byte
The IEEE 802.11 GCR Group Address Element (Sec.
Mac48Address m_gcrGroupAddress
GCR Group Address field.
Implement the header for Action frames of type EML Operating Mode Notification.
void Serialize(Buffer::Iterator start) const override
uint32_t GetSerializedSize() const override
void SetLinkIdInBitmap(uint8_t linkId)
Set the bit position in the link bitmap corresponding to the given link.
EmlControl m_emlControl
EML Control field.
uint32_t Deserialize(Buffer::Iterator start) override
void Print(std::ostream &os) const override
std::optional< EmlsrParamUpdate > m_emlsrParamUpdate
EMLSR Parameter Update field.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
uint8_t m_dialogToken
Dialog Token.
std::list< uint8_t > GetLinkBitmap() const
static TypeId GetTypeId()
Register this type.
Smart pointer class similar to boost::intrusive_ptr.
static Time Now()
Return the current simulation virtual time.
Status code for association response.
TimeWithUnit As(const Unit unit=Time::AUTO) const
Attach a unit to a Time, to facilitate output in a specific unit.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
WifiPhyBand
Identifies the PHY band.
@ WIFI_STANDARD_UNSPECIFIED
@ WIFI_PHY_BAND_2_4GHZ
The 2.4 GHz band.
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
double MHz_u
MHz weak type.
uint8_t extBufferSize
extended buffer size
static Time DecodeEmlsrTransitionDelay(uint8_t value)
static Time DecodeEmlsrPaddingDelay(uint8_t value)
EMLSR Parameter Update field.