Lely core libraries  2.3.4
lely::io::CanChannelRead Class Reference

A read operation suitable for use with a CAN channel. More...

#include <can.hpp>

Inheritance diagram for lely::io::CanChannelRead:
Collaboration diagram for lely::io::CanChannelRead:

Public Member Functions

template<class F >
 CanChannelRead (can_msg *msg, can_err *err, ::std::chrono::nanoseconds *dp, ev_exec_t *exec, F &&f)
 Constructs a read operation with a completion task.
 
template<class F >
 CanChannelRead (can_msg *msg, can_err *err, ::std::chrono::nanoseconds *dp, F &&f)
 Constructs a read operation with a completion task.
 
ev::Executor get_executor () const noexcept
 Returns the executor to which the completion task is (to be) submitted.
 

Additional Inherited Members

- Data Fields inherited from io_can_chan_read
struct can_msgmsg
 The address at which to store the CAN frame. More...
 
struct can_errerr
 The address at which to store the CAN error frame. More...
 
struct timespec * tp
 The address at which to store the system time at which the CAN frame or CAN error frame was received. More...
 
struct ev_task task
 The task (to be) submitted upon completion (or cancellation) of the read operation.
 
struct io_can_chan_read_result r
 The result of the read operation.
 

Detailed Description

A read operation suitable for use with a CAN channel.

This class stores a callable object with signature void(int result, std::error_code ec), which is invoked upon completion (or cancellation) of the read operation.

Definition at line 145 of file can.hpp.


The documentation for this class was generated from the following file: