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

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/ProjectTask.hpp>

Collaboration diagram for Slic3r::BBLSubTask:

Public Types

enum  SubTaskStatus {
  TASK_CREATED = 0 , TASK_READY = 1 , TASK_RUNNING = 2 , TASK_PAUSE = 3 ,
  TASK_FAILED = 4 , TASK_FINISHED = 5 , TASK_UNKNOWN = 6
}

Public Member Functions

 BBLSubTask (BBLTask *task=nullptr)
 BBLSubTask (const BBLSubTask &obj)
int parse_content_json (std::string json_str)

Static Public Member Functions

static BBLSubTask::SubTaskStatus parse_status (std::string status)
static BBLSubTask::SubTaskStatus parse_user_service_task_status (int status)

Public Attributes

std::string task_id
std::string task_model_id
std::string task_project_id
std::string task_profile_id
std::string task_name
std::string task_file
boost::filesystem::path task_path
std::string task_gcode_in_3mf
std::string task_create_time
std::string task_thumbnail_url
std::string task_bed_type
bool task_bed_leveling
bool task_flow_cali
bool task_vibration_cali
bool task_layer_inspect {true}
bool task_record_timelapse
std::string task_weight
float task_weightF
BBLSliceInfo slice_info
std::string task_partplate_idx
SubTaskStatus task_status
std::string task_printer_dev_id
int task_progress
std::string printing_status
std::string task_url
std::string task_url_md5
BBLTask * parent_task_
std::string parent_id
int job_id
std::string origin_model_name
std::string origin_profile_name

Detailed Description

Member Enumeration Documentation

◆ SubTaskStatus

Enumerator
TASK_CREATED 
TASK_READY 
TASK_RUNNING 
TASK_PAUSE 
TASK_FAILED 
TASK_FINISHED 
TASK_UNKNOWN 
166 {
167 TASK_CREATED = 0,
168 TASK_READY = 1,
169 TASK_RUNNING = 2,
170 TASK_PAUSE = 3,
171 TASK_FAILED = 4,
172 TASK_FINISHED = 5,
173 TASK_UNKNOWN = 6
174 };
@ TASK_UNKNOWN
Definition ProjectTask.hpp:173
@ TASK_RUNNING
Definition ProjectTask.hpp:169
@ TASK_FINISHED
Definition ProjectTask.hpp:172
@ TASK_FAILED
Definition ProjectTask.hpp:171
@ TASK_READY
Definition ProjectTask.hpp:168
@ TASK_CREATED
Definition ProjectTask.hpp:167
@ TASK_PAUSE
Definition ProjectTask.hpp:170

Constructor & Destructor Documentation

◆ BBLSubTask() [1/2]

Slic3r::BBLSubTask::BBLSubTask ( BBLTask * task = nullptr)
59 {
60 parent_task_ = task;
61 if (task) {
62 parent_id = task->task_id;
63 task_project_id = task->task_project_id;
64 task_profile_id = task->task_profile_id;
65 }
66 task_progress = 0;
68 task_bed_type = "auto";
69 }
std::string task_bed_type
Definition ProjectTask.hpp:214
BBLTask * parent_task_
Definition ProjectTask.hpp:233
std::string task_profile_id
Definition ProjectTask.hpp:206
std::string task_project_id
Definition ProjectTask.hpp:205
bool task_record_timelapse
Definition ProjectTask.hpp:219
std::string parent_id
Definition ProjectTask.hpp:234
int task_progress
Definition ProjectTask.hpp:229

References parent_id, parent_task_, task_bed_type, Slic3r::BBLTask::task_id, task_profile_id, Slic3r::BBLTask::task_profile_id, task_progress, task_project_id, Slic3r::BBLTask::task_project_id, and task_record_timelapse.

Referenced by BBLSubTask().

Here is the caller graph for this function:

◆ BBLSubTask() [2/2]

