Lely core libraries
2.2.5
|
A CAN frame read operation suitable for use with a CAN frame router, with a stackless coroutine as the completion task. More...
#include <co_can_rt.hpp>
Public Member Functions | |
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). More... | |
![]() | |
void | restart () noexcept |
Resets the stackless coroutine so the next invocation starts at the beginning. | |
bool | is_ready () const noexcept |
Returns true if the stackless coroutine has finished. | |
bool | is_parent () const noexcept |
Returns true if the stackless coroutine is the parent of a fork. | |
bool | is_child () const noexcept |
Returns true if the stackless coroutine is the child of a fork. | |
Additional Inherited Members | |
![]() | |
uint_least32_t | id |
The identifier of the CAN frame to be received. More... | |
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). More... | |
struct ev_task | task |
The task (to be) submitted upon completion (or cancellation) of the read operation. | |
struct io_can_rt_read_msg_result | r |
The result of the read operation. | |
A CAN frame read operation suitable for use with a CAN frame router, with a stackless coroutine as the completion task.
Definition at line 38 of file co_can_rt.hpp.
|
pure virtualnoexcept |
The coroutine to be executed once the read operation completes (or is canceled).
msg | a pointer to the received CAN frame, or 0 on error (or if the operation is canceled). In the latter case, the error number is stored in ec. |
ec | the error code if msg is 0. |