26#if !LELY_NO_COAPP_MASTER
53 : master(master_), loop_(loop), exec_(exec), id_(id) {
66LoopDriver::LoopDriver(
BasicMaster& master, uint8_t
id)
67 :
BasicDriver(loop, exec, master, id), impl_(new Impl_(this)) {}
69LoopDriver::~LoopDriver() =
default;
71LoopDriver::Impl_::Impl_(LoopDriver* self_)
72 : self(self_), thread(&Impl_::Start, this) {}
74LoopDriver::Impl_::~Impl_() {
80LoopDriver::Impl_::Start() {
81 auto loop = self->GetLoop();
82 auto exec = self->GetExecutor();
88 exec.OnTaskFinished();
The base class for drivers for remote CANopen nodes.
BasicDriver(aio::LoopBase &loop, aio::ExecutorBase &exec, BasicMaster &master, uint8_t id)
Creates a new driver for a remote CANopen node and registers it with the master.
uint8_t netid() const noexcept final override
Returns the network-ID.
aio::LoopBase GetLoop() const noexcept
Returns the event loop used to create promises and futures.
BasicMaster & master
A reference to the master with which this driver is registered.
void Erase(DriverBase &driver)
Unregisters a driver for a remote CANopen node.
void Insert(DriverBase &driver)
Registers a driver for a remote CANopen node.
uint8_t netid() const noexcept
Returns the network-ID.
A CANopen driver running its own dedicated event loop in a separate thread.
This header file is part of the C++ CANopen application library; it contains the remote node driver i...
Global namespace for the Lely Industries N.V. libraries.
This is the internal header file of the C++ CANopen application library.
The internal implementation of lely::canopen::LoopDriver.