Lely core libraries
2.3.4
|
Go to the documentation of this file.
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_
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).
A CAN or CAN FD format frame.
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).
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.
CanFlag
The error flags of a CAN bus, which are not mutually exclusive.
An abstract task executor. This class is a wrapper around #ev_exec_t*.
The parent class for function objects used as stackless coroutines.
A CAN error frame read operation suitable for use with a CAN frame router, with a stackless coroutine...
A CAN frame read operation suitable for use with a CAN frame router, with a stackless coroutine as th...
#define IO_CAN_RT_READ_ERR_INIT(func)
The static initializer for io_can_rt_read_err.
ev::Executor get_executor() const noexcept
Returns the executor to which the completion task is (to be) submitted.
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.
CoCanRouterReadError() noexcept
Constructs a CAN error frame read operation.
struct ev_task task
The task (to be) submitted upon completion (or cancellation) of the read operation.
#define IO_CAN_RT_READ_MSG_INIT(id, flags, func)
The static initializer for io_can_rt_read_msg.
::std::error_code make_error_code(SdoErrc e) noexcept
Creates an error code corresponding to an SDO abort code.
ev::Executor get_executor() const noexcept
Returns the executor to which the completion task is (to be) submitted.
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.
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.
uint_least8_t flags
The flags of the CAN frame to be received (any combination of CAN_FLAG_IDE, CAN_FLAG_RTR,...
CoCanRouterReadFrame(uint_least32_t id, CanFlag flags=CanFlag::NONE) noexcept
Constructs a CAN frame read operation.