OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — C++ API referencev12.0

optris::sdk::DeviceBusyDetail

What the SDK knew about a busy refusal, beyond its message.

Carried on DeviceBusyException, the way ConfigLoadReport is carried on ConfigLoadException. Every field is "absent" rather than "defaulted" when the SDK could not answer it: the reason is DeviceBusyReason::kUnknown and the two strings are empty. Nothing here is ever a plausible stand-in for an answer.

Public attributes

reason

DeviceBusyReason reason = DeviceBusyReason::kUnknown

Which of the conditions above refused. DeviceBusyReason::kUnknown when the refusal did not say.

holder

std::string holder

The program holding the claim, as DeviceInfo::claimed_by names it.

Empty when it cannot be named, which is a real case rather than a failure: the holder is read from the kernel's lock table on Linux and from a small file the claiming process writes beside the lock on Windows, and neither is guaranteed. Empty is also what every reason other than DeviceBusyReason::kClaimedByAnotherProcess reports -- a camera this process holds is not "held by" a program worth naming to the operator, and a format refusal has no holder at all.

Never parse it to decide anything. It is for showing to a person.

claim_path

std::string claim_path

The claim file the refusal is about.

Empty when the refusal was not about a claim -- a format refusal never reaches one. Worth showing in a support report: a claim nobody can account for is a stale lock file, and this says which one to look at.