OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
ElegooLink.cpp File Reference
#include "ElegooLink.hpp"
#include <algorithm>
#include "libslic3r/Utils.hpp"
#include <boost/optional/optional.hpp>
#include <cstddef>
#include <ios>
#include <boost/uuid/random_generator.hpp>
#include <chrono>
#include <cctype>
#include "libslic3r/PrintConfig.hpp"
#include <iostream>
#include <map>
#include <mutex>
#include <regex>
#include <ostream>
#include <sstream>
#include <exception>
#include <boost/format.hpp>
#include <boost/log/trivial.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/asio.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/nowide/convert.hpp>
#include <boost/nowide/fstream.hpp>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <curl/curl.h>
#include <string>
#include <utility>
#include <thread>
#include <vector>
#include <wx/progdlg.h>
#include "OctoPrint.hpp"
#include "PrintHost.hpp"
#include "WebSocketClient.hpp"
#include "slic3r/GUI/GUI.hpp"
#include "slic3r/GUI/I18N.hpp"
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/format.hpp"
#include "Http.hpp"
#include "libslic3r/AppConfig.hpp"
#include "Bonjour.hpp"
#include "slic3r/GUI/BonjourDialog.hpp"
#include <boost/asio/ip/address.hpp>
Include dependency graph for ElegooLink.cpp:

Go to the source code of this file.

Namespaces

namespace  Slic3r
 |/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966 |/ |/ PrusaSlicer is released under the terms of the AGPLv3 or higher |/

Macros

#define MAX_UPLOAD_PACKAGE_LENGTH   1048576

Enumerations

enum  Slic3r::ElegooLinkCommand { Slic3r::ELEGOO_GET_STATUS = 0 , Slic3r::ELEGOO_GET_PROPERTIES = 1 , Slic3r::ELEGOO_START_PRINT = 128 }
enum  Slic3r::ElegooLinkStartPrintAck {
  Slic3r::SDCP_PRINT_CTRL_ACK_OK = 0 , Slic3r::SDCP_PRINT_CTRL_ACK_BUSY = 1 , Slic3r::SDCP_PRINT_CTRL_ACK_NOT_FOUND = 2 , Slic3r::SDCP_PRINT_CTRL_ACK_MD5_FAILED = 3 ,
  Slic3r::SDCP_PRINT_CTRL_ACK_FILEIO_FAILED = 4 , Slic3r::SDCP_PRINT_CTRL_ACK_INVALID_RESOLUTION = 5 , Slic3r::SDCP_PRINT_CTRL_ACK_UNKNOW_FORMAT = 6 , Slic3r::SDCP_PRINT_CTRL_ACK_UNKNOW_MODEL = 7
}
enum class  Slic3r::anonymous_namespace{ElegooLink.cpp}::ElegooPrinterType { Slic3r::anonymous_namespace{ElegooLink.cpp}::Other , Slic3r::anonymous_namespace{ElegooLink.cpp}::CC , Slic3r::anonymous_namespace{ElegooLink.cpp}::CC2 }

Functions

std::string Slic3r::anonymous_namespace{ElegooLink.cpp}::sn_cache_key (const std::string &host_ip, const std::string &token)
void Slic3r::anonymous_namespace{ElegooLink.cpp}::cache_sn (const std::string &host_ip, const std::string &token, const std::string &sn)
std::string Slic3r::anonymous_namespace{ElegooLink.cpp}::lookup_sn (const std::string &host_ip, const std::string &token)
std::string Slic3r::anonymous_namespace{ElegooLink.cpp}::load_sn_from_config (const std::string &host_ip)
void Slic3r::anonymous_namespace{ElegooLink.cpp}::persist_sn (const std::string &host_ip, const std::string &token, const std::string &sn)
ElegooPrinterType Slic3r::anonymous_namespace{ElegooLink.cpp}::classify_printer_model (const std::string &printer_model)
std::string Slic3r::anonymous_namespace{ElegooLink.cpp}::get_cc2_token (const std::string &apikey)
bool Slic3r::anonymous_namespace{ElegooLink.cpp}::parse_cc2_response (const std::string &body, std::string &error_message, std::string *serial_number=nullptr)
std::string Slic3r::anonymous_namespace{ElegooLink.cpp}::lookup_cc2_serial_impl (const std::string &printer_model, const std::string &print_host, const std::string &apikey)
std::string Slic3r::anonymous_namespace{ElegooLink.cpp}::lookup_cc2_serial (DynamicPrintConfig *config)
std::string Slic3r::anonymous_namespace{ElegooLink.cpp}::escape_string (const std::string &unescaped)
std::string Slic3r::anonymous_namespace{ElegooLink.cpp}::escape_path_by_element (const boost::filesystem::path &path)
std::string Slic3r::anonymous_namespace{ElegooLink.cpp}::path_to_utf8 (const boost::filesystem::path &path)
std::string Slic3r::anonymous_namespace{ElegooLink.cpp}::filename_to_utf8 (const boost::filesystem::path &path)

Variables

constexpr const char * Slic3r::anonymous_namespace{ElegooLink.cpp}::ELEGOO_CC2_DEFAULT_TOKEN = "123456"
constexpr const char * Slic3r::anonymous_namespace{ElegooLink.cpp}::ELEGOO_DEV_SN_SECTION = "dev_sn"
static std::mutex Slic3r::anonymous_namespace{ElegooLink.cpp}::s_sn_cache_mutex
static std::map< std::string, std::string > Slic3r::anonymous_namespace{ElegooLink.cpp}::s_sn_cache

Macro Definition Documentation

◆ MAX_UPLOAD_PACKAGE_LENGTH

#define MAX_UPLOAD_PACKAGE_LENGTH   1048576