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;
119 #endif // !LELY_IO2_CO_CAN_RT_HPP_ A CAN or CAN FD format frame.
CanFlag
The error flags of a CAN bus, which are not mutually exclusive.
This header file is part of the utilities library; it contains the C++ implementation of stackless co...
ev::Executor get_executor() const noexcept
Returns the executor to which the completion task is (to be) submitted.
CoCanRouterReadError() noexcept
Constructs a CAN error frame read operation.
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.
The parent class for function objects used as stackless coroutines.
#define IO_CAN_RT_READ_ERR_INIT(func)
The static initializer for io_can_rt_read_err.
ev_exec_t * exec
A pointer to the executor to which the task is (to be) submitted.
This header file is part of the I/O library; it contains the C++ interface for the CAN frame router...
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...
A CAN frame read operation suitable for use with a CAN frame router, with a stackless coroutine as th...
A CAN error frame read operation suitable for use with a CAN frame router, with a stackless coroutine...
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.
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).
An abstract task executor. This class is a wrapper around ev_exec_t*.
A CAN frame read operation suitable for use with a CAN frame router.
::std::error_code make_error_code(SdoErrc e) noexcept
Creates an error code corresponding to an SDO abort code.
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.
uint_least8_t flags
The flags of the CAN frame to be received (any combination of CAN_FLAG_IDE, CAN_FLAG_RTR, CAN_FLAG_FDF, CAN_FLAG_BRS and CAN_FLAG_ESI).
#define IO_CAN_RT_READ_MSG_INIT(id, flags, func)
The static initializer for io_can_rt_read_msg.