Package frc.robot.shared.config
Class ConfigurationLoader
java.lang.Object
frc.robot.shared.config.ConfigurationLoader
Utility for loading subsystem configuration JSON from the deploy directory and recording a read-only snapshot of every field to AdvantageKit.
Tunable values are managed separately by AbstractConfig through LoggedNetworkNumber/Boolean/String. This loader only produces a
one-time, read-only snapshot under /AdvantageKit/RealOutputs/Config/... so operators can inspect the loaded configuration without
confusing it with editable tunable entries.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ConfigurationLoader
public ConfigurationLoader()
-
-
Method Details
-
load
public static <TConfig> TConfig load(String fileName, Class<TConfig> classOfT) throws ConfigurationException Loads a configuration file from the deploy directory and maps it to a type.After deserialization, every public primitive and String field is recorded as a read-only AdvantageKit output under
Config/<className>/.... NestedAbstractConfigobjects are recursed into automatically.- Type Parameters:
TConfig- Java type to bind the configuration to- Parameters:
fileName- JSON filename relative tosrc/main/deployclassOfT- class token for the configuration type- Returns:
- loaded configuration instance with AK snapshot recorded
- Throws:
ConfigurationException- when the file cannot be read or parsed
-