mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-15 21:17:41 +00:00
fix: updated stale docs
This commit is contained in:
@@ -217,38 +217,15 @@ public:
|
|||||||
int add_subscribe(std::vector<std::string> dev_list) override;
|
int add_subscribe(std::vector<std::string> dev_list) override;
|
||||||
int del_subscribe(std::vector<std::string> dev_list) override;
|
int del_subscribe(std::vector<std::string> dev_list) override;
|
||||||
void enable_multi_machine(bool enable) override;
|
void enable_multi_machine(bool enable) override;
|
||||||
|
|
||||||
// The fleet MQTT socket carries both directions: inbound reports from
|
|
||||||
// device/<id>/report and commands PUBLISHed to device/<id>/request on this
|
|
||||||
// socket. OrcaPrinterAgent registers its message callback here to receive the
|
|
||||||
// inbound half; pass an empty fn to clear it before the agent is destroyed.
|
|
||||||
int set_printer_status_callback(OnMessageFn fn);
|
int set_printer_status_callback(OnMessageFn fn);
|
||||||
|
|
||||||
// Send a Bambu-dialect command to one printer via the cloud relay's REST
|
|
||||||
// endpoint (POST /api/v1/printers/<id>/commands). Synchronous - wraps http_post,
|
|
||||||
// so it carries the standard apikey + bearer headers and token refresh. Callers
|
|
||||||
// that need non-blocking behaviour run it on their own thread.
|
|
||||||
int send_printer_command(const std::string& dev_id, const std::string& body);
|
int send_printer_command(const std::string& dev_id, const std::string& body);
|
||||||
|
|
||||||
// Upload sliced G-code to the cloud printer's print job storage: requests a
|
|
||||||
// short-lived presigned URL (POST print-jobs/uploads), then PUTs the file
|
|
||||||
// straight to R2 with that URL. Does not start the print or wait for
|
|
||||||
// OrcaSonar to download it - see OrcaPrinterAgent::start_print/start_sdcard_print
|
|
||||||
// for the MQTT hand-off that follows. *job_id receives the id to correlate
|
|
||||||
// with that hand-off; update_fn receives upload progress via Http's on_progress.
|
|
||||||
int upload_gcode_via_cloud(const std::string& dev_id,
|
int upload_gcode_via_cloud(const std::string& dev_id,
|
||||||
const std::string& local_gcode_path,
|
const std::string& local_gcode_path,
|
||||||
std::string* job_id,
|
std::string* job_id,
|
||||||
OnUpdateStatusFn update_fn,
|
OnUpdateStatusFn update_fn,
|
||||||
WasCancelledFn cancel_fn);
|
WasCancelledFn cancel_fn);
|
||||||
|
|
||||||
// Finalize a presigned print-job upload (step 3 of 3): POST
|
|
||||||
// print-jobs/<job_id>/start. The gateway HEAD-verifies the object landed in
|
|
||||||
// R2, then relays a print.project_file command (download URL + filename +
|
|
||||||
// start) to the printer over the gateway's OWN cloud relay connection to
|
|
||||||
// OrcaSonar - NOT this agent's MQTT session. See
|
|
||||||
// CLOUD_PRINT_JOB_MQTT_DESIGN.md for the MQTT-native alternative this
|
|
||||||
// stands in for until the gap documented there is closed.
|
|
||||||
int start_cloud_print_job(const std::string& dev_id,
|
int start_cloud_print_job(const std::string& dev_id,
|
||||||
const std::string& job_id,
|
const std::string& job_id,
|
||||||
const std::string& filename,
|
const std::string& filename,
|
||||||
|
|||||||
@@ -1411,19 +1411,7 @@ AgentInfo OrcaPrinterAgent::get_agent_info_static()
|
|||||||
// Print Job Operations - All Stubs
|
// Print Job Operations - All Stubs
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
// Orchestrates the cloud print workflow: upload the sliced G-code straight to R2
|
// Simply uploads the file to the printer via HTTP (cloud) then sends a HTTP request to start print. In the future, this might be a MQTT command to start print instead of HTTP.
|
||||||
// via a presigned URL (upload_gcode_via_cloud), then finalize over HTTP
|
|
||||||
// (start_cloud_print_job). The finalize call is what actually gets the file to
|
|
||||||
// the printer: the gateway HEAD-verifies the R2 object, then relays
|
|
||||||
// print.project_file to OrcaSonar over the gateway's OWN cloud relay connection -
|
|
||||||
// not this agent's MQTT session. See CLOUD_PRINT_JOB_MQTT_DESIGN.md for the
|
|
||||||
// MQTT-native alternative (publishing print.project_file directly over this
|
|
||||||
// agent's own cloud connection) and why it isn't used yet.
|
|
||||||
//
|
|
||||||
// This deliberately does NOT go through start_sdcard_print/print.gcode_file:
|
|
||||||
// that command is the generic "start this file already on the printer" primitive
|
|
||||||
// (also used by the LAN start_local_print path, and meant to stay that way as it
|
|
||||||
// grows params like filament mapping), and has no download-awareness to give it.
|
|
||||||
int OrcaPrinterAgent::start_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn)
|
int OrcaPrinterAgent::start_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn)
|
||||||
{
|
{
|
||||||
(void) wait_fn;
|
(void) wait_fn;
|
||||||
|
|||||||
Reference in New Issue
Block a user