Slic3r::BBLSubTask::BBLSubTask ( const BBLSubTask & obj)
inline
178 {
179 task_id = obj.task_id;
180 parent_id = obj.parent_id;
181 task_model_id = obj.task_model_id;
182 task_project_id = obj.task_project_id;
183 task_profile_id = obj.task_profile_id;
184 task_name = obj.task_name;
185 task_partplate_idx = obj.task_partplate_idx;
186 task_printer_dev_id = obj.task_printer_dev_id;
187 task_create_time = obj.task_create_time;
188 task_url = obj.task_url;
189 task_url_md5 = obj.task_url_md5;
190 task_gcode_in_3mf = obj.task_gcode_in_3mf;
191 task_record_timelapse = obj.task_record_timelapse;
192 task_bed_type = obj.task_bed_type;
193 task_bed_leveling = obj.task_bed_leveling;
194 task_flow_cali = obj.task_flow_cali;
195 task_vibration_cali = obj.task_vibration_cali;
196 task_layer_inspect = obj.task_layer_inspect;
197
198 job_id = obj.job_id;
199 origin_model_name = obj.origin_model_name;
200 origin_profile_name = obj.origin_profile_name;
201 }
std::string task_url
Definition ProjectTask.hpp:231
std::string origin_profile_name
Definition ProjectTask.hpp:238
std::string task_gcode_in_3mf
Definition ProjectTask.hpp:210
bool task_layer_inspect
Definition ProjectTask.hpp:218
std::string task_partplate_idx
Definition ProjectTask.hpp:225
std::string origin_model_name
Definition ProjectTask.hpp:237
bool task_vibration_cali
Definition ProjectTask.hpp:217
std::string task_url_md5
Definition ProjectTask.hpp:232
std::string task_model_id
Definition ProjectTask.hpp:204
std::string task_create_time
Definition ProjectTask.hpp:211
int job_id
Definition ProjectTask.hpp:236
std::string task_id
Definition ProjectTask.hpp:203
std::string task_printer_dev_id
Definition ProjectTask.hpp:228
std::string task_name
Definition ProjectTask.hpp:207
bool task_bed_leveling
Definition ProjectTask.hpp:215
bool task_flow_cali
Definition ProjectTask.hpp:216

References BBLSubTask(), job_id, origin_model_name, origin_profile_name, parent_id, task_bed_leveling, task_bed_type, task_create_time, task_flow_cali, task_gcode_in_3mf, task_id, task_layer_inspect, task_model_id, task_name, task_partplate_idx, task_printer_dev_id, task_profile_id, task_project_id, task_record_timelapse, task_url, task_url_md5, and task_vibration_cali.

Here is the call graph for this function:

Member Function Documentation

◆ parse_content_json()

int Slic3r::BBLSubTask::parse_content_json ( std::string json_str)
72 {
73 try {
74 json j = json::parse(json_str);
75
76 if (j.contains("info") && !j["info"].is_null()) {
77 if (j["info"].contains("name") && !j["info"]["name"].is_null())
78 task_name = j["info"]["name"].get<std::string>();
79 if (j["info"].contains("plate_idx") && !j["info"]["plate_idx"].is_null()) {
80 if (j["info"]["plate_idx"].is_number())
81 task_partplate_idx = std::to_string(j["info"]["plate_idx"].get<int>());
82 else
83 task_partplate_idx = j["info"]["plate_idx"].get<std::string>();
84 }
85 if (j["info"].contains("printer") && !j["info"]["printer"].is_null())
86 task_printer_dev_id = j["info"]["printer"].get<std::string>();
87 return 0;
88 }
89 }
90 catch (...) {
91 BOOST_LOG_TRIVIAL(trace) << "parse_content_json failed! json=" << json_str;
92 return -1;
93 }
94 BOOST_LOG_TRIVIAL(trace) << "parse_content_json failed! json=" << json_str;
95 return -1;
96 }
bool contains(const std::vector< T > &vector, const Point &point)
Definition Geometry.cpp:55
void trace(unsigned int level, const char *message)
Definition utils.cpp:247
nlohmann::json json
Definition AssembleList.cpp:42

References Slic3r::Geometry::contains(), task_name, task_partplate_idx, task_printer_dev_id, and Slic3r::trace().

Here is the call graph for this function:

◆ parse_status()

