25 #ifndef LELY_IO2_CO_CAN_RT_HPP_
26 #define LELY_IO2_CO_CAN_RT_HPP_
46 auto msg = read_msg->r.msg;
73 ::std::error_code ec) noexcept = 0;
86 auto err = read_err->r.err;
113 ::std::error_code ec) noexcept = 0;
#define IO_CAN_RT_READ_MSG_INIT(id, flags, func)
The static initializer for io_can_rt_read_msg.
struct io_can_rt_read_err * io_can_rt_read_err_from_task(struct ev_task *task)
Obtains a pointer to a CAN error frame read operation from a pointer to its completion task.
#define IO_CAN_RT_READ_ERR_INIT(func)
The static initializer for io_can_rt_read_err.
struct io_can_rt_read_msg * io_can_rt_read_msg_from_task(struct ev_task *task)
Obtains a pointer to a CAN frame read operation from a pointer to its completion task.
This header file is part of the I/O library; it contains the C++ interface for the CAN frame router.
An abstract task executor. This class is a wrapper around #ev_exec_t*.
A CAN error frame read operation suitable for use with a CAN frame router, with a stackless coroutine...
CoCanRouterReadError() noexcept
Constructs a CAN error frame read operation.
ev::Executor get_executor() const noexcept
Returns the executor to which the completion task is (to be) submitted.
virtual void operator()(const can_err *err, ::std::error_code ec) noexcept=0
The coroutine to be executed once the read operation completes (or is canceled).
A CAN frame read operation suitable for use with a CAN frame router, with a stackless coroutine as th...
CoCanRouterReadFrame(uint_least32_t id, CanFlag flags=CanFlag::NONE) noexcept
Constructs a CAN frame read operation.
ev::Executor get_executor() const noexcept
Returns the executor to which the completion task is (to be) submitted.
virtual void operator()(const can_msg *msg, ::std::error_code ec) noexcept=0
The coroutine to be executed once the read operation completes (or is canceled).
The parent class for function objects used as stackless coroutines.
This header file is part of the utilities library; it contains the C++ implementation of stackless co...
CanFlag
The error flags of a CAN bus, which are not mutually exclusive.
::std::error_code make_error_code(SdoErrc e) noexcept
Creates an error code corresponding to an SDO abort code.
A CAN or CAN FD format frame.
ev_exec_t * exec
A pointer to the executor to which the task is (to be) submitted.
A CAN error frame read operation suitable for use with a CAN frame router.
struct ev_task task
The task (to be) submitted upon completion (or cancellation) of the read operation.
A CAN frame read operation suitable for use with a CAN frame router.
struct ev_task task
The task (to be) submitted upon completion (or cancellation) of the read operation.
uint_least8_t flags
The flags of the CAN frame to be received (any combination of CAN_FLAG_IDE, CAN_FLAG_RTR,...