|
std::shared_ptr< GrblPlatform > | shared_from_this () |
|
std::shared_ptr< const GrblPlatform > | shared_from_this () const |
|
DeviceTypeList | getSupportedDevices () const override |
|
DeviceList | generateDevices (const DeviceTypeList &deviceType) override |
|
void | stop () override |
|
void | wake () override |
|
std::future< void > | queue (MotionCmd &&) |
|
template<typename T > |
std::future< T > | run (std::function< void(ImmediateCmd &, Context &)> fun) |
|
std::future< void > | send (const std::string &cmd, std::function< bool(const std::string &)> msg={}, const std::chrono::milliseconds &timeout=std::chrono::milliseconds{1000}) |
| send command to grbl More...
|
|
void | updateAxisSetting (const std::string &axis, grbl::SettingId settingId, const std::string &value) |
|
units::Value | getLastAxisPosition (const std::string &axis) const |
|
units::Value | getLastAxisResolution (const std::string &axis) const |
|
uint8_t | getTrigger (const std::string &uid) |
|
uint8_t | getGpio (const std::string &uid) |
|
grbl::Axis | getAxis (const std::string &uid) |
|
void | clearQueues (const std::string &msg, bool clearImmediates=true) |
|
virtual void | setNotificationWorker (const NotificationWorker::Shared &worker) |
|
void | notify (const DeviceId &id) |
|
void | notify (std::set< DeviceId > &&ids) |
|
|
static PlatformBase::Shared | create (const ccut::yml::NodeRef &config) |
| Create new instance of MockPlatform and return shared_ptr owning it.
|
|
|
static const std::chrono::milliseconds | defaultInterval |
|
static const std::string | s_loggerCat {"smc:platform:grbl"} |
|
|
| GrblPlatform (const ccut::yml::NodeRef &node) |
|
AxisData & | _getAxisData (const std::string &uid) |
|
| GrblPlatform (const std::string &prefix, const std::string &id, std::unique_ptr< grbl::GrblDeviceBase > &&device) |
| internal constructor to use this as a sub-platform (MGrblPlatform) More...
|
|
void | processMessage (const std::string &message) |
|
bool | processMotion () |
|
bool | processImmediate () |
|
void | onStateMessage () |
|
void | loadErrors () |
|
void | loadAlarms () |
|
void | loadSettingsDesc () |
|
void | setup () |
|
void | handleAlarm () |
|
void | generateGpios (const Context &ctx, const std::list< grbl::GrblParser::PinInfo > &pins, std::list< GrblGpio::Shared > &out) |
|
void | generateTriggers (Context &ctx, const std::list< grbl::GrblParser::PinInfo > &pins, std::list< GrblTrigger::Shared > &out) |
|
void | generateAxes (const Context &ctx, size_t axesCount, std::list< GrblAxis::Shared > &out) |
|
void | thread_func () override |
|
|
std::mutex | m_lock |
|
std::queue< MotionCmd > | m_queue |
|
std::queue< ImmediateCmd > | m_immediate |
|
std::queue< MotionCmd > | m_pending |
|
std::map< std::string, AxisData > | m_axisMap |
|
std::pair< std::string, uint8_t > | m_trigger |
|
std::map< std::string, uint8_t > | m_gpioMap |
|
ccut::Connection | m_dataConn |
|
std::unique_ptr< Context > | m_ctx |
|
std::weak_ptr< NotificationWorker > | m_notificationWorker |
|
|
static constexpr std::size_t | maxQueueSize = 1024 |
|
|
class | MGrblPlatform |
|
class | MFEPlatform |
|
Definition at line 62 of file GrblPlatform.hpp.
◆ GrblPlatform()
smc::internal::GrblPlatform::GrblPlatform |
( |
const std::string & |
prefix, |
|
|
const std::string & |
id, |
|
|
std::unique_ptr< grbl::GrblDeviceBase > && |
device |
|
) |
| |
|
explicitprotected |
internal constructor to use this as a sub-platform (MGrblPlatform)
this constructor does not start the Thread
- Parameters
-
prefix | the platform uri prefix to use |
id | the paltform id to use |
device | the device to communicate with |
Definition at line 119 of file GrblPlatform.cpp.
◆ _getAxisData()
◆ send()
std::future< void > smc::internal::GrblPlatform::send |
( |
const std::string & |
cmd, |
|
|
std::function< bool(const std::string &)> |
msg = {} , |
|
|
const std::chrono::milliseconds & |
timeout = std::chrono::milliseconds{1000} |
|
) |
| |
send command to grbl
mainly for test and debug purpose, see GrblDeviceBase::send
- Parameters
-
cmd | the command to send |
msg | data handling function |
timeout | reply timeout |
- Returns
- std::future<void>s
Definition at line 221 of file GrblPlatform_Base.cpp.
The documentation for this class was generated from the following files:
- /builds/mro/controls/sambuca/sambuca-motion-lib/src/platform/specialized/GrblPlatform/GrblPlatform.hpp
- /builds/mro/controls/sambuca/sambuca-motion-lib/src/platform/specialized/GrblPlatform/GrblPlatform.cpp
- /builds/mro/controls/sambuca/sambuca-motion-lib/src/platform/specialized/GrblPlatform/GrblPlatform.hxx
- /builds/mro/controls/sambuca/sambuca-motion-lib/src/platform/specialized/GrblPlatform/GrblPlatform_Base.cpp