From 36ccdd7c9811e80ae4c4cfd519f35e17fc17a882 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Tue, 4 Apr 2023 10:18:59 -0700 Subject: [PATCH] wifi: Restrict selected attributes to ATTR_GET only --- src/wifi/model/wifi-phy.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index 929868511..bd492c1cf 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -67,6 +67,7 @@ WifiPhy::GetTypeId() .SetGroupName("Wifi") .AddAttribute("Channel", "The channel attached to this PHY", + TypeId::ATTR_GET, PointerValue(), MakePointerAccessor(&WifiPhy::GetChannel), MakePointerChecker()) @@ -103,17 +104,20 @@ WifiPhy::GetTypeId() MakeUintegerChecker(0, 7))) .AddAttribute("Frequency", "The center frequency (MHz) of the current operating channel.", + TypeId::ATTR_GET, UintegerValue(0), MakeUintegerAccessor(&WifiPhy::GetFrequency), MakeUintegerChecker()) .AddAttribute("ChannelNumber", "The channel number of the current operating channel.", + TypeId::ATTR_GET, UintegerValue(0), MakeUintegerAccessor(&WifiPhy::GetChannelNumber), MakeUintegerChecker(0, 233)) .AddAttribute( "ChannelWidth", "The width in MHz of the current operating channel (5, 10, 20, 22, 40, 80 or 160).", + TypeId::ATTR_GET, UintegerValue(0), MakeUintegerAccessor(&WifiPhy::GetChannelWidth), MakeUintegerChecker(5, 160))