OptrisOptrisDocumentation

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

ReconnectAttempt

public sealed record ReconnectAttempt : IEquatable<ReconnectAttempt>

The attempt a handler is being asked to allow or refuse.

Handed to the handler registered with ThermalCamera.OnReconnectAttempt(…), just before each attempt: after the wait, and after the SDK has satisfied itself that the camera is on the bus at all. Returning false stops recovery altogether rather than skipping one attempt, so this is the place to say "not this camera, not now" for a reason the SDK cannot know: a device deliberately powered down, an operator who closed the camera's tile, a camera that has been re-addressed.

Without it the only way to say no was to call ThermalCamera.DisableAutoReconnect from another thread, racing the very attempt it was trying to stop.

ReconnectAttempt: constructors

public ReconnectAttempt(string Serial, string Model, int Attempt, int MaxAttempts)

The attempt a handler is being asked to allow or refuse.

  • Serial: The camera the attempt would be made against. Never null, and the thing to switch on when one process is recovering several cameras.
  • Model: Its marketing name, for example "PI 640i". Never null.
  • Attempt: 1-based attempt number.
  • MaxAttempts: The configured budget, or 0 when attempts are unlimited.

Handed to the handler registered with ThermalCamera.OnReconnectAttempt(…), just before each attempt: after the wait, and after the SDK has satisfied itself that the camera is on the bus at all. Returning false stops recovery altogether rather than skipping one attempt, so this is the place to say "not this camera, not now" for a reason the SDK cannot know: a device deliberately powered down, an operator who closed the camera's tile, a camera that has been re-addressed.

Without it the only way to say no was to call ThermalCamera.DisableAutoReconnect from another thread, racing the very attempt it was trying to stop.

ReconnectAttempt: properties

public int Attempt { get; init; }

1-based attempt number.

public int MaxAttempts { get; init; }

The configured budget, or 0 when attempts are unlimited.

public string Model { get; init; }

Its marketing name, for example "PI 640i". Never null.

public string Serial { get; init; }

The camera the attempt would be made against. Never null, and the thing to switch on when one process is recovering several cameras.