OptrisOptrisDocumentation

Documentation/OTC SDK/Optris.Sdk — C# API referencev12.0

ConfigurationLoadReport

public sealed record ConfigurationLoadReport : IEquatable<ConfigurationLoadReport>

What an import did.

Returned by ThermalCamera.LoadConfiguration(…) when anything was applied, and carried by ConfigurationLoadException when the load was refused or stopped part-way -- so the same account is available whichever way the call came back.

Every answer comes in two forms on purpose. The enums and the section sets are for a program to branch on; ConfigurationLoadReport.Diagnosis is for a person, and goes into a log or a dialog unchanged.

ConfigurationLoadReport: properties

public ConfigurationSections Applied { get; }

The sections now in effect on the camera.

public bool ChangedTheCamera { get; }

Whether any part of the file reached the camera.

The one question an application has after an import: "do I have to re-read anything?". A property rather than a comparison so that an outcome added later lands on the right side of it without your code being revisited.

public string Diagnosis { get; }

What happened, in words, naming the sections and the reasons. Empty when there is nothing to say.

For a person: log it, or put it in the dialog. Do not parse it -- the properties above are what a program branches on, and this text is free to improve.

public string FileSerial { get; }

The serial recorded in the file, or empty if it had none.

public ConfigurationSections Omitted { get; }

The sections the file carried that are not in effect.

public ConfigurationLoadOutcome Outcome { get; }

How it ended. Read this first.

public ConfigurationSections Present { get; }

The sections the file carried, whether or not they took effect.

public bool SerialMatched { get; }

true if ConfigurationLoadReport.FileSerial is this camera's, or if the file named no serial.

false is not in itself a failure -- see ConfigurationLoadOptions.RequireMatchingSerial -- but it is worth showing a user before they commit to an import.