Class MeasurementBasedApApTPC


  • public class MeasurementBasedApApTPC
    extends TPC
    Measurement-based AP-AP TPC algorithm. TODO: implement the channel-specific TPC operation
    • Field Detail

      • DEFAULT_COVERAGE_THRESHOLD

        public static final int DEFAULT_COVERAGE_THRESHOLD
        Default coverage threshold between APs, in dBm. This has been picked because various devices try to roam below this threshold. iOS devices try to roam to another device below -70dBm. Other devices roam below -75dBm or -80dBm, so a conservative threshold of -70dBm has been selected.
        See Also:
        Constant Field Values
      • DEFAULT_NTH_SMALLEST_RSSI

        public static final int DEFAULT_NTH_SMALLEST_RSSI
        Default Nth smallest RSSI is used for Tx power calculation.
        See Also:
        Constant Field Values
    • Method Detail

      • getManagedBSSIDs

        protected static Set<String> getManagedBSSIDs​(Modeler.DataModel model)
        Retrieve BSSIDs of APs we are managing.
      • buildRssiMap

        protected static Map<String,​List<Integer>> buildRssiMap​(Set<String> managedBSSIDs,
                                                                      Map<String,​List<List<WifiScanEntry>>> latestWifiScans,
                                                                      String band)
        Build a map from BSSID to a sorted (ascending) list of RSSIs from neighboring APs. Every managed BSSID is a key in the returned map; if that BSSID does not have an RSSI for that AP, the BSSID is mapped to an empty list.
        Parameters:
        managedBSSIDs - set of all BSSIDs of APs we are managing
        latestWifiScans - Modeler.DataModel.latestWifiScans for data structure
        band - "2G" or "5G"
        Returns:
        a map from BSSID to a sorted (ascending) list of RSSIs from neighboring APs.
      • computeTxPower

        protected static int computeTxPower​(String serialNumber,
                                            int currentTxPower,
                                            List<Integer> rssiValues,
                                            int coverageThreshold,
                                            int nthSmallestRssi,
                                            List<Integer> txPowerChoices)
        Compute adjusted tx power (dBm) based on inputs.
        Parameters:
        serialNumber - serial number of the AP
        currentTxPower - the current tx power (dBm)
        rssiValues - sorted (ascending) list of RSSIs from neighboring APs
        coverageThreshold - desired value for the nthSmallestRssi
        nthSmallestRssi - which RSSI to use to "calibrate" to determine the new tx power
        Returns:
        new tx power (dBm)
      • buildTxPowerMapForChannel

        protected void buildTxPowerMapForChannel​(String band,
                                                 int channel,
                                                 List<String> serialNumbers,
                                                 Map<String,​Map<String,​Integer>> txPowerMap)
        Calculate new tx powers for the given channel on the given APs .
        Parameters:
        band - band (e.g., "2G")
        channel - channel
        serialNumbers - the serial numbers of the APs with the channel
        txPowerMap - this maps from serial number to band to new tx power (dBm) and is updated by this method with the new tx powers.
      • computeTxPowerMap

        public Map<String,​Map<String,​Integer>> computeTxPowerMap()
        Description copied from class: TPC
        Compute tx power assignments. This is the core method of this class.
        Specified by:
        computeTxPowerMap in class TPC
        Returns:
        the map of devices (by serial number) to radio to tx power