|
@@ -7,7 +7,42 @@ namespace Assets.StreetLight
|
|
|
{
|
|
|
public sealed class Configuration
|
|
|
{
|
|
|
- public string CalibrationFilesDirectory { get; set; }
|
|
|
+ private string outputCalibrationFilesDirectory;
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// The directory path where new calibration files are saved when the calibration is run.
|
|
|
+ /// </summary>
|
|
|
+ [JsonRequired]
|
|
|
+ public string OutputCalibrationFilesDirectory
|
|
|
+ {
|
|
|
+ get => outputCalibrationFilesDirectory;
|
|
|
+ set
|
|
|
+ {
|
|
|
+ if (!Directory.Exists(value))
|
|
|
+ {
|
|
|
+ throw new InvalidOperationException($"Directory \"{value}\" does not exist.");
|
|
|
+ }
|
|
|
+ outputCalibrationFilesDirectory = value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private string inputCalibrationFilePath;
|
|
|
+ /// <summary>
|
|
|
+ /// The file path to the calibration file that is used as input for the actual calibration.
|
|
|
+ /// </summary>
|
|
|
+ [JsonRequired]
|
|
|
+ public string InputCalibrationFilePath
|
|
|
+ {
|
|
|
+ get => inputCalibrationFilePath;
|
|
|
+ set
|
|
|
+ {
|
|
|
+ if (!File.Exists(value))
|
|
|
+ {
|
|
|
+ throw new InvalidOperationException($"File \"{value}\" does not exist.");
|
|
|
+ }
|
|
|
+ inputCalibrationFilePath = value;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
private static readonly Lazy<Configuration> lazy = new(() => JsonConvert.DeserializeObject<Configuration>(File.ReadAllText(Path.Combine(Application.streamingAssetsPath, "Configuration.json"))));
|
|
|
|