NEW: update bambu network header and version

Change-Id: I10c40cf579dd7d400c14103d2ac6f0ac338edf6e
This commit is contained in:
Stone Li 2023-09-12 10:21:52 +08:00 committed by Lane.Wei
parent 0a064e980b
commit c09252ce11
3 changed files with 113 additions and 101 deletions

View File

@ -51,19 +51,21 @@ typedef int (*func_unbind)(void *agent, std::string dev_id);
typedef std::string(*func_get_bambulab_host)(void* agent);
typedef std::string(*func_get_user_selected_machine)(void* agent);
typedef int (*func_set_user_selected_machine)(void* agent, std::string dev_id);
typedef int (*func_start_print)(void *agent, PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn);
typedef int (*func_start_local_print_with_record)(void *agent, PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn);
typedef int (*func_start_send_gcode_to_sdcard)(void *agent, PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn);
typedef int (*func_start_print)(void* agent, PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn);
typedef int (*func_start_local_print_with_record)(void* agent, PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn);
typedef int (*func_start_send_gcode_to_sdcard)(void* agent, PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn);
typedef int (*func_start_local_print)(void* agent, PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn);
typedef int (*func_get_user_presets)(void* agent, std::map<std::string, std::map<std::string, std::string>>* user_presets);
typedef std::string(*func_request_setting_id)(void* agent, std::string name, std::map<std::string, std::string>* values_map, unsigned int* http_code);
typedef int (*func_put_setting)(void* agent, std::string setting_id, std::string name, std::map<std::string, std::string>* values_map, unsigned int* http_code);
typedef int (*func_get_setting_list)(void* agent, std::string bundle_version, ProgressFn pro_fn, WasCancelledFn cancel_fn);
typedef int (*func_get_setting_list2)(void* agent, std::string bundle_version, CheckFn chk_fn, ProgressFn pro_fn, WasCancelledFn cancel_fn);
typedef int (*func_delete_setting)(void* agent, std::string setting_id);
typedef std::string(*func_get_studio_info_url)(void* agent);
typedef int (*func_set_extra_http_header)(void* agent, std::map<std::string, std::string> extra_headers);
typedef int (*func_get_my_message)(void* agent, int type, int after, int limit, unsigned int* http_code, std::string* http_body);
typedef int (*func_check_user_task_report)(void* agent, int* task_id, bool* printable);
typedef int (*func_check_user_report)(void* agent, int* task_id, bool* printable, std::string* report_url);
typedef int (*func_get_user_print_info)(void* agent, unsigned int* http_code, std::string* http_body);
typedef int (*func_get_printer_firmware)(void* agent, std::string dev_id, unsigned* http_code, std::string* http_body);
typedef int (*func_get_task_plate_index)(void* agent, std::string task_id, int* plate_index);
@ -152,19 +154,21 @@ public:
std::string get_bambulab_host();
std::string get_user_selected_machine();
int set_user_selected_machine(std::string dev_id);
int start_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn);
int start_local_print_with_record(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn);
int start_send_gcode_to_sdcard(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn);
int start_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn);
int start_local_print_with_record(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn);
int start_send_gcode_to_sdcard(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn);
int start_local_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn);
int get_user_presets(std::map<std::string, std::map<std::string, std::string>>* user_presets);
std::string request_setting_id(std::string name, std::map<std::string, std::string>* values_map, unsigned int* http_code);
int put_setting(std::string setting_id, std::string name, std::map<std::string, std::string>* values_map, unsigned int* http_code);
int get_setting_list(std::string bundle_version, ProgressFn pro_fn = nullptr, WasCancelledFn cancel_fn = nullptr);
int get_setting_list2(std::string bundle_version, CheckFn chk_fn, ProgressFn pro_fn = nullptr, WasCancelledFn cancel_fn = nullptr);
int delete_setting(std::string setting_id);
std::string get_studio_info_url();
int set_extra_http_header(std::map<std::string, std::string> extra_headers);
int get_my_message(int type, int after, int limit, unsigned int* http_code, std::string* http_body);
int check_user_task_report(int* task_id, bool* printable);
int check_user_report(int* task_id, bool* printable, std::string* report_url);
int get_user_print_info(unsigned int* http_code, std::string* http_body);
int get_printer_firmware(std::string dev_id, unsigned* http_code, std::string* http_body);
int get_task_plate_index(std::string task_id, int* plate_index);
@ -249,11 +253,13 @@ private:
static func_request_setting_id request_setting_id_ptr;
static func_put_setting put_setting_ptr;
static func_get_setting_list get_setting_list_ptr;
static func_get_setting_list2 get_setting_list2_ptr;
static func_delete_setting delete_setting_ptr;
static func_get_studio_info_url get_studio_info_url_ptr;
static func_set_extra_http_header set_extra_http_header_ptr;
static func_get_my_message get_my_message_ptr;
static func_check_user_task_report check_user_task_report_ptr;
static func_check_user_report check_user_report_ptr;
static func_get_user_print_info get_user_print_info_ptr;
static func_get_printer_firmware get_printer_firmware_ptr;
static func_get_task_plate_index get_task_plate_index_ptr;

View File

@ -27,6 +27,11 @@ namespace BBL {
#define BAMBU_NETWORK_ERR_CANCELED -18
#define BAMBU_NETWORK_ERR_INVALID_RESULT -19
#define BAMBU_NETWORK_ERR_FTP_UPLOAD_FAILED -20
#define BAMBU_NETWORK_ERR_GET_RATING_ID_FAILED -21
#define BAMBU_NETWORK_ERR_OPEN_FILE_FAILED -22
#define BAMBU_NETWORK_ERR_PARSE_CONFIG_FAILED -23
#define BAMBU_NETWORK_ERR_NO_CORRESPONDING_BUCKET -24
#define BAMBU_NETWORK_ERR_GET_INSTANCE_ID_FAILED -25
//bind error
#define BAMBU_NETWORK_ERR_BIND_CREATE_SOCKET_FAILED -1010 //failed to create socket
@ -125,6 +130,7 @@ typedef std::function<void(int progress)> ProgressFn;
typedef std::function<void(int retcode, std::string info)> LoginFn;
typedef std::function<void(int result, std::string info)> ResultFn;
typedef std::function<bool()> CancelFn;
typedef std::function<bool(std::map<std::string, std::string> info)> CheckFn;
enum SendingPrintJobStage {
PrintingStageCreate = 0,

View File

@ -12,4 +12,4 @@ set(BBL_INTERNAL_TESTING "1")
endif()
# The build_version should start from 50 in master branch
set(SLIC3R_VERSION "01.07.04.54")
set(SLIC3R_VERSION "01.07.06.80")