MotionLib
1.0.0
SamBuCa motion library
|
Public Types | |
typedef std::shared_ptr< GrblAxis > | Shared |
![]() | |
enum | State { UNKNOWN , IDLE , RUNNING , ERROR } |
Axis State. More... | |
typedef std::shared_ptr< Axis > | Shared |
![]() | |
typedef smc::DeviceType | DeviceType |
typedef std::shared_ptr< DeviceBase > | Shared |
Public Member Functions | |
GrblAxis (const std::string &uid, const std::shared_ptr< GrblPlatform > &grbl) | |
std::future< void > | moveTo (const units::Value &position) const override |
Move this axis to given position. More... | |
std::future< void > | moveBy (const units::Value &distance) const override |
Move this axis by given distance. More... | |
std::future< void > | stop () const override |
Stop any ongoing motion, flush the motion-queue. More... | |
std::future< void > | pause () const override |
Pause ongoing motion, prevent queued motions from running. More... | |
std::future< void > | resume () const override |
Resume paused motion. More... | |
std::future< units::value_t > | getPosition (units::unit_t unit) const override |
Get current position of this axis. More... | |
units::value_t | lastPosition (units::unit_t unit) const override |
Get last known position of the axis. More... | |
std::future< void > | setActualPosition (const units::Value &position) const override |
Set current axis position. More... | |
std::future< void > | takeReference (const std::chrono::milliseconds &timeout=std::chrono::seconds{ 120}) const override |
Start a homing sequence. More... | |
std::future< State > | getState () const override |
Get the current axis state. More... | |
std::future< std::set< std::string > > | listConfig () const override |
list device configuration options | |
std::future< std::string > | getConfig (const std::string &name) const override |
get device configuration value More... | |
std::future< void > | setConfig (const std::string &name, const std::string &value) const override |
set device configuration value More... | |
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. More... | |
bool | convert (units::Value &value, units::unit_t unit) const override |
Convert value in a manner specific to this device. More... | |
![]() | |
Axis (const std::string &address) | |
Construct a new Axis Device at given location on given platform. More... | |
DeviceType | type () const override |
Get device type. More... | |
![]() | |
DeviceId | uid () const |
Get the address of device. More... | |
std::string | toString () const |
debug and logging operation | |
Protected Attributes | |
std::weak_ptr< GrblPlatform > | m_grbl |
![]() | |
const std::string | m_uid |
Additional Inherited Members | |
![]() | |
ccut::Signal< const DeviceBase::Shared & > | updateSignal |
device update signal More... | |
![]() | |
DeviceBase (const std::string &uid) | |
Construct a new ABaseDevice, linking pointer to platform object. More... | |
Definition at line 36 of file GrblAxis.hpp.
|
overridevirtual |
Check if unit conversion is possible in a manner specific to this device.
value | Value to check |
unit | Unit to check |
Reimplemented from smc::DeviceBase.
Reimplemented in smc::internal::MGrblAxis.
Definition at line 506 of file GrblAxis.cpp.
|
overridevirtual |
Convert value in a manner specific to this device.
value | Value to convert |
unit | Unit to convert to |
Reimplemented from smc::DeviceBase.
Reimplemented in smc::internal::MGrblAxis.
Definition at line 512 of file GrblAxis.cpp.
|
overridevirtual |
get device configuration value
name | value to retrieve |
Reimplemented from smc::DeviceBase.
Reimplemented in smc::internal::MGrblAxis.
Definition at line 434 of file GrblAxis.cpp.
|
overridevirtual |
Get current position of this axis.
Implements smc::Axis.
Reimplemented in smc::internal::MGrblAxis.
Definition at line 238 of file GrblAxis.cpp.
|
overridevirtual |
Get the current axis state.
Get the state of the axis: Idle, Run, Error, Unknown
Implements smc::Axis.
Reimplemented in smc::internal::MGrblAxis.
Definition at line 391 of file GrblAxis.cpp.
|
overridevirtual |
Get last known position of the axis.
updateSignal
is emitted whenever this value updated
Implements smc::Axis.
Reimplemented in smc::internal::MGrblAxis.
Definition at line 308 of file GrblAxis.cpp.
|
overridevirtual |
Move this axis by given distance.
distance | Distance to move by |
Implements smc::Axis.
Reimplemented in smc::internal::MGrblAxis.
Definition at line 92 of file GrblAxis.cpp.
|
overridevirtual |
Move this axis to given position.
position | Position to move to |
Implements smc::Axis.
Reimplemented in smc::internal::MGrblAxis.
Definition at line 48 of file GrblAxis.cpp.
|
overridevirtual |
Pause ongoing motion, prevent queued motions from running.
Pauses ongoing motion using proper deceleration, motion may be resumed using Axis::resume
.
Reimplemented from smc::Axis.
Reimplemented in smc::internal::MGrblAxis.
Definition at line 195 of file GrblAxis.cpp.
|
overridevirtual |
Resume paused motion.
resumes paused motion using proper acceleration.
Reimplemented from smc::Axis.
Reimplemented in smc::internal::MGrblAxis.
Definition at line 216 of file GrblAxis.cpp.
|
overridevirtual |
Set current axis position.
position | new position for axis |
Reimplemented from smc::Axis.
Reimplemented in smc::internal::MGrblAxis, and smc::internal::MFEAxis.
Definition at line 273 of file GrblAxis.cpp.
|
overridevirtual |
set device configuration value
name | name of the configuration value to set |
value | value to set |
Reimplemented from smc::DeviceBase.
Reimplemented in smc::internal::MGrblAxis.
Definition at line 478 of file GrblAxis.cpp.
|
overridevirtual |
Stop any ongoing motion, flush the motion-queue.
Stop ongoing motion using proper deceleration, reject pending promises. This may stop other axis depending on motion-queue implementation (ex: axis bound to the same Grbl instance).
Implements smc::Axis.
Reimplemented in smc::internal::MGrblAxis.
Definition at line 172 of file GrblAxis.cpp.
|
overridevirtual |
Start a homing sequence.
timeout | Timeout for homing sequence request |
Reimplemented from smc::Axis.
Reimplemented in smc::internal::MGrblAxis.
Definition at line 329 of file GrblAxis.cpp.