24 #ifndef MGRBLAXIS_HPP__
25 #define MGRBLAXIS_HPP__
29 #include "platform/specialized/GrblPlatform/GrblAxis.hpp"
39 typedef std::shared_ptr<MGrblAxis> Shared;
42 const std::shared_ptr<MGrblPlatform> &mgrbl,
43 const std::shared_ptr<GrblPlatform> &grbl);
49 std::future<void>
stop()
const override;
51 std::future<void>
pause()
const override;
53 std::future<void>
resume()
const override;
55 std::future<units::value_t>
getPosition(units::unit_t unit)
const override;
63 const std::chrono::milliseconds &timeout = std::chrono::seconds{
66 std::future<State>
getState()
const override;
68 std::future<std::set<std::string>>
listConfig()
const override;
70 std::future<std::string>
getConfig(
const std::string &name)
const override;
72 std::future<void>
setConfig(
const std::string &name,
73 const std::string &value)
const override;
76 units::unit_t unit)
const override;
83 void updateInstance()
const;
85 std::weak_ptr<MGrblPlatform> m_mgrbl;
DeviceId uid() const
Get the address of device.
bool canConvert(const units::Value &value, units::unit_t unit) const override
Check if unit conversion is possible in a manner specific to this device.
std::future< std::set< std::string > > listConfig() const override
list device configuration options
std::future< void > moveBy(const units::Value &distance) const override
Move this axis by given distance.
bool convert(units::Value &value, units::unit_t unit) const override
Convert value in a manner specific to this device.
std::future< void > moveTo(const units::Value &position) const override
Move this axis to given position.
std::future< void > takeReference(const std::chrono::milliseconds &timeout=std::chrono::seconds{ 120}) const override
Start a homing sequence.
std::future< void > stop() const override
Stop any ongoing motion, flush the motion-queue.
std::future< State > getState() const override
Get the current axis state.
units::value_t lastPosition(units::unit_t unit) const override
Get last known position of the axis.
std::future< std::string > getConfig(const std::string &name) const override
get device configuration value
std::future< void > setConfig(const std::string &name, const std::string &value) const override
set device configuration value
std::future< void > pause() const override
Pause ongoing motion, prevent queued motions from running.
std::future< void > resume() const override
Resume paused motion.
std::future< void > setActualPosition(const units::Value &position) const override
Set current axis position.
std::future< units::value_t > getPosition(units::unit_t unit) const override
Get current position of this axis.
main motion-lib namespace