|
std::shared_ptr< MGrblPlatform > | shared_from_this () |
|
std::shared_ptr< const MGrblPlatform > | shared_from_this () const |
|
DeviceTypeList | getSupportedDevices () const override |
|
DeviceList | generateDevices (const DeviceTypeList &deviceType) override |
|
void | setNotificationWorker (const NotificationWorker::Shared &worker) override |
|
std::future< mgrbl::Layout > | getLayout () |
| retrieve current layout
|
|
void | stop () override |
|
void | wake () override |
|
void | updateInstance (MGrblGpio &gpio) const |
| update instance ptr related to the given gpio More...
|
|
void | updateInstance (MGrblAxis &axis) const |
| update instance ptr related to the given axis More...
|
|
void | updateInstance (MGrblTrigger &trigger) const |
| update instance ptr related to the given trigger More...
|
|
const std::string & | mainTriggerUrl () const |
|
std::shared_ptr< GrblPlatform > | getFirstInstance () const |
| return first instance More...
|
|
std::shared_ptr< GrblPlatform > | getInstance (mgrbl::Instance instance) const |
| get instance related to the given axis More...
|
|
void | runOnInstance (Context &ctx, std::function< void(GrblPlatform::Shared &platform, GrblPlatform::Context &ctx)> fun, bool onlyFirst=false) const |
| run the given lambda on all grbl sub-platforms More...
|
|
template<typename T > |
std::future< T > | run (std::function< void(ImmediateCmd &, Context &)> fun) |
|
void | loadLayout (Context &ctx) |
|
void | getBuildInfo (Context &ctx) |
|
void | notify (const DeviceId &id) |
|
void | notify (std::set< DeviceId > &&ids) |
|
|
static PlatformBase::Shared | create (const ccut::yml::NodeRef &config) |
| Create new instance of MGrblPlatform and return shared_ptr owning it.
|
|
|
| MGrblPlatform (const ccut::yml::NodeRef &node, Context *data=nullptr) |
| internal constructor to use this as a sub-platform (MGrblPlatform) More...
|
|
void | processMessage (const std::string &message) |
|
virtual MGrblAxis::Shared | createAxis (const std::string &uid, const std::shared_ptr< GrblPlatform > &grbl) |
|
void | thread_func () override |
|
virtual void | processUpdate (Context &ctx) |
| device status update function More...
|
|
bool | processImmediate (Context &ctx) |
|
void | createPlatforms (Context &ctx) |
|
void | clearQueue (const std::string &msg) |
|
std::vector< std::shared_ptr< GrblPlatform > > | getPlatforms () const |
|
|
std::unique_ptr< Context > | m_ctx |
|
std::mutex | m_lock |
|
std::vector< std::shared_ptr< GrblPlatform > > | m_platforms |
|
std::map< std::string, std::size_t > | m_triggers |
|
std::map< std::string, std::size_t > | m_gpios |
|
const std::string | m_mainTriggerUrl |
|
mgrbl::Layout | m_layout |
|
ccut::Connection | m_dataConn |
|
std::queue< ImmediateCmd > | m_immediate |
|
std::weak_ptr< NotificationWorker > | m_notificationWorker |
|
Definition at line 53 of file MGrblPlatform.hpp.
◆ MGrblPlatform()
smc::internal::MGrblPlatform::MGrblPlatform |
( |
const ccut::yml::NodeRef & |
node, |
|
|
Context * |
data = nullptr |
|
) |
| |
|
explicitprotected |
internal constructor to use this as a sub-platform (MGrblPlatform)
- Parameters
-
prefix | the platform uri prefix to use |
data | the internal data pointer |
node | the yaml configuration |
Definition at line 52 of file MGrblPlatform.cpp.
◆ getFirstInstance()
GrblPlatform::Shared smc::internal::MGrblPlatform::getFirstInstance |
( |
| ) |
const |
◆ getInstance()
std::shared_ptr<GrblPlatform> smc::internal::MGrblPlatform::getInstance |
( |
mgrbl::Instance |
instance | ) |
const |
|
inline |
◆ processUpdate()
void smc::internal::MGrblPlatform::processUpdate |
( |
Context & |
ctx | ) |
|
|
protectedvirtual |
◆ runOnInstance()
void smc::internal::MGrblPlatform::runOnInstance |
( |
Context & |
ctx, |
|
|
std::function< void(GrblPlatform::Shared &platform, GrblPlatform::Context &ctx)> |
fun, |
|
|
bool |
onlyFirst = false |
|
) |
| const |
run the given lambda on all grbl sub-platforms
- Parameters
-
ctx | used to enforce this method to be called from thread context |
fun | lambda to execute |
Definition at line 183 of file MGrblPlatform.cpp.
◆ updateInstance() [1/3]
void smc::internal::MGrblPlatform::updateInstance |
( |
MGrblAxis & |
axis | ) |
const |
update instance ptr related to the given axis
- Exceptions
-
Definition at line 124 of file MGrblPlatform.cpp.
◆ updateInstance() [2/3]
void smc::internal::MGrblPlatform::updateInstance |
( |
MGrblGpio & |
gpio | ) |
const |
update instance ptr related to the given gpio
- Exceptions
-
Definition at line 162 of file MGrblPlatform.cpp.
◆ updateInstance() [3/3]
void smc::internal::MGrblPlatform::updateInstance |
( |
MGrblTrigger & |
trigger | ) |
const |
update instance ptr related to the given trigger
- Exceptions
-
Definition at line 142 of file MGrblPlatform.cpp.
The documentation for this class was generated from the following files:
- /builds/mro/controls/sambuca/sambuca-motion-lib/src/platform/specialized/MGrblPlatform/MGrblPlatform.hpp
- /builds/mro/controls/sambuca/sambuca-motion-lib/src/platform/specialized/MGrblPlatform/MGrblPlatform.cpp
- /builds/mro/controls/sambuca/sambuca-motion-lib/src/platform/specialized/MGrblPlatform/MGrblPlatform_Base.cpp
- /builds/mro/controls/sambuca/sambuca-motion-lib/src/platform/specialized/MGrblPlatform/MGrblPlatformData.hpp