![]() |
Prusa Slicer 2.6.0
|
#include <src/libslic3r/GCodeSender.hpp>
Inheritance diagram for Slic3r::GCodeSender:
Collaboration diagram for Slic3r::GCodeSender:Public Member Functions | |
| GCodeSender () | |
| ~GCodeSender () | |
| bool | connect (std::string devname, unsigned int baud_rate) |
| void | send (const std::vector< std::string > &lines, bool priority=false) |
| void | send (const std::string &s, bool priority=false) |
| void | disconnect () |
| bool | error_status () const |
| bool | is_connected () const |
| bool | wait_connected (unsigned int timeout=3) const |
| size_t | queue_size () const |
| void | pause_queue () |
| void | resume_queue () |
| void | purge_queue (bool priority=false) |
| std::vector< std::string > | purge_log () |
| std::string | getT () const |
| std::string | getB () const |
| void | set_DTR (bool on) |
| void | reset () |
Private Member Functions | |
| void | set_baud_rate (unsigned int baud_rate) |
| void | set_error_status (bool e) |
| void | do_send () |
| void | on_write (const boost::system::error_code &error, size_t bytes_transferred) |
| void | do_close () |
| void | do_read () |
| void | on_read (const boost::system::error_code &error, size_t bytes_transferred) |
| void | send () |
Private Attributes | |
| asio::io_service | io |
| asio::serial_port | serial |
| boost::thread | background_thread |
| boost::asio::streambuf | read_buffer |
| boost::asio::streambuf | write_buffer |
| bool | open |
| bool | connected |
| bool | error |
| boost::mutex | error_mutex |
| boost::mutex | queue_mutex |
| std::queue< std::string > | queue |
| std::list< std::string > | priqueue |
| bool | can_send |
| bool | queue_paused |
| size_t | sent |
| std::deque< std::string > | last_sent |
| boost::mutex | log_mutex |
| std::queue< std::string > | log |
| std::string | T |
| std::string | B |
| Slic3r::GCodeSender::GCodeSender | ( | ) |
| Slic3r::GCodeSender::~GCodeSender | ( | ) |
| bool Slic3r::GCodeSender::connect | ( | std::string | devname, |
| unsigned int | baud_rate | ||
| ) |
References background_thread, disconnect(), do_read(), io, last_sent, open, reset(), sent, serial, set_baud_rate(), and set_error_status().
Here is the call graph for this function:| void Slic3r::GCodeSender::disconnect | ( | ) |
References background_thread, connected, do_close(), io, and open.
Referenced by ~GCodeSender(), and connect().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References serial, and set_error_status().
Referenced by disconnect(), on_read(), and on_write().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References on_read(), read_buffer, and serial.
Referenced by connect(), and on_read().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References can_send, KEEP_SENT, last_sent, on_write(), priqueue, queue, queue_mutex, sent, serial, and write_buffer.
Referenced by on_write(), and send().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Slic3r::GCodeSender::error_status | ( | ) | const |
References error, and error_mutex.
| std::string Slic3r::GCodeSender::getB | ( | ) | const |
| std::string Slic3r::GCodeSender::getT | ( | ) | const |
| bool Slic3r::GCodeSender::is_connected | ( | ) | const |
|
private |
References B, can_send, connected, do_close(), do_read(), error, last_sent, log, log_mutex, open, priqueue, queue_mutex, read_buffer, send(), sent, set_error_status(), and T.
Referenced by do_read().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References do_close(), do_send(), open, and set_error_status().
Referenced by do_send().
Here is the call graph for this function:
Here is the caller graph for this function:| void Slic3r::GCodeSender::pause_queue | ( | ) |
References queue_mutex, and queue_paused.
| std::vector< std::string > Slic3r::GCodeSender::purge_log | ( | ) |
| void Slic3r::GCodeSender::purge_queue | ( | bool | priority = false | ) |
References Slic3r::empty(), priqueue, queue, queue_mutex, and queue_paused.
Here is the call graph for this function:| size_t Slic3r::GCodeSender::queue_size | ( | ) | const |
References queue, and queue_mutex.
| void Slic3r::GCodeSender::reset | ( | ) |
References set_DTR().
Referenced by connect().
Here is the call graph for this function:
Here is the caller graph for this function:| void Slic3r::GCodeSender::resume_queue | ( | ) |
References queue_mutex, queue_paused, and send().
Here is the call graph for this function:
|
private |
Referenced by on_read(), resume_queue(), send(), and send().
Here is the call graph for this function:
Here is the caller graph for this function:References priqueue, queue, queue_mutex, and send().
Here is the call graph for this function:References priqueue, queue, queue_mutex, and send().
Here is the call graph for this function:
|
private |
References serial.
Referenced by connect().
Here is the caller graph for this function:| void Slic3r::GCodeSender::set_DTR | ( | bool | on | ) |
References serial.
Referenced by reset().
Here is the caller graph for this function:
|
private |
References error, and error_mutex.
Referenced by connect(), do_close(), on_read(), and on_write().
Here is the caller graph for this function:| bool Slic3r::GCodeSender::wait_connected | ( | unsigned int | timeout = 3 | ) | const |
References connected.
|
private |
Referenced by connect(), and disconnect().
|
private |
Referenced by disconnect(), is_connected(), on_read(), and wait_connected().
|
private |
Referenced by error_status(), on_read(), and set_error_status().
|
mutableprivate |
Referenced by error_status(), and set_error_status().
|
private |
Referenced by connect(), disconnect(), and send().
|
private |
|
private |
Referenced by on_read(), and purge_log().
|
mutableprivate |
Referenced by getB(), getT(), on_read(), and purge_log().
|
private |
Referenced by connect(), disconnect(), on_read(), and on_write().
|
private |
Referenced by do_send(), on_read(), purge_queue(), send(), and send().
|
private |
Referenced by do_send(), purge_queue(), queue_size(), send(), and send().
|
mutableprivate |
Referenced by do_send(), on_read(), pause_queue(), purge_queue(), queue_size(), resume_queue(), send(), and send().
|
private |
Referenced by pause_queue(), purge_queue(), and resume_queue().
|
private |
|
private |
Referenced by connect(), do_close(), do_read(), do_send(), set_baud_rate(), and set_DTR().
|
private |
Referenced by do_send().