Use the existing successful calibration-enter workflow to display the same SDK manufacturer's window and actual callback progress in the task UI. Bind metadata, JPEG and MJPEG to the execution, SDK session, calibration ID and trusted process/window identity; closing the monitor only stops viewing. Include source-only FreeScanCpp integration, WGC capture lifecycle fixes and immediate ENTER acknowledgement cache synchronization. Preserve original scanner project guards, regression sources and third-party licensing; exclude private runtime configuration and generated artifacts. Validated platform Java compilation/regressions, frontend type checks and standalone build, native compilation/offline and HTTP regressions, immediate calibration identity checks and ten synthetic window close/reopen cycles. Production installation/restart and real scanner calibration remain pending.
26 lines
1.1 KiB
C++
26 lines
1.1 KiB
C++
#pragma once
|
|
#include <utility>
|
|
|
|
namespace freescan::detail {
|
|
// The SDK may publish the whole scene while Pause is executing, before its
|
|
// completion reply. The receiver and raw-data mode must be ready first.
|
|
// This flow never resumes acquisition; restoring image preview is separate.
|
|
template <class Prepare, class Pause, class Wait, class Write>
|
|
void capture_scene_snapshot(bool pauseAcquisition, Prepare &&prepare, Pause &&pause, Wait &&wait,
|
|
Write &&write) {
|
|
std::forward<Prepare>(prepare)();
|
|
if (pauseAcquisition)
|
|
std::forward<Pause>(pause)();
|
|
std::forward<Wait>(wait)();
|
|
std::forward<Write>(write)();
|
|
}
|
|
|
|
// With pauseAcquisition and meshes selected, an incremental update can precede
|
|
// the whole-scene notification. Keep waiting instead of exporting that fragment.
|
|
inline bool accepts_scene_snapshot(bool pauseAcquisition, int mask, unsigned int datatype,
|
|
bool wholeMeshPresent) {
|
|
constexpr unsigned int wholeMesh = 1U << 3;
|
|
return !pauseAcquisition || !(mask & 4) || ((datatype & wholeMesh) && wholeMeshPresent);
|
|
}
|
|
} // namespace freescan::detail
|