optris::sdk::ReconnectEvent
One step of an automatic reconnect, as it happens.
Public attributes
phase
ReconnectPhase phase = ReconnectPhase::kStarted
Which step this is.
attempt
int attempt = 0
1-based attempt number. Zero for ReconnectPhase::kStarted, and for ReconnectPhase::kWaitingForDevice it is the number of attempts made so far -- the wait spends none, so it does not advance while the camera is away.
max_attempts
int max_attempts = 0
The configured budget, or 0 when attempts are unlimited.
waited
std::chrono::milliseconds waited {0}
How long the SDK waited before this attempt.
message
std::string message
Human-readable detail. The failure reason on ReconnectPhase::kAttemptFailed and ReconnectPhase::kGaveUp.
serial
std::string serial
Which camera this is about.
Cached before the first attempt, because a camera that is closed -- which is what a failed attempt leaves behind -- reports no serial at all. So this still names the camera after ReconnectPhase::kGaveUp, where Imager::GetDeviceInfo() no longer can. Empty only for an imager that never had one.
model
std::string model
The marketing name of that camera, e.g. "PI 640i". Cached with the serial and empty under the same condition.