27#if !LELY_NO_COAPP_MASTER
39FiberDriverBase::FiberDriverBase(
ev_exec_t* exec_)
40#if !_WIN32 && _POSIX_MAPPED_FILES
41 : thrd(ev::FiberFlag::SAVE_ERROR | ev::FiberFlag::GUARD_STACK),
43 : thrd(ev::FiberFlag::SAVE_ERROR),
52 : FiberDriverBase(exec ? exec
53 : static_cast<
ev_exec_t*>(master.GetExecutor())),
61 }
catch (const ::std::system_error& e) {
72 if (ec) throw ::std::system_error(ec,
"USleep");
An asynchronous CANopen master.
The base class for drivers for remote CANopen nodes.
BasicMaster & master
A reference to the master with which this driver is registered.
T Wait(SdoFuture< T > f)
Waits for the specified future to become ready by suspending the calling fiber.
FiberDriver(ev_exec_t *exec, AsyncMaster &master, uint8_t id)
Creates a new CANopen driver and its associated fiber executor.
void USleep(uint_least64_t usec)
Suspends the calling fiber for usec microseconds.
ev::Future< void, ::std::exception_ptr > AsyncWait(ev_exec_t *exec, const time_point &t, io_tqueue_wait **pwait=nullptr)
Submits an asynchronous wait operation and creates a future which becomes ready once the wait operati...
bool CancelWait(io_tqueue_wait &wait) noexcept
Cancels the specified wait operation if it is pending.
The exception thrown when retrieving the result of a future which is not ready or does not contain a ...
This is the internal header file of the C++ CANopen application library.
This header file is part of the C++ CANopen application library; it contains the declarations for the...
const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
::std::error_code make_error_code(SdoErrc e) noexcept
Creates an error code corresponding to an SDO abort code.
A wait operation suitable for use with a timer queue.