wifi: Make some EmlsrManager attributes not modifiable after construction
This commit is contained in:
committed by
Stefano Avallone
parent
8558da228b
commit
bb0d4f694e
@@ -59,12 +59,15 @@ EmlsrManager::GetTypeId()
|
||||
.AddAttribute(
|
||||
"MainPhyId",
|
||||
"The ID of the main PHY (position in the vector of PHYs held by "
|
||||
"WifiNetDevice). This attribute cannot be set after initialization.",
|
||||
"WifiNetDevice). This attribute cannot be set after construction.",
|
||||
TypeId::ATTR_GET | TypeId::ATTR_CONSTRUCT, // prevent setting after construction
|
||||
UintegerValue(0),
|
||||
MakeUintegerAccessor(&EmlsrManager::SetMainPhyId, &EmlsrManager::GetMainPhyId),
|
||||
MakeUintegerChecker<uint8_t>())
|
||||
.AddAttribute("AuxPhyChannelWidth",
|
||||
"The maximum channel width (MHz) supported by Aux PHYs",
|
||||
TypeId::ATTR_GET |
|
||||
TypeId::ATTR_CONSTRUCT, // prevent setting after construction
|
||||
UintegerValue(20),
|
||||
MakeUintegerAccessor(&EmlsrManager::m_auxPhyMaxWidth),
|
||||
MakeUintegerChecker<uint16_t>(20, 160))
|
||||
|
||||
@@ -73,14 +73,6 @@ class EmlsrManager : public Object
|
||||
*/
|
||||
std::optional<Time> GetTransitionTimeout() const;
|
||||
|
||||
/**
|
||||
* Set the ID of main PHY (position in the vector of PHYs held by WifiNetDevice). This
|
||||
* method cannot be called during or after initialization.
|
||||
*
|
||||
* \param mainPhyId the ID of the main PHY
|
||||
*/
|
||||
void SetMainPhyId(uint8_t mainPhyId);
|
||||
|
||||
/**
|
||||
* \return the ID of main PHY (position in the vector of PHYs held by WifiNetDevice)
|
||||
*/
|
||||
@@ -196,6 +188,14 @@ class EmlsrManager : public Object
|
||||
uint16_t m_auxPhyMaxWidth; //!< max channel width (MHz) supported by aux PHYs
|
||||
|
||||
private:
|
||||
/**
|
||||
* Set the ID of main PHY (position in the vector of PHYs held by WifiNetDevice). This
|
||||
* method cannot be called during or after initialization.
|
||||
*
|
||||
* \param mainPhyId the ID of the main PHY
|
||||
*/
|
||||
void SetMainPhyId(uint8_t mainPhyId);
|
||||
|
||||
/**
|
||||
* Compute the operating channels that the main PHY and the aux PHY(s) must switch to in order
|
||||
* to operate on each of the setup links. The operating channels may be different due to
|
||||
|
||||
Reference in New Issue
Block a user