BBLSubTask::SubTaskStatus Slic3r::BBLSubTask::parse_status ( std::string status)
static
99 {
100 if (status.compare("CREATED") == 0) {
102 }
103 else if (status.compare("READY") == 0) {
105 }
106 else if (status.compare("RUNNING") == 0) {
108 }
109 else if (status.compare("PAUSE") == 0) {
111 }
112 else if (status.compare("FAILED") == 0) {
114 }
115 else if (status.compare("FINISHED") == 0) {
117 }
118 else {
120 }
121 }

References TASK_CREATED, TASK_FAILED, TASK_FINISHED, TASK_PAUSE, TASK_READY, and TASK_RUNNING.

◆ parse_user_service_task_status()

BBLSubTask::SubTaskStatus Slic3r::BBLSubTask::parse_user_service_task_status ( int status)
static
124 {
125 if (status == 1)
127 else if (status == 2)
129 else if (status == 3)
132 }

References TASK_FAILED, TASK_FINISHED, TASK_RUNNING, and TASK_UNKNOWN.

Member Data Documentation

◆ job_id

int Slic3r::BBLSubTask::job_id

Referenced by BBLSubTask().

◆ origin_model_name

std::string Slic3r::BBLSubTask::origin_model_name

Referenced by BBLSubTask().

◆ origin_profile_name

std::string Slic3r::BBLSubTask::origin_profile_name

Referenced by BBLSubTask().

◆ parent_id

std::string Slic3r::BBLSubTask::parent_id

Referenced by BBLSubTask(), and BBLSubTask().

◆ parent_task_

BBLTask* Slic3r::BBLSubTask::parent_task_

Referenced by BBLSubTask().

◆ printing_status

std::string Slic3r::BBLSubTask::printing_status

◆ slice_info

BBLSliceInfo Slic3r::BBLSubTask::slice_info

◆ task_bed_leveling

bool Slic3r::BBLSubTask::task_bed_leveling

Referenced by BBLSubTask().

◆ task_bed_type

std::string Slic3r::BBLSubTask::task_bed_type

Referenced by BBLSubTask(), and BBLSubTask().

◆ task_create_time

std::string Slic3r::BBLSubTask::task_create_time

◆ task_file

std::string Slic3r::BBLSubTask::task_file

◆ task_flow_cali

bool Slic3r::BBLSubTask::task_flow_cali

Referenced by BBLSubTask().

◆ task_gcode_in_3mf

std::string Slic3r::BBLSubTask::task_gcode_in_3mf

Referenced by BBLSubTask().

◆ task_id

◆ task_layer_inspect

bool Slic3r::BBLSubTask::task_layer_inspect {true}
218{true}; /* first layer inspection of task */

Referenced by BBLSubTask().

◆ task_model_id

std::string Slic3r::BBLSubTask::task_model_id

Referenced by BBLSubTask().

◆ task_name

std::string Slic3r::BBLSubTask::task_name

◆ task_partplate_idx

std::string Slic3r::BBLSubTask::task_partplate_idx

◆ task_path

boost::filesystem::path Slic3r::BBLSubTask::task_path

◆ task_printer_dev_id

std::string Slic3r::BBLSubTask::task_printer_dev_id

◆ task_profile_id

std::string Slic3r::BBLSubTask::task_profile_id

Referenced by BBLSubTask(), and BBLSubTask().

◆ task_progress

int Slic3r::BBLSubTask::task_progress

◆ task_project_id

std::string Slic3r::BBLSubTask::task_project_id

Referenced by BBLSubTask(), and BBLSubTask().

◆ task_record_timelapse

bool Slic3r::BBLSubTask::task_record_timelapse

Referenced by BBLSubTask(), and BBLSubTask().

◆ task_status

SubTaskStatus Slic3r::BBLSubTask::task_status

◆ task_thumbnail_url

std::string Slic3r::BBLSubTask::task_thumbnail_url

◆ task_url

std::string Slic3r::BBLSubTask::task_url

Referenced by BBLSubTask().

◆ task_url_md5

std::string Slic3r::BBLSubTask::task_url_md5

Referenced by BBLSubTask().

◆ task_vibration_cali

bool Slic3r::BBLSubTask::task_vibration_cali

Referenced by BBLSubTask().

◆ task_weight

std::string Slic3r::BBLSubTask::task_weight

◆ task_weightF

float Slic3r::BBLSubTask::task_weightF

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