Class TPC
- java.lang.Object
-
- com.facebook.openwifi.rrm.optimizers.tpc.TPC
-
- Direct Known Subclasses:
LocationBasedOptimalTPC,MeasurementBasedApApTPC,MeasurementBasedApClientTPC,RandomTxPowerInitializer
public abstract class TPC extends Object
TPC (Transmit Power Control) base class.
-
-
Field Summary
Fields Modifier and Type Field Description static List<Integer>DEFAULT_TX_POWER_CHOICESDefault tx power choices.protected Map<String,DeviceConfig>deviceConfigsThe device configs withinzone, keyed on serial number.static intMAX_TX_POWERMaximum supported tx power (dBm), inclusive.static intMIN_TX_POWERMinimum supported tx power (dBm), inclusive.protected Modeler.DataModelmodelThe input data model.protected StringzoneThe RF zone.
-
Constructor Summary
Constructors Constructor Description TPC(Modeler.DataModel model, String zone, DeviceDataManager deviceDataManager)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Map<String,Map<String,Integer>>computeTxPowerMap()Compute tx power assignments.protected Map<String,Map<Integer,List<String>>>getApsPerChannel()Get AP serial numbers per channel.voidupdateDeviceApConfig(DeviceDataManager deviceDataManager, ConfigManager configManager, Map<String,Map<String,Integer>> txPowerMap)Program the given tx power map into the AP config.protected List<Integer>updateTxPowerChoices(String band, String serialNumber, List<Integer> txPowerChoices)Determine the new tx power choices based on user and allowed channels from deviceConfig.
-
-
-
Field Detail
-
MIN_TX_POWER
public static final int MIN_TX_POWER
Minimum supported tx power (dBm), inclusive.- See Also:
- Constant Field Values
-
MAX_TX_POWER
public static final int MAX_TX_POWER
Maximum supported tx power (dBm), inclusive.- See Also:
- Constant Field Values
-
DEFAULT_TX_POWER_CHOICES
public static final List<Integer> DEFAULT_TX_POWER_CHOICES
Default tx power choices.
-
model
protected final Modeler.DataModel model
The input data model.
-
zone
protected final String zone
The RF zone.
-
deviceConfigs
protected final Map<String,DeviceConfig> deviceConfigs
The device configs withinzone, keyed on serial number.
-
-
Constructor Detail
-
TPC
public TPC(Modeler.DataModel model, String zone, DeviceDataManager deviceDataManager)
Constructor.
-
-
Method Detail
-
updateTxPowerChoices
protected List<Integer> updateTxPowerChoices(String band, String serialNumber, List<Integer> txPowerChoices)
Determine the new tx power choices based on user and allowed channels from deviceConfig.- Parameters:
band- the operational bandserialNumber- the device's serial numbertxPowerChoices- the device's available tx powers- Returns:
- the device's updated tx powers
-
computeTxPowerMap
public abstract Map<String,Map<String,Integer>> computeTxPowerMap()
Compute tx power assignments. This is the core method of this class.- Returns:
- the map of devices (by serial number) to radio to tx power
-
updateDeviceApConfig
public void updateDeviceApConfig(DeviceDataManager deviceDataManager, ConfigManager configManager, Map<String,Map<String,Integer>> txPowerMap)
Program the given tx power map into the AP config.- Parameters:
deviceDataManager- the DeviceDataManager instanceconfigManager- the ConfigManager instancetxPowerMap- the map of devices (by serial number) to radio to tx power
-
-