#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/Utils/Flashforge.hpp>
Public Types | |
| typedef Http::ProgressFn | ProgressFn |
| typedef std::function< void(wxString)> | ErrorFn |
| typedef std::function< void(wxString, wxString)> | InfoFn |
Public Member Functions | |
| Flashforge (DynamicPrintConfig *config) | |
| ~Flashforge () override=default | |
| const char * | get_name () const override |
| bool | test (wxString &curl_msg) const override |
| wxString | get_test_ok_msg () const override |
| wxString | get_test_failed_msg (wxString &msg) const override |
| bool | upload (PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override |
| bool | has_auto_discovery () const override |
| bool | can_test () const override |
| PrintHostPostUploadActions | get_post_upload_actions () const override |
| std::string | get_host () const override |
| bool | fetch_material_slots (std::vector< FlashforgeMaterialSlot > &slots, bool *supports_material_station, wxString &msg) const |
| virtual bool | supports_multiple_printers () const |
| virtual std::string | get_sn () const |
| virtual bool | get_groups (wxArrayString &) const |
| virtual bool | get_printers (wxArrayString &) const |
| virtual bool | get_storage (wxArrayString &, wxArrayString &) const |
| virtual bool | is_cloud () const |
| virtual bool | is_logged_in () const |
| virtual void | log_out () const |
| virtual bool | get_login_url (wxString &auth_url) const |
Static Public Member Functions | |
| static bool | parse_material_slots (const std::string &body, std::vector< FlashforgeMaterialSlot > &slots, bool *supports_material_station) |
| static bool | discover_printers (std::vector< FlashforgeDiscoveredPrinter > &printers, wxString &msg, int timeout_ms=10000, int idle_timeout_ms=1500, int max_retries=3) |
| static PrintHost * | get_print_host (DynamicPrintConfig *config) |
| static std::string | get_print_host_webui (DynamicPrintConfig *config) |
| static int | get_err_code_from_body (const std::string &body) |
Protected Member Functions | |
| virtual wxString | format_error (const std::string &body, const std::string &error, unsigned status) const |
Static Protected Member Functions | |
| static wxString | timed_out_message () |
Private Member Functions | |
| bool | upload_local_api (PrintHostUpload upload_data, ProgressFn progress_fn, ErrorFn error_fn) const |
| bool | test_local_api (wxString &msg) const |
| bool | request_local_api_json (const std::string &path, const std::string &body, std::string &response_body, wxString &error_msg) const |
| std::string | make_http_url (const std::string &path) const |
| std::string | extract_host_name () const |
| bool | connect (wxString &msg) const |
| bool | start_print (wxString &msg, const std::string &filename) const |
Private Attributes | |
| std::string | m_host |
| std::string | m_serial_number |
| std::string | m_check_code |
| std::string | m_console_port |
| const int | m_bufferSize |
| GCodeFlavor | m_gcFlavor |
| Slic3r::Utils::SerialMessage | controlCommand = {"~M601 S1\r\n",Slic3r::Utils::Command} |
| Slic3r::Utils::SerialMessage | connectKlipperCommand = {"~M640\r\n",Slic3r::Utils::Command} |
| Slic3r::Utils::SerialMessage | connectLegacyCommand = {"~M650\r\n",Slic3r::Utils::Command} |
| Slic3r::Utils::SerialMessage | nozzlePosCommand = {"~M114\r\n", Slic3r::Utils::Command} |
| Slic3r::Utils::SerialMessage | deviceInfoCommand = {"~M115\r\n", Slic3r::Utils::Command} |
| Slic3r::Utils::SerialMessage | statusCommand = {"~M119\r\n",Slic3r::Utils::Command} |
| Slic3r::Utils::SerialMessage | tempStatusCommand = {"~M105\r\n", Slic3r::Utils::Command} |
| Slic3r::Utils::SerialMessage | printStatusCommand = {"~M27\r\n", Slic3r::Utils::Command} |
| Slic3r::Utils::SerialMessage | saveFileCommand = {"~M29\r\n",Slic3r::Utils::Command} |
|
inherited |
|
inherited |
|
inherited |
|
explicit |
References Slic3r::gcfMarlinLegacy, Slic3r::gcode_flavor(), m_bufferSize, m_check_code, m_console_port, m_gcFlavor, m_host, m_serial_number, and Slic3r::ConfigBase::option().
|
overridedefault |
|
inlineoverridevirtual |
Implements Slic3r::PrintHost.
|
private |
References connectKlipperCommand, connectLegacyCommand, controlCommand, deviceInfoCommand, Slic3r::gcfKlipper, m_console_port, m_gcFlavor, m_host, and statusCommand.
Referenced by upload().
|
static |
References _, count, Slic3r::FlashforgeDiscoveredPrinter::ip_address, and L.
Referenced by Slic3r::GUI::PhysicalPrinterDialog::build_printhost_settings().
|
private |
References m_host.
Referenced by make_http_url().
| bool Slic3r::Flashforge::fetch_material_slots | ( | std::vector< FlashforgeMaterialSlot > & | slots, |
| bool * | supports_material_station, | ||
| wxString & | msg ) const |
References _, L, m_check_code, m_serial_number, parse_material_slots(), and request_local_api_json().
|
protectedvirtualinherited |
References _L, and timed_out_message().
Referenced by Slic3r::Duet::connect(), Slic3r::UltiMaker::connect(), Slic3r::SimplyPrint::do_chunk_upload(), Slic3r::SimplyPrint::do_temp_upload(), Slic3r::ElegooLink::elegoo_cc2_test(), Slic3r::ElegooLink::elegoo_test(), Slic3r::PrusaLink::post_inner(), Slic3r::PrusaLink::put_inner(), Slic3r::Flashforge::request_local_api_json(), Slic3r::Duet::start_print(), Slic3r::Moonraker::start_print(), Slic3r::UltiMaker::start_print(), Slic3r::AstroBox::test(), Slic3r::CrealityPrint::test(), Slic3r::ESP3D::test(), Slic3r::FlashAir::test(), Slic3r::Moonraker::test(), Slic3r::Obico::test(), Slic3r::OctoPrint::test(), Slic3r::PrusaLink::test(), Slic3r::Repetier::test(), Slic3r::UltiMaker::test(), Slic3r::PrusaLink::test_with_method_check(), Slic3r::AstroBox::upload(), Slic3r::C3DPrinterOS::upload(), Slic3r::CrealityPrint::upload(), Slic3r::Duet::upload(), Slic3r::ESP3D::upload(), Slic3r::FlashAir::upload(), Slic3r::MKS::upload(), Slic3r::Moonraker::upload(), Slic3r::Obico::upload(), Slic3r::Repetier::upload(), Slic3r::UltiMaker::upload(), Slic3r::OctoPrint::upload_inner_with_host(), Slic3r::Flashforge::upload_local_api(), Slic3r::ElegooLink::uploadPart(), and Slic3r::ElegooLink::uploadPartCC2().
|
staticinherited |
Referenced by Slic3r::Duet::connect(), Slic3r::UltiMaker::connect(), Slic3r::Duet::upload(), Slic3r::MKS::upload(), and Slic3r::UltiMaker::upload().
|
inlinevirtualinherited |
Reimplemented in Slic3r::Repetier.
|
inlineoverridevirtual |
|
inlinevirtualinherited |
Reimplemented in Slic3r::Obico.
Referenced by Slic3r::GUI::PrinterCloudAuthDialog::PrinterCloudAuthDialog().
|
overridevirtual |
Implements Slic3r::PrintHost.
|
inlineoverridevirtual |
|
staticinherited |
References Slic3r::ht3DPrinterOS, Slic3r::htAstroBox, Slic3r::htCrealityPrint, Slic3r::htDuet, Slic3r::htElegooLink, Slic3r::htESP3D, Slic3r::htFlashAir, Slic3r::htFlashforge, Slic3r::htMKS, Slic3r::htMoonraker, Slic3r::htObico, Slic3r::htOctoPrint, Slic3r::htPrusaConnect, Slic3r::htPrusaLink, Slic3r::htRepetier, Slic3r::htSimplyPrint, Slic3r::htUltiMaker, Slic3r::ConfigBase::option(), and Slic3r::ptFFF.
Referenced by Slic3r::GUI::PhysicalPrinterDialog::build_printhost_settings(), Slic3r::GUI::anonymous_namespace{PrinterWebViewHandler.cpp}::ElegooPrinterWebViewHandler::handle_get_sn_request(), Slic3r::GUI::anonymous_namespace{PrinterWebViewHandler.cpp}::ElegooPrinterWebViewHandler::handle_upload_request(), Slic3r::GUI::PhysicalPrinterDialog::update_printers(), and Slic3r::GUI::PhysicalPrinterDialog::update_printhost_buttons().
|
staticinherited |
References Slic3r::ElegooLink::get_print_host_webui(), Slic3r::htElegooLink, Slic3r::htOctoPrint, Slic3r::DynamicConfig::opt_string(), Slic3r::ConfigBase::option(), and Slic3r::ConfigOptionSingle< T >::value.
Referenced by Slic3r::GUI::MainFrame::load_printer_url(), Slic3r::GUI::Plater::priv::on_tab_selection_changing(), and Slic3r::GUI::Sidebar::update_all_preset_comboboxes().
|
inlinevirtualinherited |
Reimplemented in Slic3r::Obico, and Slic3r::Repetier.
|
inlinevirtualinherited |
Get the serial number for connecting to the printer. For Elegoo CC2, the device details connection to the printer requires the serial number. Other print hosts do not need to implement this interface, and it returns an empty string by default.
Reimplemented in Slic3r::ElegooLink.
|
inlinevirtualinherited |
Reimplemented in Slic3r::Moonraker, Slic3r::PrusaConnect, and Slic3r::PrusaLink.
|
overridevirtual |
Implements Slic3r::PrintHost.
References _utf8, Slic3r::GUI::from_u8(), L, m_check_code, and m_serial_number.
|
overridevirtual |
|
inlineoverridevirtual |
Implements Slic3r::PrintHost.
|
inlinevirtualinherited |
Reimplemented in Slic3r::C3DPrinterOS, Slic3r::Obico, and Slic3r::SimplyPrint.
|
inlinevirtualinherited |
Reimplemented in Slic3r::C3DPrinterOS, and Slic3r::SimplyPrint.
|
inlinevirtualinherited |
Reimplemented in Slic3r::C3DPrinterOS, and Slic3r::SimplyPrint.
|
private |
References extract_host_name().
Referenced by request_local_api_json(), and upload_local_api().
|
static |
References Slic3r::FlashforgeMaterialSlot::has_filament, Slic3r::FlashforgeMaterialSlot::material_color, Slic3r::FlashforgeMaterialSlot::material_name, and Slic3r::FlashforgeMaterialSlot::slot_id.
Referenced by fetch_material_slots().
|
private |
References Slic3r::PrintHost::format_error(), Slic3r::http, make_http_url(), and Slic3r::Http::post().
Referenced by fetch_material_slots(), and test_local_api().
|
private |
References Slic3r::Utils::Command, m_console_port, and m_host.
Referenced by upload().
|
inlinevirtualinherited |
Reimplemented in Slic3r::Repetier.
|
overridevirtual |
Implements Slic3r::PrintHost.
References controlCommand, m_check_code, m_console_port, m_host, m_serial_number, and test_local_api().
|
private |
References m_check_code, m_serial_number, and request_local_api_json().
Referenced by test().
|
staticprotectedinherited |
References _L.
Referenced by format_error(), and Slic3r::CrealityPrint::start_print().
|
overridevirtual |
Implements Slic3r::PrintHost.
References Slic3r::Utils::Command, connect(), Slic3r::Utils::Data, m_bufferSize, m_check_code, m_console_port, m_host, m_serial_number, Slic3r::PrintHostUpload::post_action, saveFileCommand, Slic3r::PrintHostUpload::source_path, start_print(), Slic3r::StartPrint, upload_local_api(), and Slic3r::PrintHostUpload::upload_path.
|
private |
References Slic3r::PrintHostUpload::extended_info, Slic3r::PrintHost::format_error(), Slic3r::http, m_check_code, m_serial_number, make_http_url(), Slic3r::Http::post(), Slic3r::PrintHostUpload::post_action, Slic3r::PrintHostUpload::source_path, Slic3r::StartPrint, Slic3r::PrintHostUpload::upload_path, and Slic3r::PrintHostUpload::use_3mf.
Referenced by upload().
|
private |
Referenced by connect().
|
private |
Referenced by connect().
|
private |
|
private |
Referenced by connect().
|
private |
Referenced by Flashforge(), and upload().
|
private |
Referenced by Flashforge(), fetch_material_slots(), get_test_failed_msg(), get_test_ok_msg(), test(), test_local_api(), upload(), and upload_local_api().
|
private |
Referenced by Flashforge(), connect(), start_print(), test(), and upload().
|
private |
Referenced by Flashforge(), and connect().
|
private |
Referenced by Flashforge(), connect(), extract_host_name(), get_host(), start_print(), test(), and upload().
|
private |
Referenced by Flashforge(), fetch_material_slots(), get_test_failed_msg(), get_test_ok_msg(), test(), test_local_api(), upload(), and upload_local_api().
|
private |
|
private |
|
private |
Referenced by upload().
|
private |
Referenced by connect().
|
private |