#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/Utils/SnapmakerPrinterAgent.hpp>
Public Member Functions | |
| SnapmakerPrinterAgent (std::string log_dir) | |
| ~SnapmakerPrinterAgent () override=default | |
| AgentInfo | get_agent_info () override |
| bool | fetch_filament_info (std::string dev_id, FilamentSyncMode sync_mode=FilamentSyncMode::pull) override |
| void | set_cloud_agent (std::shared_ptr< ICloudServiceAgent > cloud) override |
| int | send_message (std::string dev_id, std::string json_str, int qos, int flag) override |
| int | connect_printer (const PrinterConnectionParams ¶ms) override |
| int | disconnect_printer () override |
| int | send_message_to_printer (std::string dev_id, std::string json_str, int qos, int flag) override |
| bool | start_discovery (bool start, bool sending) override |
| int | bind_detect (std::string dev_ip, std::string sec_link, detectResult &detect) override |
| int | set_server_callback (OnServerErrFn fn) override |
| std::string | get_user_selected_machine () override |
| int | set_user_selected_machine (std::string dev_id) override |
| int | start_print (PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn) override |
| int | start_local_print_with_record (PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn) override |
| int | start_send_gcode_to_sdcard (PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn) override |
| int | start_local_print (PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn) override |
| int | start_sdcard_print (PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn) override |
| int | set_on_ssdp_msg_fn (OnMsgArrivedFn fn) override |
| int | set_on_printer_connected_fn (OnPrinterConnectedFn fn) override |
| int | set_on_subscribe_failure_fn (GetSubscribeFailureFn fn) override |
| int | set_on_message_fn (OnMessageFn fn) override |
| int | set_on_user_message_fn (OnMessageFn fn) override |
| int | set_on_local_connect_fn (OnLocalConnectedFn fn) override |
| int | set_on_local_message_fn (OnMessageFn fn) override |
| int | set_queue_on_main_fn (QueueOnMainFn fn) override |
| FilamentSyncMode | get_filament_sync_mode () const override |
| virtual int | command_ams_refresh_rfid (std::string, int, int, int, bool) |
| virtual int | command_ams_calibrate (std::string, int, int, bool) |
| virtual int | command_ams_select_tray (std::string, std::string, int, bool) |
| virtual int | command_start_camera (std::string) |
| virtual int | command_xyz_abs (std::string dev_id, int sequence_id, bool lan_mode) |
| virtual int | command_auto_leveling (std::string dev_id, int sequence_id, bool lan_mode) |
| virtual int | command_go_home (std::string dev_id, bool is_printing, bool supports_mqtt_homing, int sequence_id, bool lan_mode) |
| virtual int | command_set_bed (std::string dev_id, int temp, bool supports_mqtt_bed_ctrl, int sequence_id, bool lan_mode) |
| virtual int | command_set_nozzle (std::string dev_id, int temp, int sequence_id, bool lan_mode) |
| virtual int | command_axis_control (std::string dev_id, std::string axis, double unit, double input_val, int speed, bool is_core_xy, bool supports_mqtt_axis_control, int sequence_id, bool lan_mode) |
| virtual std::string | default_lan_username () const |
| virtual int | check_cert () |
| virtual void | install_device_cert (std::string dev_id, bool lan_only) |
| virtual int | ping_bind (std::string ping_code) |
| virtual int | bind (std::string dev_ip, std::string dev_id, std::string dev_model, std::string sec_link, std::string timezone, bool improved, OnUpdateStatusFn update_fn) |
| virtual int | unbind (std::string dev_id) |
| virtual int | request_bind_ticket (std::string *ticket) |
| virtual int | get_hms_snapshot (std::string dev_id, std::string file_name, std::function< void(std::string, int)> callback) |
| virtual int | start_subscribe (std::string module) |
| virtual int | stop_subscribe (std::string module) |
| virtual int | add_subscribe (std::vector< std::string > dev_list) |
| virtual int | del_subscribe (std::vector< std::string > dev_list) |
| virtual CameraStreamMode | get_camera_stream_mode () const |
| virtual std::string | to_orca_filament_id (const std::string &printer_filament_id) const |
| virtual std::string | from_orca_filament_id (const std::string &orca_filament_id) const |
| virtual std::string | get_camera_url () const |
Static Public Member Functions | |
| static AgentInfo | get_agent_info_static () |
Protected Member Functions | |
| void | build_ams_payload (int ams_count, int max_lane_index, const std::vector< AmsTrayData > &trays) |
| virtual bool | init_device_info (const std::string &dev_id, const std::string &dev_ip, const std::string &username, const std::string &password, bool use_ssl, const std::string &port) |
| virtual bool | fetch_device_info (const std::string &base_url, const std::string &api_key, MoonrakerDeviceInfo &info, std::string &error, const std::function< bool()> &cancelled) const |
| void | start_status_stream (const std::string &dev_id, const std::string &base_url, const std::string &api_key) |
| void | stop_status_stream () |
| bool | is_numeric (const std::string &value) |
| std::string | normalize_base_url (bool use_ssl, const std::string &host, const std::string &port) |
| std::string | sanitize_filename (const std::string &filename) |
| std::string | join_url (const std::string &base_url, const std::string &path) const |
Static Protected Member Functions | |
| static std::string | trim_and_upper (const std::string &input) |
| static std::string | map_filament_type_to_generic_id (const std::string &filament_type) |
Protected Attributes | |
| struct Slic3r::MoonrakerPrinterAgent::MoonrakerDeviceInfo | device_info |
| struct Slic3r::MoonrakerPrinterAgent::StatusStreamTimings | ws_timings |
| std::recursive_mutex | state_mutex |
Private Member Functions | |
| int | handle_request (const std::string &dev_id, const std::string &json_str) |
| int | send_version_info (const std::string &dev_id) |
| int | send_access_code (const std::string &dev_id) |
| bool | fetch_object_list (const std::string &base_url, const std::string &api_key, std::set< std::string > &objects, std::string &error) const |
| bool | query_printer_status (const std::string &base_url, const std::string &api_key, nlohmann::json &status, std::string &error, const std::function< bool()> &cancelled) const |
| bool | send_gcode_sync (const std::string &dev_id, const std::string &gcode) const |
| void | send_gcode_async (const std::string &dev_id, const std::string &gcode, std::function< void(bool)> on_result={}) const |
| void | announce_printhost_device () |
| void | dispatch_local_connect (int state, const std::string &dev_id, const std::string &msg) |
| void | dispatch_printer_connected (const std::string &dev_id) |
| void | dispatch_message (const std::string &dev_id, const std::string &payload) |
| void | join_stopped_status_stream () |
| void | run_status_stream (std::string dev_id, std::string base_url, std::string api_key, StatusStreamTimings timings) |
| void | handle_ws_message (const std::string &dev_id, const std::string &payload) |
| void | send_heartbeat_if_due (const std::string &dev_id, std::chrono::milliseconds interval) |
| void | update_status_cache (const nlohmann::json &updates) |
| nlohmann::json | build_print_payload_locked () const |
| int | pause_print (const std::string &dev_id) |
| int | resume_print (const std::string &dev_id) |
| int | cancel_print (const std::string &dev_id) |
| bool | upload_gcode (const std::string &local_path, const std::string &filename, const std::string &base_url, const std::string &api_key, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn) |
| bool | send_jsonrpc_command (const std::string &base_url, const std::string &api_key, const nlohmann::json &request, std::string &response) const |
| void | perform_connection_async (const std::string &dev_id, const std::string &base_url, const std::string &api_key, uint64_t generation) |
| bool | fetch_hh_filament_info (std::vector< AmsTrayData > &trays, int &max_lane_index) |
| bool | fetch_moonraker_filament_data (std::vector< AmsTrayData > &trays, int &max_lane_index) |
| int | publish_command_json (std::string dev_id, const nlohmann::json &j, bool lan_mode) |
Static Private Member Functions | |
| static std::string | combine_filament_type (const std::string &type, const std::string &sub_type) |
| static std::string | safe_json_string (const nlohmann::json &obj, const char *key) |
| static int | safe_json_int (const nlohmann::json &obj, const char *key) |
| static std::string | safe_array_string (const nlohmann::json &arr, int idx) |
| static int | safe_array_int (const nlohmann::json &arr, int idx) |
| static std::string | normalize_color_value (const std::string &color) |
Static Private Attributes | |
| static constexpr uint64_t | STATUS_UPDATE_INTERVAL_MS = 1000 |
|
explicit |
References Slic3r::MoonrakerPrinterAgent::MoonrakerPrinterAgent().
|
overridedefault |
|
inlinevirtualinherited |
Subscribe to push streams for specific device identifiers.
Reimplemented in Slic3r::BBLPrinterAgent.
References BAMBU_NETWORK_SUCCESS.
|
privateinherited |
References announce_printhost_device(), device_info, on_ssdp_msg_fn, selected_machine, ssdp_announced_host, ssdp_announced_id, and state_mutex.
Referenced by announce_printhost_device(), and start_discovery().
|
inlinevirtualinherited |
Execute the multi-stage printer binding workflow.
Reimplemented in Slic3r::BBLPrinterAgent, and Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References BAMBU_NETWORK_SUCCESS.
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
overridevirtualinherited |
Perform binding detection/handshake on a LAN printer.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_SUCCESS, bind_detect(), Slic3r::detectResult::bind_state, Slic3r::detectResult::connect_type, Slic3r::detectResult::dev_id, Slic3r::detectResult::dev_name, device_info, Slic3r::detectResult::model_id, and Slic3r::detectResult::version.
Referenced by bind_detect().
|
protectedinherited |
References Slic3r::MoonrakerPrinterAgent::AmsTrayData::bed_temp, build_ams_payload(), device_info, Slic3r::MachineObject::GetFilaSystem(), Slic3r::MachineObject::GetStorage(), Slic3r::MoonrakerPrinterAgent::AmsTrayData::has_filament, Slic3r::DevStorage::HAS_SDCARD_NORMAL, Slic3r::MachineObject::last_push_time, Slic3r::MachineObject::m_full_msg_count, Slic3r::MachineObject::m_push_count, Slic3r::MachineObject::module_vers, Slic3r::DevFirmwareVersionInfo::name, normalize_color_value(), Slic3r::MoonrakerPrinterAgent::AmsTrayData::nozzle_temp, Slic3r::DevFilaSystemParser::ParseV1_0(), Slic3r::MachineObject::printer_type, Slic3r::DevStorage::set_sdcard_state(), Slic3r::DevFirmwareVersionInfo::sw_ver, Slic3r::MoonrakerPrinterAgent::AmsTrayData::tray_color, Slic3r::MoonrakerPrinterAgent::AmsTrayData::tray_info_idx, and Slic3r::MoonrakerPrinterAgent::AmsTrayData::tray_type.
Referenced by build_ams_payload(), Slic3r::CrealityPrintAgent::fetch_filament_info(), fetch_filament_info(), Slic3r::QidiPrinterAgent::fetch_filament_info(), and Slic3r::SnapmakerPrinterAgent::fetch_filament_info().
|
privateinherited |
References available_objects, build_print_payload_locked(), anonymous_namespace{MoonrakerPrinterAgent.cpp}::map_moonraker_state(), and status_cache.
Referenced by build_print_payload_locked(), handle_ws_message(), and send_heartbeat_if_due().
|
privateinherited |
References BAMBU_NETWORK_SUCCESS, cancel_print(), and send_gcode_async().
Referenced by cancel_print(), and handle_request().
|
inlinevirtualinherited |
Validate current user certificates for the printer.
Reimplemented in Slic3r::BBLPrinterAgent, and Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References BAMBU_NETWORK_SUCCESS.
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
staticprivate |
References Slic3r::MoonrakerPrinterAgent::trim_and_upper().
Referenced by fetch_filament_info().
|
inlinevirtualinherited |
Reimplemented in Slic3r::BBLPrinterAgent, and Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References ORCA_NETWORK_ERR_CMD_NOT_SUPPORTED.
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
inlinevirtualinherited |
Reimplemented in Slic3r::BBLPrinterAgent, and Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References ORCA_NETWORK_ERR_CMD_NOT_SUPPORTED.
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
inlinevirtualinherited |
Reimplemented in Slic3r::BBLPrinterAgent, and Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References ORCA_NETWORK_ERR_CMD_NOT_SUPPORTED.
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
inlinevirtualinherited |
Reimplemented in Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References publish_command_json().
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
inlinevirtualinherited |
Reimplemented in Slic3r::BBLPrinterAgent, and Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References publish_command_json().
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
inlinevirtualinherited |
Reimplemented in Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References publish_command_json().
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
inlinevirtualinherited |
Reimplemented in Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References publish_command_json().
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
inlinevirtualinherited |
Reimplemented in Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References publish_command_json().
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
inlinevirtualinherited |
Reimplemented in Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References ORCA_NETWORK_ERR_CMD_NOT_SUPPORTED.
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
inlinevirtualinherited |
Reimplemented in Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References publish_command_json().
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
overridevirtualinherited |
Establish a direct LAN connection to a printer.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_ERR_INVALID_HANDLE, connect_generation, connect_mutex, connect_thread, Slic3r::PrinterConnectionParams::dev_id, device_info, Slic3r::PrinterConnectionParams::host, init_device_info(), last_print_state, Slic3r::PrinterConnectionParams::password, payload_mutex, Slic3r::PrinterConnectionParams::port, status_cache, stop_status_stream(), Slic3r::PrinterConnectionParams::use_ssl, Slic3r::PrinterConnectionParams::username, ws_last_dispatch_ms, and ws_last_emit_ms.
|
inlinevirtualinherited |
Default LAN account username for this agent's protocol, if it has a fixed one. Returns an empty string if the agent has no fixed default (e.g. caller must supply one).
Reimplemented in Slic3r::BBLPrinterAgent.
|
inlinevirtualinherited |
Remove device-level subscriptions.
Reimplemented in Slic3r::BBLPrinterAgent.
References BAMBU_NETWORK_SUCCESS.
|
overridevirtualinherited |
Tear down the active LAN printer connection.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_SUCCESS, connect_generation, connect_mutex, device_info, disconnect_printer(), and stop_status_stream().
Referenced by disconnect_printer().
|
privateinherited |
References dispatch_local_connect(), on_local_connect_fn, queue_on_main_fn, and state_mutex.
Referenced by dispatch_local_connect(), and perform_connection_async().
|
privateinherited |
References dispatch_message(), on_local_message_fn, on_message_fn, queue_on_main_fn, and state_mutex.
Referenced by dispatch_message(), handle_request(), handle_ws_message(), send_access_code(), send_heartbeat_if_due(), and send_version_info().
|
privateinherited |
References dispatch_printer_connected(), on_printer_connected_fn, queue_on_main_fn, and state_mutex.
Referenced by dispatch_printer_connected(), and perform_connection_async().
|
protectedvirtualinherited |
References anonymous_namespace{MoonrakerPrinterAgent.cpp}::cancel_when(), Slic3r::MoonrakerPrinterAgent::MoonrakerDeviceInfo::dev_name, fetch_device_info(), Slic3r::Http::get(), Slic3r::http, join_url(), Slic3r::MoonrakerPrinterAgent::MoonrakerDeviceInfo::klippy_state, and Slic3r::MoonrakerPrinterAgent::MoonrakerDeviceInfo::version.
Referenced by fetch_device_info(), Slic3r::QidiPrinterAgent::fetch_filament_info(), and perform_connection_async().
|
overridevirtual |
Refresh filament info from the printer synchronously. Should only be called when get_filament_sync_mode() returns FilamentSyncMode::pull. Populates the MachineObject's DevFilaSystem with fetched filament data.
Reimplemented from Slic3r::MoonrakerPrinterAgent.
References Slic3r::MoonrakerPrinterAgent::AmsTrayData::bed_temp, Slic3r::MoonrakerPrinterAgent::build_ams_payload(), combine_filament_type(), Slic3r::Geometry::contains(), Slic3r::MoonrakerPrinterAgent::device_info, Slic3r::filament_type(), Slic3r::filament_vendor(), Slic3r::Http::get(), Slic3r::MoonrakerPrinterAgent::AmsTrayData::has_filament, Slic3r::http, Slic3r::MoonrakerPrinterAgent::join_url(), Slic3r::MoonrakerPrinterAgent::map_filament_type_to_generic_id(), Slic3r::MoonrakerPrinterAgent::AmsTrayData::nozzle_temp, Slic3r::MoonrakerPrinterAgent::AmsTrayData::slot_index, Slic3r::MoonrakerPrinterAgent::AmsTrayData::tray_color, Slic3r::MoonrakerPrinterAgent::AmsTrayData::tray_info_idx, and Slic3r::MoonrakerPrinterAgent::AmsTrayData::tray_type.
|
privateinherited |
References Slic3r::MoonrakerPrinterAgent::AmsTrayData::bed_temp, device_info, fetch_hh_filament_info(), Slic3r::Http::get(), Slic3r::MoonrakerPrinterAgent::AmsTrayData::has_filament, Slic3r::http, join_url(), map_filament_type_to_generic_id(), Slic3r::MoonrakerPrinterAgent::AmsTrayData::nozzle_temp, safe_array_int(), safe_array_string(), Slic3r::MoonrakerPrinterAgent::AmsTrayData::slot_index, Slic3r::MoonrakerPrinterAgent::AmsTrayData::tray_color, Slic3r::MoonrakerPrinterAgent::AmsTrayData::tray_info_idx, and Slic3r::MoonrakerPrinterAgent::AmsTrayData::tray_type.
Referenced by fetch_filament_info(), and fetch_hh_filament_info().
|
privateinherited |
References Slic3r::MoonrakerPrinterAgent::AmsTrayData::bed_temp, device_info, fetch_moonraker_filament_data(), Slic3r::Http::get(), Slic3r::MoonrakerPrinterAgent::AmsTrayData::has_filament, Slic3r::http, join_url(), map_filament_type_to_generic_id(), Slic3r::MoonrakerPrinterAgent::AmsTrayData::nozzle_temp, safe_json_int(), safe_json_string(), Slic3r::MoonrakerPrinterAgent::AmsTrayData::slot_index, Slic3r::MoonrakerPrinterAgent::AmsTrayData::tray_color, Slic3r::MoonrakerPrinterAgent::AmsTrayData::tray_info_idx, and Slic3r::MoonrakerPrinterAgent::AmsTrayData::tray_type.
Referenced by fetch_filament_info(), and fetch_moonraker_filament_data().
|
privateinherited |
References anonymous_namespace{MoonrakerPrinterAgent.cpp}::cancel_when(), fetch_object_list(), Slic3r::Http::get(), Slic3r::http, join_url(), and ws_stop.
Referenced by fetch_object_list(), and run_status_stream().
|
inlinevirtualinherited |
Reimplemented in Slic3r::BBLPrinterAgent.
|
inlineoverridevirtual |
Get agent information.
Reimplemented from Slic3r::MoonrakerPrinterAgent.
References get_agent_info_static().
|
static |
Referenced by get_agent_info().
|
inlinevirtualinherited |
Get the camera stream mode for this agent. This value can be deterministic and derived at runtime if the printer supports multiple camera stream modes. E.g. LAN => HTTP/HTTPS/RTSP, Cloud => WebRTC.
Reimplemented in Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References Slic3r::none.
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
inlinevirtualinherited |
Get the current camera stream URL for this agent's active machine. Only meaningful when get_camera_stream_mode() returns an HTTP, HTTPS, or RTSP mode.
Reimplemented in Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
inlineoverridevirtualinherited |
Get the filament synchronization mode for this agent.
Reimplemented from Slic3r::IPrinterAgent.
References Slic3r::pull.
|
inlinevirtualinherited |
Fetch the cloud snapshot image captured at a print failure. Returns 0 if the request was dispatched; the image body arrives via callback(body, http_status).
Reimplemented in Slic3r::BBLPrinterAgent, and Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
|
overridevirtualinherited |
Return the currently selected printer ID.
Implements Slic3r::IPrinterAgent.
References get_user_selected_machine(), selected_machine, and state_mutex.
Referenced by get_user_selected_machine().
|
privateinherited |
References BAMBU_NETWORK_ERR_INVALID_RESULT, BAMBU_NETWORK_SUCCESS, cancel_print(), Slic3r::Geometry::contains(), dispatch_message(), handle_request(), pause_print(), resume_print(), send_access_code(), send_gcode_async(), and send_version_info().
Referenced by handle_request(), send_message(), and send_message_to_printer().
|
privateinherited |
References build_print_payload_locked(), dispatch_message(), handle_ws_message(), last_print_state, payload_mutex, status_cache, STATUS_UPDATE_INTERVAL_MS, anonymous_namespace{MoonrakerPrinterAgent.cpp}::steady_now_ms(), update_status_cache(), ws_last_dispatch_ms, ws_last_emit_ms, and ws_reconnect_requested.
Referenced by handle_ws_message(), and run_status_stream().
|
protectedvirtualinherited |
References device_info, init_device_info(), and normalize_base_url().
Referenced by connect_printer(), and init_device_info().
|
inlinevirtualinherited |
Install or refresh device certificate for LAN TLS.
Reimplemented in Slic3r::BBLPrinterAgent, and Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
protectedinherited |
References is_numeric().
Referenced by Slic3r::QidiPrinterAgent::fetch_slot_info(), Slic3r::QidiPrinterAgent::infer_series_id(), and is_numeric().
|
privateinherited |
References join_stopped_status_stream(), ws_abort_mutex, ws_stop, and ws_thread.
Referenced by join_stopped_status_stream(), and perform_connection_async().
|
protectedinherited |
References join_url().
Referenced by fetch_device_info(), Slic3r::QidiPrinterAgent::fetch_filament_dict(), Slic3r::SnapmakerPrinterAgent::fetch_filament_info(), fetch_hh_filament_info(), fetch_moonraker_filament_data(), fetch_object_list(), Slic3r::QidiPrinterAgent::fetch_slot_info(), join_url(), query_printer_status(), send_gcode_async(), send_gcode_sync(), send_jsonrpc_command(), and upload_gcode().
|
staticprotectedinherited |
References Slic3r::Preset::filament_id, Slic3r::filament_type(), Slic3r::Preset::is_system, map_filament_type_to_generic_id(), trim_and_upper(), and UNKNOWN_FILAMENT_ID.
Referenced by Slic3r::SnapmakerPrinterAgent::fetch_filament_info(), fetch_hh_filament_info(), fetch_moonraker_filament_data(), and map_filament_type_to_generic_id().
|
protectedinherited |
References normalize_base_url().
Referenced by init_device_info(), and normalize_base_url().
|
staticprivateinherited |
References normalize_color_value().
Referenced by build_ams_payload(), and normalize_color_value().
|
privateinherited |
References BAMBU_NETWORK_SUCCESS, pause_print(), and send_gcode_async().
Referenced by handle_request(), and pause_print().
|
privateinherited |
References BAMBU_NETWORK_ERR_CANCELED, BAMBU_NETWORK_ERR_CONNECTION_TO_PRINTER_FAILED, BAMBU_NETWORK_SUCCESS, connect_generation, connect_mutex, Slic3r::ConnectStatusOk, Slic3r::MoonrakerPrinterAgent::MoonrakerDeviceInfo::dev_name, device_info, dispatch_local_connect(), dispatch_printer_connected(), fetch_device_info(), join_stopped_status_stream(), Slic3r::MoonrakerPrinterAgent::MoonrakerDeviceInfo::klippy_state, perform_connection_async(), query_printer_status(), start_status_stream(), update_status_cache(), and Slic3r::MoonrakerPrinterAgent::MoonrakerDeviceInfo::version.
Referenced by perform_connection_async().
|
inlinevirtualinherited |
Ping the binding endpoint to check printer readiness.
Reimplemented in Slic3r::BBLPrinterAgent, and Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References BAMBU_NETWORK_SUCCESS.
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
inlineprivateinherited |
References send_message(), and send_message_to_printer().
Referenced by command_auto_leveling(), command_axis_control(), command_go_home(), command_set_bed(), command_set_nozzle(), and command_xyz_abs().
|
privateinherited |
References anonymous_namespace{MoonrakerPrinterAgent.cpp}::cancel_when(), Slic3r::Http::get(), Slic3r::http, join_url(), and query_printer_status().
Referenced by perform_connection_async(), and query_printer_status().
|
inlinevirtualinherited |
Request a one-time bind ticket from the server.
Reimplemented in Slic3r::BBLPrinterAgent, and Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References BAMBU_NETWORK_SUCCESS.
|
privateinherited |
References BAMBU_NETWORK_SUCCESS, resume_print(), and send_gcode_async().
Referenced by handle_request(), and resume_print().
|
privateinherited |
References available_objects, Slic3r::MoonrakerPrinterAgent::StatusStreamTimings::close, Slic3r::closing(), Slic3r::connect_until_done(), fetch_object_list(), handle_ws_message(), Slic3r::MoonrakerPrinterAgent::StatusStreamTimings::handshake, Slic3r::MoonrakerPrinterAgent::StatusStreamTimings::heartbeat, Slic3r::MoonrakerPrinterAgent::StatusStreamTimings::idle, Slic3r::MoonrakerPrinterAgent_VERSION, anonymous_namespace{MoonrakerPrinterAgent.cpp}::parse_ws_endpoint(), payload_mutex, Slic3r::MoonrakerPrinterAgent::StatusStreamTimings::reconnect_delay, run_status_stream(), Slic3r::run_until_done(), send_heartbeat_if_due(), ws_abort, ws_abort_mutex, ws_reconnect_requested, and ws_stop.
Referenced by run_status_stream(), and start_status_stream().
|
staticprivateinherited |
References safe_array_int().
Referenced by fetch_hh_filament_info(), and safe_array_int().
|
staticprivateinherited |
References safe_array_string().
Referenced by fetch_hh_filament_info(), and safe_array_string().
|
staticprivateinherited |
References safe_json_int().
Referenced by fetch_moonraker_filament_data(), and safe_json_int().
|
staticprivateinherited |
References safe_json_string().
Referenced by fetch_moonraker_filament_data(), and safe_json_string().
|
protectedinherited |
References sanitize_filename().
Referenced by sanitize_filename(), start_local_print(), start_send_gcode_to_sdcard(), and upload_gcode().
|
privateinherited |
References BAMBU_NETWORK_SUCCESS, device_info, dispatch_message(), and send_access_code().
Referenced by handle_request(), and send_access_code().
|
privateinherited |
References device_info, Slic3r::http, join_url(), Slic3r::Http::post(), and send_gcode_async().
Referenced by cancel_print(), handle_request(), pause_print(), resume_print(), and send_gcode_async().
|
privateinherited |
References device_info, Slic3r::http, join_url(), Slic3r::Http::post(), and send_gcode_sync().
Referenced by send_gcode_sync(), and start_local_print().
|
privateinherited |
References build_print_payload_locked(), dispatch_message(), payload_mutex, send_heartbeat_if_due(), anonymous_namespace{MoonrakerPrinterAgent.cpp}::steady_now_ms(), and ws_last_emit_ms.
Referenced by run_status_stream(), and send_heartbeat_if_due().
|
privateinherited |
References Slic3r::http, join_url(), Slic3r::Http::post(), and send_jsonrpc_command().
Referenced by send_jsonrpc_command().
|
overridevirtualinherited |
Publish a JSON command to a printer through cloud relay.
Implements Slic3r::IPrinterAgent.
References handle_request().
|
overridevirtualinherited |
Send a JSON command to a LAN printer (bypassing cloud).
Implements Slic3r::IPrinterAgent.
References handle_request().
|
privateinherited |
References BAMBU_NETWORK_SUCCESS, dispatch_message(), Slic3r::module(), and send_version_info().
Referenced by handle_request(), and send_version_info().
|
overridevirtualinherited |
Set the cloud agent used for token access. Must be called before any cloud-relay operations.
Implements Slic3r::IPrinterAgent.
References m_cloud_agent, and state_mutex.
|
overridevirtualinherited |
Register LAN connection status callback.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_SUCCESS, on_local_connect_fn, set_on_local_connect_fn(), and state_mutex.
Referenced by set_on_local_connect_fn().
|
overridevirtualinherited |
Register LAN message callback.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_SUCCESS, on_local_message_fn, set_on_local_message_fn(), and state_mutex.
Referenced by set_on_local_message_fn().
|
overridevirtualinherited |
Register cloud device message callback.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_SUCCESS, on_message_fn, set_on_message_fn(), and state_mutex.
Referenced by set_on_message_fn().
|
overridevirtualinherited |
Register printer MQTT connection callback.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_SUCCESS, on_printer_connected_fn, set_on_printer_connected_fn(), and state_mutex.
Referenced by set_on_printer_connected_fn().
|
overridevirtualinherited |
Register SSDP discovery callback.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_SUCCESS, on_ssdp_msg_fn, set_on_ssdp_msg_fn(), and state_mutex.
Referenced by set_on_ssdp_msg_fn().
|
overridevirtualinherited |
Register subscription failure callback.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_SUCCESS, on_subscribe_failure_fn, set_on_subscribe_failure_fn(), and state_mutex.
Referenced by set_on_subscribe_failure_fn().
|
overridevirtualinherited |
Register user-scoped message callback.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_SUCCESS, on_user_message_fn, set_on_user_message_fn(), and state_mutex.
Referenced by set_on_user_message_fn().
|
overridevirtualinherited |
Provide main thread queue callback.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_SUCCESS, queue_on_main_fn, set_queue_on_main_fn(), and state_mutex.
Referenced by set_queue_on_main_fn().
|
overridevirtualinherited |
Register callback for fatal HTTP errors.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_SUCCESS, on_server_err_fn, set_server_callback(), and state_mutex.
Referenced by set_server_callback().
|
overridevirtualinherited |
Update the selected cloud machine preference.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_SUCCESS, selected_machine, set_user_selected_machine(), and state_mutex.
Referenced by set_user_selected_machine().
|
overridevirtualinherited |
Start or stop SSDP discovery.
Implements Slic3r::IPrinterAgent.
References announce_printhost_device(), and start_discovery().
Referenced by start_discovery().
|
overridevirtualinherited |
Start a LAN-only print.
Implements Slic3r::IPrinterAgent.
References _u8L, BAMBU_NETWORK_ERR_CANCELED, BAMBU_NETWORK_ERR_FILE_NOT_EXIST, BAMBU_NETWORK_ERR_PRINT_LP_PUBLISH_MSG_FAILED, BAMBU_NETWORK_ERR_PRINT_LP_UPLOAD_FTP_FAILED, BAMBU_NETWORK_SUCCESS, device_info, Slic3r::PrintParams::dst_file, Slic3r::PrintParams::filename, Slic3r::PrintingStageCreate, Slic3r::PrintingStageFinished, Slic3r::PrintingStageSending, Slic3r::PrintingStageUpload, sanitize_filename(), send_gcode_sync(), start_local_print(), and upload_gcode().
Referenced by start_local_print().
|
overridevirtualinherited |
Start a local print with cloud record.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_SUCCESS, and start_local_print_with_record().
Referenced by start_local_print_with_record().
|
overridevirtualinherited |
Start a fully managed cloud print.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_SUCCESS, and start_print().
Referenced by start_print().
|
overridevirtualinherited |
Start a print from printer's SD card.
Implements Slic3r::IPrinterAgent.
References BAMBU_NETWORK_SUCCESS, and start_sdcard_print().
Referenced by start_sdcard_print().
|
overridevirtualinherited |
Upload gcode to printer's SD card without starting.
Implements Slic3r::IPrinterAgent.
References _u8L, BAMBU_NETWORK_ERR_PRINT_SG_UPLOAD_FTP_FAILED, BAMBU_NETWORK_SUCCESS, device_info, Slic3r::PrintParams::filename, Slic3r::PrintingStageCreate, Slic3r::PrintingStageFinished, sanitize_filename(), start_send_gcode_to_sdcard(), Slic3r::PrintParams::task_name, and upload_gcode().
Referenced by start_send_gcode_to_sdcard().
|
protectedinherited |
References run_status_stream(), start_status_stream(), stop_status_stream(), ws_abort_mutex, ws_stop, ws_thread, and ws_timings.
Referenced by perform_connection_async(), and start_status_stream().
|
inlinevirtualinherited |
Subscribe to a logical module (for example app- or tunnel-scoped streams).
Reimplemented in Slic3r::BBLPrinterAgent.
References BAMBU_NETWORK_SUCCESS, and Slic3r::module().
|
protectedinherited |
References stop_status_stream(), ws_abort, ws_abort_mutex, ws_stop, and ws_thread.
Referenced by ~MoonrakerPrinterAgent(), connect_printer(), disconnect_printer(), start_status_stream(), and stop_status_stream().
|
inlinevirtualinherited |
Stop listening to a formerly subscribed module.
Reimplemented in Slic3r::BBLPrinterAgent.
References BAMBU_NETWORK_SUCCESS, and Slic3r::module().
|
inlinevirtualinherited |
Translate one filament id across the printer boundary.
Orca content-addresses every system filament; a printer, its AMS and its vendor cloud know only that vendor's own catalog ids. An agent whose printers already speak Orca's ids leaves them alone, and so does an id with no mapping.
Reimplemented in Slic3r::BBLPrinterAgent.
|
staticprotectedinherited |
References trim_and_upper().
Referenced by Slic3r::SnapmakerPrinterAgent::combine_filament_type(), map_filament_type_to_generic_id(), Slic3r::QidiPrinterAgent::map_filament_type_to_setting_id(), Slic3r::QidiPrinterAgent::normalize_filament_type(), and trim_and_upper().
|
inlinevirtualinherited |
Remove the association between account and printer.
Reimplemented in Slic3r::BBLPrinterAgent, and Slic3r::PyPrinterAgentPluginCapabilityTrampoline.
References BAMBU_NETWORK_SUCCESS.
Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings().
|
privateinherited |
References payload_mutex, status_cache, and update_status_cache().
Referenced by handle_ws_message(), perform_connection_async(), and update_status_cache().
|
privateinherited |
References _u8L, Slic3r::http, join_url(), Slic3r::Http::post(), Slic3r::PrintingStageUpload, sanitize_filename(), Slic3r::Http::Progress::ulnow, Slic3r::Http::Progress::ultotal, and upload_gcode().
Referenced by start_local_print(), start_send_gcode_to_sdcard(), and upload_gcode().
|
privateinherited |
Referenced by build_print_payload_locked(), and run_status_stream().
|
privateinherited |
Referenced by ~MoonrakerPrinterAgent(), connect_printer(), disconnect_printer(), and perform_connection_async().
|
privateinherited |
Referenced by ~MoonrakerPrinterAgent(), connect_printer(), disconnect_printer(), and perform_connection_async().
|
privateinherited |
Referenced by ~MoonrakerPrinterAgent(), and connect_printer().
|
protectedinherited |
Referenced by ~MoonrakerPrinterAgent(), announce_printhost_device(), bind_detect(), build_ams_payload(), connect_printer(), disconnect_printer(), Slic3r::CrealityPrintAgent::fetch_filament_info(), Slic3r::QidiPrinterAgent::fetch_filament_info(), Slic3r::SnapmakerPrinterAgent::fetch_filament_info(), fetch_hh_filament_info(), fetch_moonraker_filament_data(), init_device_info(), perform_connection_async(), send_access_code(), send_gcode_async(), send_gcode_sync(), start_local_print(), and start_send_gcode_to_sdcard().
|
privateinherited |
Referenced by connect_printer(), and handle_ws_message().
|
privateinherited |
Referenced by MoonrakerPrinterAgent(), and set_cloud_agent().
|
privateinherited |
|
privateinherited |
Referenced by dispatch_local_connect(), and set_on_local_connect_fn().
|
privateinherited |
Referenced by dispatch_message(), and set_on_local_message_fn().
|
privateinherited |
Referenced by dispatch_message(), and set_on_message_fn().
|
privateinherited |
Referenced by dispatch_printer_connected(), and set_on_printer_connected_fn().
|
privateinherited |
Referenced by set_server_callback().
|
privateinherited |
Referenced by announce_printhost_device(), and set_on_ssdp_msg_fn().
|
privateinherited |
Referenced by set_on_subscribe_failure_fn().
|
privateinherited |
Referenced by set_on_user_message_fn().
|
mutableprivateinherited |
Referenced by connect_printer(), handle_ws_message(), run_status_stream(), send_heartbeat_if_due(), and update_status_cache().
|
privateinherited |
Referenced by dispatch_local_connect(), dispatch_message(), dispatch_printer_connected(), and set_queue_on_main_fn().
|
privateinherited |
Referenced by announce_printhost_device(), get_user_selected_machine(), and set_user_selected_machine().
|
privateinherited |
Referenced by announce_printhost_device().
|
privateinherited |
Referenced by announce_printhost_device().
|
mutableprotectedinherited |
Referenced by announce_printhost_device(), dispatch_local_connect(), dispatch_message(), dispatch_printer_connected(), get_user_selected_machine(), set_cloud_agent(), set_on_local_connect_fn(), set_on_local_message_fn(), set_on_message_fn(), set_on_printer_connected_fn(), set_on_ssdp_msg_fn(), set_on_subscribe_failure_fn(), set_on_user_message_fn(), set_queue_on_main_fn(), set_server_callback(), and set_user_selected_machine().
|
privateinherited |
Referenced by build_print_payload_locked(), connect_printer(), handle_ws_message(), and update_status_cache().
|
staticconstexprprivateinherited |
Referenced by handle_ws_message().
|
privateinherited |
Referenced by run_status_stream(), and stop_status_stream().
|
privateinherited |
Referenced by join_stopped_status_stream(), run_status_stream(), start_status_stream(), and stop_status_stream().
|
privateinherited |
Referenced by connect_printer(), and handle_ws_message().
|
privateinherited |
Referenced by connect_printer(), handle_ws_message(), and send_heartbeat_if_due().
|
privateinherited |
Referenced by handle_ws_message(), and run_status_stream().
|
privateinherited |
Referenced by fetch_object_list(), join_stopped_status_stream(), run_status_stream(), start_status_stream(), and stop_status_stream().
|
privateinherited |
Referenced by join_stopped_status_stream(), start_status_stream(), and stop_status_stream().
|
protectedinherited |
Referenced by start_status_stream().