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.
28 lines
920 B
C++
28 lines
920 B
C++
#pragma once
|
|
#include "common.hpp"
|
|
#include "pipe_rpc.hpp"
|
|
namespace freescan {
|
|
class Supervisor {
|
|
struct Impl;
|
|
std::shared_ptr<Impl> impl_;
|
|
|
|
public:
|
|
Supervisor(fs::path dataRoot, Json config, bool simulated = false);
|
|
~Supervisor();
|
|
void start();
|
|
void start_auto_connection();
|
|
void pause_auto_connection();
|
|
bool stop();
|
|
Json status();
|
|
uint64_t command_generation() const;
|
|
Json execute(const std::string &action, const Json &body, uint64_t expectedGeneration = UINT64_MAX);
|
|
Json recover(const Json &body);
|
|
Json query(const std::string &action, const Json &args);
|
|
std::shared_ptr<const FrameSnapshot> frame();
|
|
Json metrics();
|
|
};
|
|
Json load_configuration(const fs::path &dataRoot);
|
|
int run_worker(const fs::path &root, const Json &config, const std::wstring &pipe, DWORD parentPid,
|
|
uint64_t parentStarted, bool simulated);
|
|
} // namespace freescan
|