OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::PyPrinterAgentPluginCapabilityTrampoline Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/plugin/pluginTypes/printerAgent/PrinterAgentPluginCapabilityTrampoline.hpp>

Inheritance diagram for Slic3r::PyPrinterAgentPluginCapabilityTrampoline:
Collaboration diagram for Slic3r::PyPrinterAgentPluginCapabilityTrampoline:

Classes

struct  ShutdownDisconnect

Public Member Functions

AgentInfo get_agent_info () override
int connect_printer (const PrinterConnectionParams &params) override
int disconnect_printer () override
int send_message (std::string dev_id, std::string json_str, int qos, int flag) override
int send_message_to_printer (std::string dev_id, std::string json_str, int qos, int flag) override
int command_ams_refresh_rfid (std::string dev_id, int ams_id, int slot_id, int sequence_id, bool lan_mode) override
int command_ams_calibrate (std::string dev_id, int ams_id, int sequence_id, bool lan_mode) override
int command_ams_select_tray (std::string dev_id, std::string tray_id, int sequence_id, bool lan_mode) override
int command_start_camera (std::string dev_id) override
int command_xyz_abs (std::string dev_id, int sequence_id, bool lan_mode) override
int command_auto_leveling (std::string dev_id, int sequence_id, bool lan_mode) override
int command_go_home (std::string dev_id, bool is_printing, bool supports_mqtt_homing, int sequence_id, bool lan_mode) override
int command_set_bed (std::string dev_id, int temp, bool supports_mqtt_bed_ctrl, int sequence_id, bool lan_mode) override
int command_set_nozzle (std::string dev_id, int temp, int sequence_id, bool lan_mode) override
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) override
bool start_discovery (bool start, bool sending) override
int bind_detect (std::string dev_ip, std::string sec_link, detectResult &detect) override
std::string get_user_selected_machine () override
int set_user_selected_machine (std::string dev_id) 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
FilamentSyncMode get_filament_sync_mode () const override
CameraStreamMode get_camera_stream_mode () const override
std::string get_camera_url () const override
bool fetch_filament_info (std::string dev_id, FilamentSyncMode sync_mode) override
int check_cert () override
void install_device_cert (std::string dev_id, bool lan_only) override
int ping_bind (std::string ping_code) override
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) override
int unbind (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_sdcard_print (PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn) override
int get_hms_snapshot (std::string dev_id, std::string file_name, std::function< void(std::string, int)> callback) override
int set_server_callback (OnServerErrFn 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
int request_bind_ticket (std::string *ticket) override
std::string get_name () const override
bool has_config_ui () const override
std::string get_config_ui () const override
nlohmann::json get_default_config () const override
void on_load () override
void on_unload () override
void on_cancelled () override
void on_lifecycle_event (LifecycleEvent event, const LifecycleEventContext &ctx) override
PluginCapabilityType get_type () const override
void set_cloud_agent (std::shared_ptr< ICloudServiceAgent > cloud) final override
const std::string & name () const
PluginCapabilityType type () const
PluginCapabilityId identity () const
void set_resolved_identity (std::string name, PluginCapabilityType type)
bool is_enabled () const
void set_enabled (bool enabled)
bool config_ui_available () const
void set_config_ui_available (bool available)
void set_audit_plugin_key (std::string key)
const std::string & audit_plugin_key () const
void increment () const
void decrement () const
int ref_count () const
virtual std::string default_lan_username () const
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 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

Static Public Member Functions

static void RegisterBindings (pybind11::module_ &module)

Private Member Functions

int python_disconnect_printer ()
int disconnect_printer_at_shutdown ()
void log_failure (const char *operation, const char *error) const
int publish_command_json (std::string dev_id, const nlohmann::json &j, bool lan_mode)

Static Private Member Functions

static void run_shutdown_disconnect (PyPrinterAgentPluginCapabilityTrampoline *agent, ShutdownDisconnect &call)

Private Attributes

std::mutex m_shutdown_disconnect_mutex
std::shared_ptr< ShutdownDisconnect > m_shutdown_disconnect
std::string m_name
PluginCapabilityType m_type = PluginCapabilityType::Unknown
std::atomic< bool > m_enabled {true}
bool m_config_ui_available = false
std::string m_audit_plugin_key
std::atomic< int > m_refs {0}

Detailed Description

Member Function Documentation

◆ add_subscribe()

virtual int Slic3r::IPrinterAgent::add_subscribe ( std::vector< std::string > dev_list)
inlinevirtualinherited

Subscribe to push streams for specific device identifiers.

Reimplemented in Slic3r::BBLPrinterAgent.

353{ (void) dev_list; return BAMBU_NETWORK_SUCCESS; }
#define BAMBU_NETWORK_SUCCESS
Definition bambu_networking.hpp:16

References BAMBU_NETWORK_SUCCESS.

◆ audit_plugin_key()

const std::string & Slic3r::PluginCapabilityInterface::audit_plugin_key ( ) const
inlineinherited
211{ return m_audit_plugin_key; }
std::string m_audit_plugin_key
Definition PythonPluginInterface.hpp:222

References m_audit_plugin_key.

Referenced by Slic3r::PyPrinterAgentPluginCapabilityTrampoline::log_failure().

Here is the caller graph for this function:

◆ bind()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::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 )
inlineoverridevirtual

Execute the multi-stage printer binding workflow.

Reimplemented from Slic3r::IPrinterAgent.

216 {
217 ORCA_PY_AGENT_OVERRIDE(int, bind, dev_ip, dev_id, dev_model, sec_link, timezone, improved, update_fn);
218 }
#define ORCA_PY_AGENT_OVERRIDE(ret, name,...)
Definition PrinterAgentPluginCapabilityTrampoline.hpp:38
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) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:215

References bind(), and ORCA_PY_AGENT_OVERRIDE.

Referenced by bind().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bind_detect()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::bind_detect ( std::string dev_ip,
std::string sec_link,
detectResult & detect )
inlineoverridevirtual

Perform binding detection/handshake on a LAN printer.

Implements Slic3r::PrinterAgentPluginCapability.

155 {
156 // Passed as a pointer: pybind11 copies a reference argument, so the plugin's writes would be lost.
157 ORCA_PY_AGENT_OVERRIDE(int, bind_detect, dev_ip, sec_link, &detect);
158 }
int bind_detect(std::string dev_ip, std::string sec_link, detectResult &detect) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:154

References bind_detect(), and ORCA_PY_AGENT_OVERRIDE.

Referenced by bind_detect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_cert()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::check_cert ( )
inlineoverridevirtual

Validate current user certificates for the printer.

Reimplemented from Slic3r::IPrinterAgent.

201 {
203 }
int check_cert() override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:200

References check_cert(), and ORCA_PY_AGENT_OVERRIDE.

Referenced by check_cert().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_ams_calibrate()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::command_ams_calibrate ( std::string dev_id,
int ams_id,
int sequence_id,
bool lan_mode )
inlineoverridevirtual

Reimplemented from Slic3r::IPrinterAgent.

100 {
101 ORCA_PY_AGENT_OVERRIDE_DEFAULT(int, command_ams_calibrate, dev_id, ams_id, sequence_id, lan_mode);
102 }
#define ORCA_PY_AGENT_OVERRIDE_DEFAULT(ret, name,...)
Definition PrinterAgentPluginCapabilityTrampoline.hpp:44
int command_ams_calibrate(std::string dev_id, int ams_id, int sequence_id, bool lan_mode) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:99

