Class RandomChannelInitializer
- java.lang.Object
-
- com.facebook.openwifi.rrm.optimizers.channel.ChannelOptimizer
-
- com.facebook.openwifi.rrm.optimizers.channel.RandomChannelInitializer
-
public class RandomChannelInitializer extends ChannelOptimizer
Random channel initializer.Randomly assign APs to the same channel unless otherwise specified. If specified, all APs will be assigned a random channel.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ALGORITHM_ID
The RRM algorithm ID.static boolean
DEFAULT_SET_DIFFERENT_CHANNEL_PER_AP
Default value for setDifferentChannelPerAp-
Fields inherited from class com.facebook.openwifi.rrm.optimizers.channel.ChannelOptimizer
AVAILABLE_CHANNELS_WIDTH, deviceConfigs, MIN_CHANNEL_WIDTH, model, PRIORITY_CHANNELS_2G, zone
-
-
Constructor Summary
Constructors Constructor Description RandomChannelInitializer(Modeler.DataModel model, String zone, DeviceDataManager deviceDataManager)
Constructor.RandomChannelInitializer(Modeler.DataModel model, String zone, DeviceDataManager deviceDataManager, boolean setDifferentChannelPerAp)
Constructor (allows setting different channel per AP)RandomChannelInitializer(Modeler.DataModel model, String zone, DeviceDataManager deviceDataManager, boolean setDifferentChannelPerAp, Random rng)
Constructor (allows setting different channel per AP and passing in a custom Random class to allow seeding)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Map<String,Integer>>
computeChannelMap()
Compute channel assignments.static RandomChannelInitializer
makeWithArgs(Modeler.DataModel model, String zone, DeviceDataManager deviceDataManager, Map<String,String> args)
Factory method to parse generic args map into the proper constructor-
Methods inherited from class com.facebook.openwifi.rrm.optimizers.channel.ChannelOptimizer
calculatePerfMetrics, getChannelWidthFromWiFiScan, getCoveredChannels, getCurrentChannel, getDeviceToWiFiScans, getPrimaryChannel, logPerfMetrics, updateAvailableChannelsList, updateDeviceApConfig
-
-
-
-
Field Detail
-
ALGORITHM_ID
public static final String ALGORITHM_ID
The RRM algorithm ID.- See Also:
- Constant Field Values
-
DEFAULT_SET_DIFFERENT_CHANNEL_PER_AP
public static final boolean DEFAULT_SET_DIFFERENT_CHANNEL_PER_AP
Default value for setDifferentChannelPerAp- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RandomChannelInitializer
public RandomChannelInitializer(Modeler.DataModel model, String zone, DeviceDataManager deviceDataManager)
Constructor.
-
RandomChannelInitializer
public RandomChannelInitializer(Modeler.DataModel model, String zone, DeviceDataManager deviceDataManager, boolean setDifferentChannelPerAp)
Constructor (allows setting different channel per AP)
-
RandomChannelInitializer
public RandomChannelInitializer(Modeler.DataModel model, String zone, DeviceDataManager deviceDataManager, boolean setDifferentChannelPerAp, Random rng)
Constructor (allows setting different channel per AP and passing in a custom Random class to allow seeding)
-
-
Method Detail
-
makeWithArgs
public static RandomChannelInitializer makeWithArgs(Modeler.DataModel model, String zone, DeviceDataManager deviceDataManager, Map<String,String> args)
Factory method to parse generic args map into the proper constructor
-
computeChannelMap
public Map<String,Map<String,Integer>> computeChannelMap()
Description copied from class:ChannelOptimizer
Compute channel assignments.- Specified by:
computeChannelMap
in classChannelOptimizer
- Returns:
- the map of devices (by serial number) to radio to channel
-
-