24 #ifndef MGRBLPLATFORMDATA_HPP__
25 #define MGRBLPLATFORMDATA_HPP__
27 #if !defined(GCC_LINT)
31 #include "MGrblPlatform.hpp"
32 #include "util/grbl/GrblDeviceBase.hpp"
39 Context(
const std::string &prefix,
const ccut::yml::NodeRef &ref);
42 const std::string prefix;
45 std::chrono::steady_clock::time_point nextPoll;
47 void checkReply(grbl::ErrorCode rc);
49 std::set<mgrbl::Instance> used;
51 std::shared_ptr<grbl::GrblDeviceBase> device;
63 std::unique_ptr<PromiseBase> prom;
67 std::future<T> MGrblPlatform::run(
71 std::future<T> ret = cmd.prom->get<T>().get_future();
73 std::unique_lock<std::mutex> lock(m_lock);
76 m_immediate.push(std::move(cmd));
81 cmd.prom->set_exception(
82 Exception(ErrorCode::Canceled,
"platform stopped"));
Exception thrown by MotionController in case of issues with command.
main motion-lib namespace
base structure for promise handline