References command_ams_calibrate(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by command_ams_calibrate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_ams_refresh_rfid()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::command_ams_refresh_rfid ( std::string dev_id,
int ams_id,
int slot_id,
int sequence_id,
bool lan_mode )
inlineoverridevirtual

Reimplemented from Slic3r::IPrinterAgent.

95 {
96 ORCA_PY_AGENT_OVERRIDE_DEFAULT(int, command_ams_refresh_rfid, dev_id, ams_id, slot_id, sequence_id, lan_mode);
97 }
int command_ams_refresh_rfid(std::string dev_id, int ams_id, int slot_id, int sequence_id, bool lan_mode) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:94

References command_ams_refresh_rfid(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by command_ams_refresh_rfid().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_ams_select_tray()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::command_ams_select_tray ( std::string dev_id,
std::string tray_id,
int sequence_id,
bool lan_mode )
inlineoverridevirtual

Reimplemented from Slic3r::IPrinterAgent.

105 {
106 ORCA_PY_AGENT_OVERRIDE_DEFAULT(int, command_ams_select_tray, dev_id, tray_id, sequence_id, lan_mode);
107 }
int command_ams_select_tray(std::string dev_id, std::string tray_id, int sequence_id, bool lan_mode) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:104

References command_ams_select_tray(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by command_ams_select_tray().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_auto_leveling()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::command_auto_leveling ( std::string dev_id,
int sequence_id,
bool lan_mode )
inlineoverridevirtual

Reimplemented from Slic3r::IPrinterAgent.

120 {
121 ORCA_PY_AGENT_OVERRIDE_DEFAULT(int, command_auto_leveling, dev_id, sequence_id, lan_mode);
122 }
int command_auto_leveling(std::string dev_id, int sequence_id, bool lan_mode) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:119

References command_auto_leveling(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by command_auto_leveling().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_axis_control()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::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 )
inlineoverridevirtual

Reimplemented from Slic3r::IPrinterAgent.

144 {
145 ORCA_PY_AGENT_OVERRIDE_DEFAULT(int, command_axis_control, dev_id, axis, unit, input_val, speed,
146 is_core_xy, supports_mqtt_axis_control, sequence_id, lan_mode);
147 }
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) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:141

References command_axis_control(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by command_axis_control().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_go_home()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::command_go_home ( std::string dev_id,
bool is_printing,
bool supports_mqtt_homing,
int sequence_id,
bool lan_mode )
inlineoverridevirtual

Reimplemented from Slic3r::IPrinterAgent.

126 {
127 ORCA_PY_AGENT_OVERRIDE_DEFAULT(int, command_go_home, dev_id, is_printing, supports_mqtt_homing, sequence_id, lan_mode);
128 }
int command_go_home(std::string dev_id, bool is_printing, bool supports_mqtt_homing, int sequence_id, bool lan_mode) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:124

References command_go_home(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by command_go_home().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_set_bed()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::command_set_bed ( std::string dev_id,
int temp,
bool supports_mqtt_bed_ctrl,
int sequence_id,
bool lan_mode )
inlineoverridevirtual

Reimplemented from Slic3r::IPrinterAgent.

132 {
133 ORCA_PY_AGENT_OVERRIDE_DEFAULT(int, command_set_bed, dev_id, temp, supports_mqtt_bed_ctrl, sequence_id, lan_mode);
134 }
int command_set_bed(std::string dev_id, int temp, bool supports_mqtt_bed_ctrl, int sequence_id, bool lan_mode) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:130

References command_set_bed(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by command_set_bed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_set_nozzle()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::command_set_nozzle ( std::string dev_id,
int temp,
int sequence_id,
bool lan_mode )
inlineoverridevirtual

Reimplemented from Slic3r::IPrinterAgent.

137 {
138 ORCA_PY_AGENT_OVERRIDE_DEFAULT(int, command_set_nozzle, dev_id, temp, sequence_id, lan_mode);
139 }
int command_set_nozzle(std::string dev_id, int temp, int sequence_id, bool lan_mode) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:136

References command_set_nozzle(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by command_set_nozzle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_start_camera()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::command_start_camera ( std::string dev_id)
inlineoverridevirtual

Reimplemented from Slic3r::IPrinterAgent.

110 {
112 }
int command_start_camera(std::string dev_id) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:109

References command_start_camera(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by command_start_camera().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_xyz_abs()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::command_xyz_abs ( std::string dev_id,
int sequence_id,
bool lan_mode )
inlineoverridevirtual

Reimplemented from Slic3r::IPrinterAgent.

115 {
116 ORCA_PY_AGENT_OVERRIDE_DEFAULT(int, command_xyz_abs, dev_id, sequence_id, lan_mode);
117 }
int command_xyz_abs(std::string dev_id, int sequence_id, bool lan_mode) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:114

References command_xyz_abs(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by command_xyz_abs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ config_ui_available()

bool Slic3r::PluginCapabilityInterface::config_ui_available ( ) const
inlineinherited
205{ return m_config_ui_available; }
bool m_config_ui_available
Definition PythonPluginInterface.hpp:221

References m_config_ui_available.

◆ connect_printer()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::connect_printer ( const PrinterConnectionParams & params)
inlineoverridevirtual

Establish a direct LAN connection to a printer.

Implements Slic3r::PrinterAgentPluginCapability.

71 {
73 }
int connect_printer(const PrinterConnectionParams &params) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:70

References connect_printer(), and ORCA_PY_AGENT_OVERRIDE.

Referenced by connect_printer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decrement()

void Slic3r::PluginCapabilityInterface::decrement ( ) const
inlineinherited
214{ m_refs.fetch_sub(1, std::memory_order_acq_rel); }
std::atomic< int > m_refs
Definition PythonPluginInterface.hpp:224

References m_refs.

◆ default_lan_username()

virtual std::string Slic3r::IPrinterAgent::default_lan_username ( ) const
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.

212{ return {}; }

◆ del_subscribe()

virtual int Slic3r::IPrinterAgent::del_subscribe ( std::vector< std::string > dev_list)
inlinevirtualinherited

Remove device-level subscriptions.

Reimplemented in Slic3r::BBLPrinterAgent.

358{ (void) dev_list; return BAMBU_NETWORK_SUCCESS; }

References BAMBU_NETWORK_SUCCESS.

◆ disconnect_printer()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::disconnect_printer ( )
inlineoverridevirtual

Tear down the active LAN printer connection.

Implements Slic3r::IPrinterAgent.

76 {
77 // While the app closes, the UI thread waits here; a plugin that never returns would keep it
78 // open, so the call gets a deadline and is left running past it.
79 if (!PluginManager::instance().is_shutting_down())
82 }
static PluginManager & instance()
Definition PluginManager.cpp:74
int python_disconnect_printer()
Definition PrinterAgentPluginCapabilityTrampoline.hpp:321
int disconnect_printer_at_shutdown()
Definition PrinterAgentPluginCapabilityTrampoline.hpp:338

References disconnect_printer_at_shutdown(), Slic3r::PluginManager::instance(), and python_disconnect_printer().

Referenced by python_disconnect_printer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ disconnect_printer_at_shutdown()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::disconnect_printer_at_shutdown ( )
inlineprivate
339 {
340 std::shared_ptr<ShutdownDisconnect> call;
341 bool start = false;
342 {
343 std::lock_guard<std::mutex> lock(m_shutdown_disconnect_mutex);
345 m_shutdown_disconnect = std::make_shared<ShutdownDisconnect>();
346 start = true;
347 }
349 }
350 if (start) {
351 try {
352 std::thread([agent = this, call] { run_shutdown_disconnect(agent, *call); }).detach();
353 } catch (const std::system_error&) {
354 // No thread, so no deadline either: call the plugin directly as before.
355 call->state.store(ShutdownDisconnect::Started);
356 const int result = python_disconnect_printer();
357 call->result.set_value(result);
358 return result;
359 }
360 }
361 if (call->done.wait_until(call->deadline) == std::future_status::ready)
362 return call->done.get();
363 int expected = ShutdownDisconnect::Pending;
364 call->state.compare_exchange_strong(expected, ShutdownDisconnect::Abandoned);
365 log_failure("disconnect_printer", "did not return within 3 s while the app is closing");
367 }
std::shared_ptr< ShutdownDisconnect > m_shutdown_disconnect
Definition PrinterAgentPluginCapabilityTrampoline.hpp:388
static void run_shutdown_disconnect(PyPrinterAgentPluginCapabilityTrampoline *agent, ShutdownDisconnect &call)
Definition PrinterAgentPluginCapabilityTrampoline.hpp:370
void log_failure(const char *operation, const char *error) const
Definition PrinterAgentPluginCapabilityTrampoline.hpp:390
std::mutex m_shutdown_disconnect_mutex
Definition PrinterAgentPluginCapabilityTrampoline.hpp:387
T printer_agent_failure()
Definition PrinterAgentPluginCapabilityTrampoline.hpp:52
@ lock
Definition GLGizmoEmboss.cpp:209
@ Abandoned
Definition PrinterAgentPluginCapabilityTrampoline.hpp:331
@ Pending
Definition PrinterAgentPluginCapabilityTrampoline.hpp:331
@ Started
Definition PrinterAgentPluginCapabilityTrampoline.hpp:331

References Slic3r::PyPrinterAgentPluginCapabilityTrampoline::ShutdownDisconnect::Abandoned, log_failure(), m_shutdown_disconnect, m_shutdown_disconnect_mutex, Slic3r::PyPrinterAgentPluginCapabilityTrampoline::ShutdownDisconnect::Pending, Slic3r::printer_agent_failure(), python_disconnect_printer(), run_shutdown_disconnect(), and Slic3r::PyPrinterAgentPluginCapabilityTrampoline::ShutdownDisconnect::Started.

Referenced by disconnect_printer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fetch_filament_info()

bool Slic3r::PyPrinterAgentPluginCapabilityTrampoline::fetch_filament_info ( std::string dev_id,
FilamentSyncMode sync_mode )
inlineoverridevirtual

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::IPrinterAgent.

196 {
197 ORCA_PY_AGENT_OVERRIDE_DEFAULT(bool, fetch_filament_info, dev_id, sync_mode);
198 }
bool fetch_filament_info(std::string dev_id, FilamentSyncMode sync_mode) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:195

References fetch_filament_info(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by fetch_filament_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ from_orca_filament_id()

virtual std::string Slic3r::IPrinterAgent::from_orca_filament_id ( const std::string & orca_filament_id) const
inlinevirtualinherited

Reimplemented in Slic3r::BBLPrinterAgent.

472{ return orca_filament_id; }

◆ get_agent_info()

AgentInfo Slic3r::PyPrinterAgentPluginCapabilityTrampoline::get_agent_info ( )
inlineoverridevirtual

Get agent information.

Implements Slic3r::PrinterAgentPluginCapability.

66 {
68 }
AgentInfo get_agent_info() override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:65

References get_agent_info(), and ORCA_PY_AGENT_OVERRIDE.

Referenced by get_agent_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_camera_stream_mode()

CameraStreamMode Slic3r::PyPrinterAgentPluginCapabilityTrampoline::get_camera_stream_mode ( ) const
inlineoverridevirtual

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.

Returns
CameraStreamMode indicating how the camera stream is obtained or used:

Reimplemented from Slic3r::IPrinterAgent.

186 {
188 }
CameraStreamMode get_camera_stream_mode() const override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:185
CameraStreamMode
Definition IPrinterAgent.hpp:62

References get_camera_stream_mode(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by get_camera_stream_mode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_camera_url()

std::string Slic3r::PyPrinterAgentPluginCapabilityTrampoline::get_camera_url ( ) const
inlineoverridevirtual

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 from Slic3r::IPrinterAgent.

191 {
193 }
std::string get_camera_url() const override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:190

References get_camera_url(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by get_camera_url().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_config_ui()

std::string Slic3r::PyPluginCommonTrampoline< PrinterAgentPluginCapability >::get_config_ui ( ) const
inlineoverridevirtualinherited

Reimplemented from Slic3r::PluginCapabilityInterface.

163 {
165 [] {},
168 Base,
170 }
#define ORCA_PY_OVERRIDE_AUDITED(audit_setup, override_macro, ret, base, name,...)
Definition PyPluginTrampoline.hpp:55
Definition PyPluginTrampoline.hpp:141

◆ get_default_config()

nlohmann::json Slic3r::PyPluginCommonTrampoline< PrinterAgentPluginCapability >::get_default_config ( ) const
inlineoverridevirtualinherited

Reimplemented from Slic3r::PluginCapabilityInterface.

180 {
183 try {
184 pybind11::function override = pybind11::get_override(static_cast<const Base*>(this), "get_default_config");
185 if (!override)
187
189 if (!config.is_object()) {
191 << "Plugin capability '" << this->name() << "' of plugin '" << this->audit_plugin_key()
192 << "': get_default_config() returned " << config.type_name() << ", not an object; restoring an empty config";
194 }
195 return config;
198 throw;
199 }
200 }
#define ORCA_PY_AUDIT_SCOPE()
Definition PyPluginTrampoline.hpp:50
const std::string & audit_plugin_key() const
Definition PythonPluginInterface.hpp:211
const std::string & name() const
Definition PythonPluginInterface.hpp:187
void log_python_exception_keep(pybind11::error_already_set &err)
Definition PythonInterpreter.cpp:96
nlohmann::json py_to_json(const pybind11::handle &o, int depth=0)
Definition PluginFsUtils.hpp:64

◆ get_filament_sync_mode()

FilamentSyncMode Slic3r::PyPrinterAgentPluginCapabilityTrampoline::get_filament_sync_mode ( ) const
inlineoverridevirtual

Get the filament synchronization mode for this agent.

Returns
FilamentSyncMode indicating how filament data is obtained:
  • subscription: Real-time push updates via MQTT (no fetch needed)
  • pull: On-demand fetch via REST API (call fetch_filament_info())
  • none: Filament synchronization not supported

Reimplemented from Slic3r::IPrinterAgent.

181 {
183 }
FilamentSyncMode get_filament_sync_mode() const override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:180
FilamentSyncMode
Definition IPrinterAgent.hpp:56

References get_filament_sync_mode(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by get_filament_sync_mode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_hms_snapshot()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::get_hms_snapshot ( std::string dev_id,
std::string file_name,
std::function< void(std::string, int)> callback )
inlineoverridevirtual

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 from Slic3r::IPrinterAgent.

241 {
242 ORCA_PY_AGENT_OVERRIDE_DEFAULT(int, get_hms_snapshot, dev_id, file_name, callback);
243 }
int get_hms_snapshot(std::string dev_id, std::string file_name, std::function< void(std::string, int)> callback) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:240

References get_hms_snapshot(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by get_hms_snapshot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_name()

std::string Slic3r::PyPluginCommonTrampoline< PrinterAgentPluginCapability >::get_name ( ) const
inlineoverridevirtualinherited

◆ get_type()

PluginCapabilityType Slic3r::PrinterAgentPluginCapability::get_type ( ) const
inlineoverridevirtualinherited

Reimplemented from Slic3r::PluginCapabilityInterface.

@ PrinterConnection
Definition PythonPluginInterface.hpp:17

References Slic3r::PrinterConnection.

Referenced by RegisterBindings().

Here is the caller graph for this function:

◆ get_user_selected_machine()

std::string Slic3r::PyPrinterAgentPluginCapabilityTrampoline::get_user_selected_machine ( )
inlineoverridevirtual

Return the currently selected printer ID.

Implements Slic3r::PrinterAgentPluginCapability.

161 {
163 }
std::string get_user_selected_machine() override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:160

References get_user_selected_machine(), and ORCA_PY_AGENT_OVERRIDE.

Referenced by get_user_selected_machine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_config_ui()

bool Slic3r::PyPluginCommonTrampoline< PrinterAgentPluginCapability >::has_config_ui ( ) const
inlineoverridevirtualinherited

Reimplemented from Slic3r::PluginCapabilityInterface.

153 {
155 [] {},
157 bool,
158 Base,
160 }

◆ identity()

PluginCapabilityId Slic3r::PluginCapabilityInterface::identity ( ) const
inlineinherited
189{ return {m_type, m_name, m_audit_plugin_key}; }
std::string m_name
Definition PythonPluginInterface.hpp:218
PluginCapabilityType m_type
Definition PythonPluginInterface.hpp:219

References m_audit_plugin_key, m_name, and m_type.

Referenced by Slic3r::anonymous_namespace{PluginConfig.cpp}::capability_identity().

Here is the caller graph for this function:

◆ increment()

void Slic3r::PluginCapabilityInterface::increment ( ) const
inlineinherited
213{ m_refs.fetch_add(1, std::memory_order_acq_rel); }

References m_refs.

◆ install_device_cert()

void Slic3r::PyPrinterAgentPluginCapabilityTrampoline::install_device_cert ( std::string dev_id,
bool lan_only )
inlineoverridevirtual

Install or refresh device certificate for LAN TLS.

Reimplemented from Slic3r::IPrinterAgent.

206 {
208 }
void install_device_cert(std::string dev_id, bool lan_only) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:205

References install_device_cert(), and ORCA_PY_AGENT_OVERRIDE_DEFAULT.

Referenced by install_device_cert().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_enabled()

bool Slic3r::PluginCapabilityInterface::is_enabled ( ) const
inlineinherited
199{ return m_enabled.load(std::memory_order_acquire); }
std::atomic< bool > m_enabled
Definition PythonPluginInterface.hpp:220

References m_enabled.

◆ log_failure()

void Slic3r::PyPrinterAgentPluginCapabilityTrampoline::log_failure ( const char * operation,
const char * error ) const
inlineprivate
391 {
392 BOOST_LOG_TRIVIAL(error) << "Printer agent plugin '" << this->audit_plugin_key() << "': " << operation << " failed: " << error;
393 }

References Slic3r::PluginCapabilityInterface::audit_plugin_key().

Referenced by disconnect_printer_at_shutdown().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name()

const std::string & Slic3r::PluginCapabilityInterface::name ( ) const
inlineinherited
187{ return m_name; }

References m_name.

Referenced by Slic3r::PrinterAgentPluginCapability::RegisterBindings(), and set_resolved_identity().

Here is the caller graph for this function:

◆ on_cancelled()

void Slic3r::PyPluginCommonTrampoline< PrinterAgentPluginCapability >::on_cancelled ( )
inlineoverridevirtualinherited

◆ on_lifecycle_event()

void Slic3r::PyPluginCommonTrampoline< PrinterAgentPluginCapability >::on_lifecycle_event ( LifecycleEvent event,
const LifecycleEventContext & ctx )
inlineoverridevirtualinherited

◆ on_load()

void Slic3r::PyPluginCommonTrampoline< PrinterAgentPluginCapability >::on_load ( )
inlineoverridevirtualinherited

◆ on_unload()

void Slic3r::PyPluginCommonTrampoline< PrinterAgentPluginCapability >::on_unload ( )
inlineoverridevirtualinherited

◆ ping_bind()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::ping_bind ( std::string ping_code)
inlineoverridevirtual

Ping the binding endpoint to check printer readiness.

Reimplemented from Slic3r::IPrinterAgent.

211 {
212 ORCA_PY_AGENT_OVERRIDE(int, ping_bind, ping_code);
213 }
int ping_bind(std::string ping_code) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:210

References ORCA_PY_AGENT_OVERRIDE, and ping_bind().

Referenced by ping_bind().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ publish_command_json()

int Slic3r::IPrinterAgent::publish_command_json ( std::string dev_id,
const nlohmann::json & j,
bool lan_mode )
inlineprivateinherited
126 {
127 return lan_mode ? send_message_to_printer(dev_id, j.dump(), 0, 0)
128 : send_message(dev_id, j.dump(), 0, 0);
129 }
virtual int send_message(std::string dev_id, std::string json_str, int qos, int flag)=0
virtual int send_message_to_printer(std::string dev_id, std::string json_str, int qos, int flag)=0
size_t dump(const PresetBundle &bundle, const Sections &sections, std::ostream &out)
Definition profile_include_dump.cpp:96

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ python_disconnect_printer()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::python_disconnect_printer ( )
inlineprivate
322 {
324 }
int disconnect_printer() override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:75

References disconnect_printer(), and ORCA_PY_AGENT_OVERRIDE.

Referenced by disconnect_printer(), disconnect_printer_at_shutdown(), and run_shutdown_disconnect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ref_count()

int Slic3r::PluginCapabilityInterface::ref_count ( ) const
inlineinherited
215{ return m_refs.load(std::memory_order_acquire); }

References m_refs.

◆ RegisterBindings()

void Slic3r::PrinterAgentPluginCapability::RegisterBindings ( pybind11::module_ & module)
staticinherited
22{
23 auto printer_agent_module = module.def_submodule("printer_agent", "Printer Agent API");
24
25 py::enum_<FilamentSyncMode>(printer_agent_module, "FilamentSyncMode")
26 .value("None_", FilamentSyncMode::none)
27 .value("Subscription", FilamentSyncMode::subscription)
28 .value("Pull", FilamentSyncMode::pull)
29 .export_values();
30
31 py::enum_<CameraStreamMode>(printer_agent_module, "CameraStreamMode")
32 .value("None_", CameraStreamMode::none)
33 .value("HTTP", CameraStreamMode::http)
34 .value("HTTPS", CameraStreamMode::https)
35 .value("HTTP_SNAPSHOT", CameraStreamMode::http_snapshot)
36 .value("RTSP", CameraStreamMode::rtsp)
37 .export_values();
38
39 py::class_<AgentInfo>(printer_agent_module, "AgentInfo")
40 .def(py::init<>())
41 .def(py::init([](std::string id, std::string name, std::string version, std::string description) {
42 return AgentInfo{std::move(id), std::move(name), std::move(version), std::move(description)};
43 }),
44 py::arg("id"), py::arg("name"), py::arg("version"), py::arg("description"))
45 .def_readwrite("id", &AgentInfo::id)
46 .def_readwrite("name", &AgentInfo::name)
47 .def_readwrite("version", &AgentInfo::version)
48 .def_readwrite("description", &AgentInfo::description);
49
50 py::class_<detectResult>(printer_agent_module, "DetectResult")
51 .def(py::init<>())
52 .def_readwrite("result_msg", &detectResult::result_msg)
53 .def_readwrite("command", &detectResult::command)
54 .def_readwrite("dev_id", &detectResult::dev_id)
55 .def_readwrite("model_id", &detectResult::model_id)
56 .def_readwrite("dev_name", &detectResult::dev_name)
57 .def_readwrite("version", &detectResult::version)
58 .def_readwrite("bind_state", &detectResult::bind_state)
59 .def_readwrite("connect_type", &detectResult::connect_type);
60
61 py::class_<PrintParams>(printer_agent_module, "PrintParams")
62 .def(py::init<>())
63 .def_readwrite("dev_id", &PrintParams::dev_id)
64 .def_readwrite("task_name", &PrintParams::task_name)
65 .def_readwrite("project_name", &PrintParams::project_name)
66 .def_readwrite("preset_name", &PrintParams::preset_name)
67 .def_readwrite("filename", &PrintParams::filename)
68 .def_readwrite("config_filename", &PrintParams::config_filename)
69 .def_readwrite("plate_index", &PrintParams::plate_index)
70 .def_readwrite("ftp_folder", &PrintParams::ftp_folder)
71 .def_readwrite("ftp_file", &PrintParams::ftp_file)
72 .def_readwrite("ftp_file_md5", &PrintParams::ftp_file_md5)
73 .def_readwrite("nozzle_mapping", &PrintParams::nozzle_mapping)
74 .def_readwrite("ams_mapping", &PrintParams::ams_mapping)
75 .def_readwrite("ams_mapping2", &PrintParams::ams_mapping2)
76 .def_readwrite("ams_mapping_info", &PrintParams::ams_mapping_info)
77 .def_readwrite("nozzles_info", &PrintParams::nozzles_info)
78 .def_readwrite("connection_type", &PrintParams::connection_type)
79 .def_readwrite("comments", &PrintParams::comments)
80 .def_readwrite("origin_profile_id", &PrintParams::origin_profile_id)
81 .def_readwrite("stl_design_id", &PrintParams::stl_design_id)
82 .def_readwrite("origin_model_id", &PrintParams::origin_model_id)
83 .def_readwrite("print_type", &PrintParams::print_type)
84 .def_readwrite("dst_file", &PrintParams::dst_file)
85 .def_readwrite("dev_name", &PrintParams::dev_name)
86 .def_readwrite("dev_ip", &PrintParams::dev_ip)
87 .def_readwrite("use_ssl_for_ftp", &PrintParams::use_ssl_for_ftp)
88 .def_readwrite("use_ssl_for_mqtt", &PrintParams::use_ssl_for_mqtt)
89 .def_readwrite("username", &PrintParams::username)
90 .def_readwrite("password", &PrintParams::password)
91 .def_readwrite("task_bed_leveling", &PrintParams::task_bed_leveling)
92 .def_readwrite("task_flow_cali", &PrintParams::task_flow_cali)
93 .def_readwrite("task_vibration_cali", &PrintParams::task_vibration_cali)
94 .def_readwrite("task_layer_inspect", &PrintParams::task_layer_inspect)
95 .def_readwrite("task_record_timelapse", &PrintParams::task_record_timelapse)
96 .def_readwrite("task_use_ams", &PrintParams::task_use_ams)
97 .def_readwrite("task_bed_type", &PrintParams::task_bed_type)
98 .def_readwrite("extra_options", &PrintParams::extra_options)
99 .def_readwrite("auto_bed_leveling", &PrintParams::auto_bed_leveling)
100 .def_readwrite("auto_flow_cali", &PrintParams::auto_flow_cali)
101 .def_readwrite("auto_offset_cali", &PrintParams::auto_offset_cali)
102 .def_readwrite("task_ext_change_assist", &PrintParams::task_ext_change_assist)
103 .def_readwrite("try_emmc_print", &PrintParams::try_emmc_print);
104
105 py::class_<PrinterConnectionParams>(printer_agent_module, "PrinterConnectionParams")
106 .def(py::init<>())
107 .def_readwrite("dev_id", &PrinterConnectionParams::dev_id)
108 .def_readwrite("host", &PrinterConnectionParams::host)
109 .def_readwrite("port", &PrinterConnectionParams::port)
110 .def_readwrite("username", &PrinterConnectionParams::username)
111 .def_readwrite("password", &PrinterConnectionParams::password)
112 .def_readwrite("use_ssl", &PrinterConnectionParams::use_ssl)
113 .def_readwrite("ca_file", &PrinterConnectionParams::ca_file);
114
115 py::class_<PrinterAgentPluginCapability, PluginCapabilityInterface, PyPrinterAgentPluginCapabilityTrampoline, std::shared_ptr<PrinterAgentPluginCapability>>(
116 printer_agent_module, "PrinterAgentBase")
117 .def(py::init<>())
119 .def("get_agent_info", &PrinterAgentPluginCapability::get_agent_info)
120 .def("connect_printer", &PrinterAgentPluginCapability::connect_printer)
121 .def("disconnect_printer", &PrinterAgentPluginCapability::disconnect_printer)
122 .def("send_message", &PrinterAgentPluginCapability::send_message)
123 .def("send_message_to_printer", &PrinterAgentPluginCapability::send_message_to_printer)
124 .def("command_ams_refresh_rfid", &PrinterAgentPluginCapability::command_ams_refresh_rfid)
125 .def("command_ams_calibrate", &PrinterAgentPluginCapability::command_ams_calibrate)
126 .def("command_ams_select_tray", &PrinterAgentPluginCapability::command_ams_select_tray)
127 .def("command_start_camera", &PrinterAgentPluginCapability::command_start_camera)
128 .def("command_xyz_abs", &PrinterAgentPluginCapability::command_xyz_abs)
129 .def("command_auto_leveling", &PrinterAgentPluginCapability::command_auto_leveling)
130 .def("command_go_home", &PrinterAgentPluginCapability::command_go_home)
131 .def("command_set_bed", &PrinterAgentPluginCapability::command_set_bed)
132 .def("command_set_nozzle", &PrinterAgentPluginCapability::command_set_nozzle)
133 .def("command_axis_control", &PrinterAgentPluginCapability::command_axis_control)
134 .def("start_discovery", &PrinterAgentPluginCapability::start_discovery)
136 .def("get_user_selected_machine", &PrinterAgentPluginCapability::get_user_selected_machine)
137 .def("set_user_selected_machine", &PrinterAgentPluginCapability::set_user_selected_machine)
138 .def("start_send_gcode_to_sdcard", &PrinterAgentPluginCapability::start_send_gcode_to_sdcard)
139 .def("start_local_print", &PrinterAgentPluginCapability::start_local_print)
140 .def("get_filament_sync_mode", &PrinterAgentPluginCapability::get_filament_sync_mode)
141 .def("get_camera_stream_mode", &PrinterAgentPluginCapability::get_camera_stream_mode)
142 .def("fetch_filament_info", &PrinterAgentPluginCapability::fetch_filament_info)
143 .def("get_camera_url", &PrinterAgentPluginCapability::get_camera_url)
145 .def("install_device_cert", &PrinterAgentPluginCapability::install_device_cert)
150 .def("start_local_print_with_record", &PrinterAgentPluginCapability::start_local_print_with_record)
151 .def("start_sdcard_print", &PrinterAgentPluginCapability::start_sdcard_print);
152}
virtual int ping_bind(std::string ping_code)
Definition IPrinterAgent.hpp:260
virtual int command_start_camera(std::string)
Definition IPrinterAgent.hpp:121
virtual int disconnect_printer()=0
virtual CameraStreamMode get_camera_stream_mode() const
Definition IPrinterAgent.hpp:455
virtual int unbind(std::string dev_id)
Definition IPrinterAgent.hpp:290
virtual int command_set_nozzle(std::string dev_id, int temp, int sequence_id, bool lan_mode)
Definition IPrinterAgent.hpp:173
virtual std::string get_camera_url() const
Definition IPrinterAgent.hpp:478
virtual int command_ams_refresh_rfid(std::string, int, int, int, bool)
Definition IPrinterAgent.hpp:115
virtual int command_auto_leveling(std::string dev_id, int sequence_id, bool lan_mode)
Definition IPrinterAgent.hpp:140
virtual int command_set_bed(std::string dev_id, int temp, bool supports_mqtt_bed_ctrl, int sequence_id, bool lan_mode)
Definition IPrinterAgent.hpp:160
virtual bool fetch_filament_info(std::string dev_id, FilamentSyncMode sync_mode=FilamentSyncMode::pull)
Definition IPrinterAgent.hpp:462
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)
Definition IPrinterAgent.hpp:182
virtual FilamentSyncMode get_filament_sync_mode() const
Definition IPrinterAgent.hpp:447
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)
Definition IPrinterAgent.hpp:274
virtual int command_xyz_abs(std::string dev_id, int sequence_id, bool lan_mode)
Definition IPrinterAgent.hpp:132
virtual void install_device_cert(std::string dev_id, bool lan_only)
Definition IPrinterAgent.hpp:240
virtual int command_ams_calibrate(std::string, int, int, bool)
Definition IPrinterAgent.hpp:117
virtual int command_go_home(std::string dev_id, bool is_printing, bool supports_mqtt_homing, int sequence_id, bool lan_mode)
Definition IPrinterAgent.hpp:148
virtual int command_ams_select_tray(std::string, std::string, int, bool)
Definition IPrinterAgent.hpp:119
virtual int check_cert()
Definition IPrinterAgent.hpp:235
int connect_printer(const PrinterConnectionParams &params) override=0
PluginCapabilityType get_type() const override
Definition PrinterAgentPluginCapability.hpp:25
int start_sdcard_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn) override=0
int start_local_print_with_record(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn) override=0
int start_local_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn) override=0
int start_send_gcode_to_sdcard(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn) override=0
int set_user_selected_machine(std::string dev_id) override=0
int start_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn) override=0
int bind_detect(std::string dev_ip, std::string sec_link, detectResult &detect) override=0
int send_message(std::string dev_id, std::string json_str, int qos, int flag) override=0
bool start_discovery(bool start, bool sending) override=0
AgentInfo get_agent_info() override=0
int send_message_to_printer(std::string dev_id, std::string json_str, int qos, int flag) override=0
std::string get_user_selected_machine() override=0
std::string connect_type
Definition bambu_networking.hpp:189
std::string result_msg
Definition bambu_networking.hpp:182
std::string filename
Definition bambu_networking.hpp:294
bool use_ssl_for_mqtt
Definition bambu_networking.hpp:317
std::string name
Human-readable agent name, e.g. "Orca", "Bambu Lab".
Definition IPrinterAgent.hpp:32
std::string comments
Definition bambu_networking.hpp:306
bool try_emmc_print
Definition bambu_networking.hpp:336
std::string dev_name
Definition bambu_networking.hpp:186
std::string dev_name
Definition bambu_networking.hpp:312
bool use_ssl_for_ftp
Definition bambu_networking.hpp:316
std::string password
Definition IPrinterAgent.hpp:43
std::string project_name
Definition bambu_networking.hpp:292
bool task_vibration_cali
Definition bambu_networking.hpp:324
std::string dev_id
Definition bambu_networking.hpp:290
std::string dev_id
Definition bambu_networking.hpp:184
std::string ftp_file
Definition bambu_networking.hpp:298
int auto_flow_cali
Definition bambu_networking.hpp:332
bool task_layer_inspect
Definition bambu_networking.hpp:325
std::string extra_options
Definition bambu_networking.hpp:330
std::string password
Definition bambu_networking.hpp:319
bool use_ssl
Definition IPrinterAgent.hpp:44
std::string origin_model_id
Definition bambu_networking.hpp:309
bool task_record_timelapse
Definition bambu_networking.hpp:326
bool task_bed_leveling
Definition bambu_networking.hpp:322
std::string dev_ip
Definition bambu_networking.hpp:315
std::string version
Agent version string, e.g. "1.0.0".
Definition IPrinterAgent.hpp:33
std::string config_filename
Definition bambu_networking.hpp:295
std::string username
Definition bambu_networking.hpp:318
std::string nozzles_info
Definition bambu_networking.hpp:304
std::string ftp_folder
Definition bambu_networking.hpp:297
std::string task_name
Definition bambu_networking.hpp:291
std::string print_type
Definition bambu_networking.hpp:310
std::string connection_type
Definition bambu_networking.hpp:305
std::string port
Definition IPrinterAgent.hpp:41
std::string ams_mapping
Definition bambu_networking.hpp:301
@ none
Definition IPrinterAgent.hpp:63
@ https
Definition IPrinterAgent.hpp:65
@ http
Definition IPrinterAgent.hpp:64
@ http_snapshot
Definition IPrinterAgent.hpp:68
@ rtsp
Definition IPrinterAgent.hpp:66
std::string dst_file
Definition bambu_networking.hpp:311
int auto_offset_cali
Definition bambu_networking.hpp:333
bool task_ext_change_assist
Definition bambu_networking.hpp:335
bool task_use_ams
Definition bambu_networking.hpp:328
std::string ams_mapping2
Definition bambu_networking.hpp:302
int plate_index
Definition bambu_networking.hpp:296
int stl_design_id
Definition bambu_networking.hpp:308
std::string ftp_file_md5
Definition bambu_networking.hpp:299
std::string ams_mapping_info
Definition bambu_networking.hpp:303
@ none
Filament synchronization not supported.
Definition IPrinterAgent.hpp:57
@ subscription
Real-time push updates via subscription (e.g., MQTT).
Definition IPrinterAgent.hpp:58
@ pull
On-demand fetch via REST API (blocking call).
Definition IPrinterAgent.hpp:59
int auto_bed_leveling
Definition bambu_networking.hpp:331
std::string model_id
Definition bambu_networking.hpp:185
std::string bind_state
Definition bambu_networking.hpp:188
std::string task_bed_type
Definition bambu_networking.hpp:329
bool task_flow_cali
Definition bambu_networking.hpp:323
std::string version
Definition bambu_networking.hpp:187
int origin_profile_id
Definition bambu_networking.hpp:307
std::string nozzle_mapping
Definition bambu_networking.hpp:300
std::string command
Definition bambu_networking.hpp:183
std::string dev_id
Definition IPrinterAgent.hpp:39
std::string id
Unique identifier for the agent, e.g. "orca", "bbl".
Definition IPrinterAgent.hpp:31
std::string username
Definition IPrinterAgent.hpp:42
std::string ca_file
Definition IPrinterAgent.hpp:45
std::string description
Brief description of the agent's capabilities, e.g. "Orca printer agent".
Definition IPrinterAgent.hpp:34
std::string host
Definition IPrinterAgent.hpp:40
std::string preset_name
Definition bambu_networking.hpp:293

References Slic3r::PrintParams::ams_mapping, Slic3r::PrintParams::ams_mapping2, Slic3r::PrintParams::ams_mapping_info, Slic3r::PrintParams::auto_bed_leveling, Slic3r::PrintParams::auto_flow_cali, Slic3r::PrintParams::auto_offset_cali, Slic3r::IPrinterAgent::bind(), bind_detect(), Slic3r::detectResult::bind_state, Slic3r::PrinterConnectionParams::ca_file, Slic3r::IPrinterAgent::check_cert(), Slic3r::detectResult::command, Slic3r::IPrinterAgent::command_ams_calibrate(), Slic3r::IPrinterAgent::command_ams_refresh_rfid(), Slic3r::IPrinterAgent::command_ams_select_tray(), Slic3r::IPrinterAgent::command_auto_leveling(), Slic3r::IPrinterAgent::command_axis_control(), Slic3r::IPrinterAgent::command_go_home(), Slic3r::IPrinterAgent::command_set_bed(), Slic3r::IPrinterAgent::command_set_nozzle(), Slic3r::IPrinterAgent::command_start_camera(), Slic3r::IPrinterAgent::command_xyz_abs(), Slic3r::PrintParams::comments, Slic3r::PrintParams::config_filename, connect_printer(), Slic3r::detectResult::connect_type, Slic3r::PrintParams::connection_type, Slic3r::AgentInfo::description, Slic3r::detectResult::dev_id, Slic3r::PrinterConnectionParams::dev_id, Slic3r::PrintParams::dev_id, Slic3r::PrintParams::dev_ip, Slic3r::detectResult::dev_name, Slic3r::PrintParams::dev_name, Slic3r::IPrinterAgent::disconnect_printer(), Slic3r::PrintParams::dst_file, Slic3r::PrintParams::extra_options, Slic3r::IPrinterAgent::fetch_filament_info(), Slic3r::PrintParams::filename, Slic3r::PrintParams::ftp_file, Slic3r::PrintParams::ftp_file_md5, Slic3r::PrintParams::ftp_folder, get_agent_info(), Slic3r::IPrinterAgent::get_camera_stream_mode(), Slic3r::IPrinterAgent::get_camera_url(), Slic3r::IPrinterAgent::get_filament_sync_mode(), get_type(), get_user_selected_machine(), Slic3r::PrinterConnectionParams::host, Slic3r::http, Slic3r::http_snapshot, Slic3r::https, Slic3r::AgentInfo::id, Slic3r::IPrinterAgent::install_device_cert(), Slic3r::detectResult::model_id, Slic3r::module(), Slic3r::AgentInfo::name, Slic3r::PluginCapabilityInterface::name(), Slic3r::none, Slic3r::PrintParams::nozzle_mapping, Slic3r::PrintParams::nozzles_info, Slic3r::PrintParams::origin_model_id, Slic3r::PrintParams::origin_profile_id, Slic3r::PrinterConnectionParams::password, Slic3r::PrintParams::password, Slic3r::IPrinterAgent::ping_bind(), Slic3r::PrintParams::plate_index, Slic3r::PrinterConnectionParams::port, Slic3r::PrintParams::preset_name, Slic3r::PrintParams::print_type, Slic3r::PrintParams::project_name, Slic3r::pull, Slic3r::detectResult::result_msg, Slic3r::rtsp, send_message(), send_message_to_printer(), set_user_selected_machine(), start_discovery(), start_local_print(), start_local_print_with_record(), start_print(), start_sdcard_print(), start_send_gcode_to_sdcard(), Slic3r::PrintParams::stl_design_id, Slic3r::subscription, Slic3r::PrintParams::task_bed_leveling, Slic3r::PrintParams::task_bed_type, Slic3r::PrintParams::task_ext_change_assist, Slic3r::PrintParams::task_flow_cali, Slic3r::PrintParams::task_layer_inspect, Slic3r::PrintParams::task_name, Slic3r::PrintParams::task_record_timelapse, Slic3r::PrintParams::task_use_ams, Slic3r::PrintParams::task_vibration_cali, Slic3r::PrintParams::try_emmc_print, Slic3r::IPrinterAgent::unbind(), Slic3r::PrinterConnectionParams::use_ssl, Slic3r::PrintParams::use_ssl_for_ftp, Slic3r::PrintParams::use_ssl_for_mqtt, Slic3r::PrinterConnectionParams::username, Slic3r::PrintParams::username, Slic3r::AgentInfo::version, and Slic3r::detectResult::version.

Referenced by Slic3r::bind_python_api().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ request_bind_ticket()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::request_bind_ticket ( std::string * ticket)
inlineoverridevirtual

Request a one-time bind ticket from the server.

Reimplemented from Slic3r::IPrinterAgent.

296 {
297 try {
298 ::Slic3r::PluginCapabilityInterface::RefCounter _orca_ref_counter(*this);
299 ::Slic3r::PythonGILState gil;
300 if (!gil)
301 throw std::runtime_error("Python interpreter is shutting down");
303 pybind11::function override =
304 pybind11::get_override(static_cast<const PrinterAgentPluginCapability*>(this), "request_bind_ticket");
305 if (!override)
307 try {
308 pybind11::tuple result = override().cast<pybind11::tuple>();
309 if (ticket)
310 *ticket = result[1].cast<std::string>();
311 return result[0].cast<int>();
312 } catch (pybind11::error_already_set& err) {
314 throw;
315 }
318 }
#define ORCA_PY_AGENT_CATCH(name)
Definition PrinterAgentPluginCapabilityTrampoline.hpp:34
int request_bind_ticket(std::string *ticket) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:295
auto cast(const BoundingBoxBase< Tin > &b)
Definition BoundingBox.hpp:299

References Slic3r::cast(), Slic3r::log_python_exception_keep(), ORCA_PY_AGENT_CATCH, ORCA_PY_AUDIT_SCOPE, Slic3r::printer_agent_failure(), and request_bind_ticket().

Referenced by request_bind_ticket().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run_shutdown_disconnect()

void Slic3r::PyPrinterAgentPluginCapabilityTrampoline::run_shutdown_disconnect ( PyPrinterAgentPluginCapabilityTrampoline * agent,
ShutdownDisconnect & call )
inlinestaticprivate
371 {
372 ::Slic3r::PythonGILState gil;
373 int expected = ShutdownDisconnect::Pending;
374 if (!gil || !call.state.compare_exchange_strong(expected, ShutdownDisconnect::Started)) {
375 // Abandoned before it started: the agent may already be gone, so it is not touched.
376 call.result.set_value(printer_agent_failure<int>());
377 return;
378 }
379 // The plugin may be force-unloaded while the call runs past its deadline. This reference keeps
380 // the Python object, and with it the agent, alive until the call has fully unwound; it is
381 // released before the GIL.
382 const pybind11::object self = pybind11::cast(static_cast<PrinterAgentPluginCapability*>(agent),
383 pybind11::return_value_policy::reference);
384 call.result.set_value(agent->python_disconnect_printer());
385 }

References Slic3r::PyPrinterAgentPluginCapabilityTrampoline::ShutdownDisconnect::Pending, Slic3r::printer_agent_failure(), python_disconnect_printer(), Slic3r::PyPrinterAgentPluginCapabilityTrampoline::ShutdownDisconnect::result, Slic3r::PyPrinterAgentPluginCapabilityTrampoline::ShutdownDisconnect::Started, and Slic3r::PyPrinterAgentPluginCapabilityTrampoline::ShutdownDisconnect::state.

Referenced by disconnect_printer_at_shutdown().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_message()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::send_message ( std::string dev_id,
std::string json_str,
int qos,
int flag )
inlineoverridevirtual

Publish a JSON command to a printer through cloud relay.

Implements Slic3r::PrinterAgentPluginCapability.

85 {
86 ORCA_PY_AGENT_OVERRIDE(int, send_message, dev_id, json_str, qos, flag);
87 }
int send_message(std::string dev_id, std::string json_str, int qos, int flag) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:84

References ORCA_PY_AGENT_OVERRIDE, and send_message().

Referenced by send_message().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_message_to_printer()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::send_message_to_printer ( std::string dev_id,
std::string json_str,
int qos,
int flag )
inlineoverridevirtual

Send a JSON command to a LAN printer (bypassing cloud).

Implements Slic3r::PrinterAgentPluginCapability.

90 {
91 ORCA_PY_AGENT_OVERRIDE(int, send_message_to_printer, dev_id, json_str, qos, flag);
92 }
int send_message_to_printer(std::string dev_id, std::string json_str, int qos, int flag) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:89

References ORCA_PY_AGENT_OVERRIDE, and send_message_to_printer().

Referenced by send_message_to_printer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_audit_plugin_key()

void Slic3r::PluginCapabilityInterface::set_audit_plugin_key ( std::string key)
inlineinherited
210{ m_audit_plugin_key = std::move(key); }

References m_audit_plugin_key.

◆ set_cloud_agent()

void Slic3r::PrinterAgentPluginCapability::set_cloud_agent ( std::shared_ptr< ICloudServiceAgent > cloud)
inlinefinaloverridevirtualinherited

Set the cloud agent used for token access. Must be called before any cloud-relay operations.

Implements Slic3r::IPrinterAgent.

30{ (void) cloud; }

◆ set_config_ui_available()

void Slic3r::PluginCapabilityInterface::set_config_ui_available ( bool available)
inlineinherited
206{ m_config_ui_available = available; }

References m_config_ui_available.

◆ set_enabled()

void Slic3r::PluginCapabilityInterface::set_enabled ( bool enabled)
inlineinherited
200{ m_enabled.store(enabled, std::memory_order_release); }

References m_enabled.

◆ set_on_local_connect_fn()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::set_on_local_connect_fn ( OnLocalConnectedFn fn)
inlineoverridevirtual

Register LAN connection status callback.

Implements Slic3r::PrinterAgentPluginCapability.

276 {
278 }
int set_on_local_connect_fn(OnLocalConnectedFn fn) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:275

References ORCA_PY_AGENT_OVERRIDE, and set_on_local_connect_fn().

Referenced by set_on_local_connect_fn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_on_local_message_fn()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::set_on_local_message_fn ( OnMessageFn fn)
inlineoverridevirtual

Register LAN message callback.

Implements Slic3r::PrinterAgentPluginCapability.

281 {
283 }
int set_on_local_message_fn(OnMessageFn fn) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:280

References ORCA_PY_AGENT_OVERRIDE, and set_on_local_message_fn().

Referenced by set_on_local_message_fn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_on_message_fn()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::set_on_message_fn ( OnMessageFn fn)
inlineoverridevirtual

Register cloud device message callback.

Implements Slic3r::PrinterAgentPluginCapability.

266 {
268 }
int set_on_message_fn(OnMessageFn fn) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:265

References ORCA_PY_AGENT_OVERRIDE, and set_on_message_fn().

Referenced by set_on_message_fn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_on_printer_connected_fn()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::set_on_printer_connected_fn ( OnPrinterConnectedFn fn)
inlineoverridevirtual

Register printer MQTT connection callback.

Implements Slic3r::PrinterAgentPluginCapability.

256 {
258 }
int set_on_printer_connected_fn(OnPrinterConnectedFn fn) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:255

References ORCA_PY_AGENT_OVERRIDE, and set_on_printer_connected_fn().

Referenced by set_on_printer_connected_fn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_on_ssdp_msg_fn()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::set_on_ssdp_msg_fn ( OnMsgArrivedFn fn)
inlineoverridevirtual

Register SSDP discovery callback.

Implements Slic3r::PrinterAgentPluginCapability.

251 {
253 }
int set_on_ssdp_msg_fn(OnMsgArrivedFn fn) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:250

References ORCA_PY_AGENT_OVERRIDE, and set_on_ssdp_msg_fn().

Referenced by set_on_ssdp_msg_fn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_on_subscribe_failure_fn()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::set_on_subscribe_failure_fn ( GetSubscribeFailureFn fn)
inlineoverridevirtual

Register subscription failure callback.

Implements Slic3r::PrinterAgentPluginCapability.

261 {
263 }
int set_on_subscribe_failure_fn(GetSubscribeFailureFn fn) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:260

References ORCA_PY_AGENT_OVERRIDE, and set_on_subscribe_failure_fn().

Referenced by set_on_subscribe_failure_fn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_on_user_message_fn()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::set_on_user_message_fn ( OnMessageFn fn)
inlineoverridevirtual

Register user-scoped message callback.

Implements Slic3r::PrinterAgentPluginCapability.

271 {
273 }
int set_on_user_message_fn(OnMessageFn fn) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:270

References ORCA_PY_AGENT_OVERRIDE, and set_on_user_message_fn().

Referenced by set_on_user_message_fn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_queue_on_main_fn()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::set_queue_on_main_fn ( QueueOnMainFn fn)
inlineoverridevirtual

Provide main thread queue callback.

Implements Slic3r::PrinterAgentPluginCapability.

286 {
288 }
int set_queue_on_main_fn(QueueOnMainFn fn) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:285

References ORCA_PY_AGENT_OVERRIDE, and set_queue_on_main_fn().

Referenced by set_queue_on_main_fn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_resolved_identity()

void Slic3r::PluginCapabilityInterface::set_resolved_identity ( std::string name,
PluginCapabilityType type )
inlineinherited
191 {
192 m_name = std::move(name);
193 m_type = type;
194 }
PluginCapabilityType type() const
Definition PythonPluginInterface.hpp:188

References m_name, m_type, name(), and type().

Here is the call graph for this function:

◆ set_server_callback()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::set_server_callback ( OnServerErrFn fn)
inlineoverridevirtual

Register callback for fatal HTTP errors.

Implements Slic3r::PrinterAgentPluginCapability.

246 {
248 }
int set_server_callback(OnServerErrFn fn) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:245

References ORCA_PY_AGENT_OVERRIDE, and set_server_callback().

Referenced by set_server_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_user_selected_machine()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::set_user_selected_machine ( std::string dev_id)
inlineoverridevirtual

Update the selected cloud machine preference.

Implements Slic3r::PrinterAgentPluginCapability.

166 {
168 }
int set_user_selected_machine(std::string dev_id) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:165

References ORCA_PY_AGENT_OVERRIDE, and set_user_selected_machine().

Referenced by set_user_selected_machine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_discovery()

bool Slic3r::PyPrinterAgentPluginCapabilityTrampoline::start_discovery ( bool start,
bool sending )
inlineoverridevirtual

Start or stop SSDP discovery.

Implements Slic3r::PrinterAgentPluginCapability.

150 {
151 ORCA_PY_AGENT_OVERRIDE(bool, start_discovery, start, sending);
152 }
bool start_discovery(bool start, bool sending) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:149

References ORCA_PY_AGENT_OVERRIDE, and start_discovery().

Referenced by start_discovery().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_local_print()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::start_local_print ( PrintParams params,
OnUpdateStatusFn update_fn,
WasCancelledFn cancel_fn )
inlineoverridevirtual

Start a LAN-only print.

Implements Slic3r::PrinterAgentPluginCapability.

176 {
177 ORCA_PY_AGENT_OVERRIDE(int, start_local_print, params, update_fn, cancel_fn);
178 }
int start_local_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:175

References ORCA_PY_AGENT_OVERRIDE, and start_local_print().

Referenced by start_local_print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_local_print_with_record()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::start_local_print_with_record ( PrintParams params,
OnUpdateStatusFn update_fn,
WasCancelledFn cancel_fn,
OnWaitFn wait_fn )
inlineoverridevirtual

Start a local print with cloud record.

Implements Slic3r::PrinterAgentPluginCapability.

231 {
232 ORCA_PY_AGENT_OVERRIDE(int, start_local_print_with_record, params, update_fn, cancel_fn, wait_fn);
233 }
int start_local_print_with_record(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:230

References ORCA_PY_AGENT_OVERRIDE, and start_local_print_with_record().

Referenced by start_local_print_with_record().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_print()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::start_print ( PrintParams params,
OnUpdateStatusFn update_fn,
WasCancelledFn cancel_fn,
OnWaitFn wait_fn )
inlineoverridevirtual

Start a fully managed cloud print.

Implements Slic3r::PrinterAgentPluginCapability.

226 {
227 ORCA_PY_AGENT_OVERRIDE(int, start_print, params, update_fn, cancel_fn, wait_fn);
228 }
int start_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:225

References ORCA_PY_AGENT_OVERRIDE, and start_print().

Referenced by start_print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_sdcard_print()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::start_sdcard_print ( PrintParams params,
OnUpdateStatusFn update_fn,
WasCancelledFn cancel_fn )
inlineoverridevirtual

Start a print from printer's SD card.

Implements Slic3r::PrinterAgentPluginCapability.

236 {
237 ORCA_PY_AGENT_OVERRIDE(int, start_sdcard_print, params, update_fn, cancel_fn);
238 }
int start_sdcard_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:235

References ORCA_PY_AGENT_OVERRIDE, and start_sdcard_print().

Referenced by start_sdcard_print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_send_gcode_to_sdcard()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::start_send_gcode_to_sdcard ( PrintParams params,
OnUpdateStatusFn update_fn,
WasCancelledFn cancel_fn,
OnWaitFn wait_fn )
inlineoverridevirtual

Upload gcode to printer's SD card without starting.

Implements Slic3r::PrinterAgentPluginCapability.

171 {
172 ORCA_PY_AGENT_OVERRIDE(int, start_send_gcode_to_sdcard, params, update_fn, cancel_fn, wait_fn);
173 }
int start_send_gcode_to_sdcard(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:170

References ORCA_PY_AGENT_OVERRIDE, and start_send_gcode_to_sdcard().

Referenced by start_send_gcode_to_sdcard().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_subscribe()

virtual int Slic3r::IPrinterAgent::start_subscribe ( std::string module)
inlinevirtualinherited

Subscribe to a logical module (for example app- or tunnel-scoped streams).

Reimplemented in Slic3r::BBLPrinterAgent.

343{ (void) module; return BAMBU_NETWORK_SUCCESS; }
FileTransferModule & module()
Definition FileTransferUtils.hpp:248

References BAMBU_NETWORK_SUCCESS, and Slic3r::module().

Here is the call graph for this function:

◆ stop_subscribe()

virtual int Slic3r::IPrinterAgent::stop_subscribe ( std::string module)
inlinevirtualinherited

Stop listening to a formerly subscribed module.

Reimplemented in Slic3r::BBLPrinterAgent.

348{ (void) module; return BAMBU_NETWORK_SUCCESS; }

References BAMBU_NETWORK_SUCCESS, and Slic3r::module().

Here is the call graph for this function:

◆ to_orca_filament_id()

virtual std::string Slic3r::IPrinterAgent::to_orca_filament_id ( const std::string & printer_filament_id) const
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.

471{ return printer_filament_id; }

◆ type()

PluginCapabilityType Slic3r::PluginCapabilityInterface::type ( ) const
inlineinherited
188{ return m_type; }

References m_type.

Referenced by set_resolved_identity().

Here is the caller graph for this function:

◆ unbind()

int Slic3r::PyPrinterAgentPluginCapabilityTrampoline::unbind ( std::string dev_id)
inlineoverridevirtual

Remove the association between account and printer.

Reimplemented from Slic3r::IPrinterAgent.

221 {
222 ORCA_PY_AGENT_OVERRIDE(int, unbind, dev_id);
223 }
int unbind(std::string dev_id) override
Definition PrinterAgentPluginCapabilityTrampoline.hpp:220

References ORCA_PY_AGENT_OVERRIDE, and unbind().

Referenced by unbind().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_audit_plugin_key

std::string Slic3r::PluginCapabilityInterface::m_audit_plugin_key
privateinherited

◆ m_config_ui_available

bool Slic3r::PluginCapabilityInterface::m_config_ui_available = false
privateinherited

◆ m_enabled

std::atomic<bool> Slic3r::PluginCapabilityInterface::m_enabled {true}
privateinherited
220{true};

Referenced by is_enabled(), and set_enabled().

◆ m_name

std::string Slic3r::PluginCapabilityInterface::m_name
privateinherited

◆ m_refs

std::atomic<int> Slic3r::PluginCapabilityInterface::m_refs {0}
mutableprivateinherited
224{0};

Referenced by decrement(), increment(), and ref_count().

◆ m_shutdown_disconnect

std::shared_ptr<ShutdownDisconnect> Slic3r::PyPrinterAgentPluginCapabilityTrampoline::m_shutdown_disconnect
private

◆ m_shutdown_disconnect_mutex

std::mutex Slic3r::PyPrinterAgentPluginCapabilityTrampoline::m_shutdown_disconnect_mutex
private

◆ m_type

PluginCapabilityType Slic3r::PluginCapabilityInterface::m_type = PluginCapabilityType::Unknown
privateinherited

The documentation for this class was generated from the following file: