Package com.facebook.openwifi.rrm
Class RRMAlgorithm
- java.lang.Object
-
- com.facebook.openwifi.rrm.RRMAlgorithm
-
public class RRMAlgorithm extends Object
RRM algorithm model and utility methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RRMAlgorithm.AlgorithmResult
RRM algorithm result.static class
RRMAlgorithm.AlgorithmType
RRM algorithm type enum.
-
Constructor Summary
Constructors Constructor Description RRMAlgorithm(String name)
Constructor (with no arguments).RRMAlgorithm(String name, Map<String,String> args)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
Return the algorithm name.static RRMAlgorithm
parse(String name, String argsRaw)
Construct an RRMAlgorithm with a raw arguments string.RRMAlgorithm.AlgorithmResult
run(DeviceDataManager deviceDataManager, ConfigManager configManager, Modeler modeler, String zone, boolean dryRun, boolean allowDefaultMode, boolean updateImmediately)
Run the algorithm.
-
-
-
Method Detail
-
parse
public static RRMAlgorithm parse(String name, String argsRaw)
Construct an RRMAlgorithm with a raw arguments string.- Parameters:
name
- the algorithm name, which must exist inRRMAlgorithm.AlgorithmType
argsRaw
- the arguments as a comma-separated list of key=value pairs, e.g.key1=val1,key2=val2,key3=val3
- Returns:
- the parsed object, or null if parsing failed
-
getName
public String getName()
Return the algorithm name.
-
run
public RRMAlgorithm.AlgorithmResult run(DeviceDataManager deviceDataManager, ConfigManager configManager, Modeler modeler, String zone, boolean dryRun, boolean allowDefaultMode, boolean updateImmediately)
Run the algorithm.- Parameters:
deviceDataManager
- the device data managerconfigManager
- the ConfigManager module instancemodeler
- the Modeler module instancezone
- the RF zonedryRun
- if set, do not apply changesallowDefaultMode
- if false, "mode" argument must be present and valid (returns error if invalid)updateImmediately
- true if the method should queue the zone for update and interrupt the config manager thread to trigger immediate update- Returns:
- the algorithm result, with exactly one field set ("error" upon failure, any others upon success)
-
-