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

A reference to an abstract CAN channel. More...

#include <can.hpp>

Inheritance diagram for lely::io::CanChannelBase:
Collaboration diagram for lely::io::CanChannelBase:

Public Member Functions

CanBusFlag get_flags () const
 
int read (can_msg *msg, can_err *err, ::std::chrono::nanoseconds *dp, int timeout, ::std::error_code &ec) noexcept
 
bool read (can_msg *msg, can_err *err=nullptr, ::std::chrono::nanoseconds *dp=nullptr, int timeout=-1)
 
void submit_read (struct io_can_chan_read &read) noexcept
 
template<class F >
void submit_read (can_msg *msg, can_err *err, ::std::chrono::nanoseconds *dp, ev_exec_t *exec, F &&f)
 
template<class F >
void submit_read (can_msg *msg, can_err *err, ::std::chrono::nanoseconds *dp, F &&f)
 
bool cancel_read (struct io_can_chan_read &read) noexcept
 
bool abort_read (struct io_can_chan_read &read) noexcept
 
ev::Future< int, int > async_read (ev_exec_t *exec, can_msg *msg, can_err *err=nullptr, timespec *tp=nullptr, struct io_can_chan_read **pread=nullptr)
 
ev::Future< int, int > async_read (can_msg *msg, can_err *err=nullptr, timespec *tp=nullptr, struct io_can_chan_read **pread=nullptr)
 
void write (const can_msg &msg, int timeout, ::std::error_code &ec) noexcept
 
void write (const can_msg &msg, int timeout=-1)
 
void submit_write (struct io_can_chan_write &write) noexcept
 
template<class F >
void submit_write (const can_msg &msg, ev_exec_t *exec, F &&f)
 
template<class F >
void submit_write (const can_msg &msg, F &&f)
 
bool cancel_write (struct io_can_chan_write &write) noexcept
 
bool abort_write (struct io_can_chan_write &write) noexcept
 
ev::Future< void, int > async_write (ev_exec_t *exec, const can_msg &msg, struct io_can_chan_write **pwrite=nullptr)
 
ev::Future< void, int > async_write (const can_msg &msg, struct io_can_chan_write **pwrite=nullptr)
 
- Public Member Functions inherited from lely::io::Device
ContextBase get_ctx () const noexcept
 
ev::Executor get_executor () const noexcept
 
bool cancel (ev_task &task) noexcept
 
::std::size_t cancel_all () noexcept
 
bool abort (ev_task &task) noexcept
 
::std::size_t abort_all () noexcept
 

Detailed Description

A reference to an abstract CAN channel.

This class is a wrapper around #io_can_chan_t*.

Definition at line 430 of file can.hpp.

Member Function Documentation

◆ get_flags()

CanBusFlag lely::io::CanChannelBase::get_flags ( ) const
inline
See also
io_can_chan_get_flags()

Definition at line 441 of file can.hpp.

◆ read() [1/2]

int lely::io::CanChannelBase::read ( can_msg msg,
can_err err,
::std::chrono::nanoseconds *  dp,
int  timeout,
::std::error_code &  ec 
)
inlinenoexcept
See also
io_can_chan_read()

Definition at line 449 of file can.hpp.

◆ read() [2/2]

bool lely::io::CanChannelBase::read ( can_msg msg,
can_err err = nullptr,
::std::chrono::nanoseconds *  dp = nullptr,
int  timeout = -1 
)
inline
See also
io_can_chan_read()

Definition at line 466 of file can.hpp.

◆ submit_read() [1/3]

void lely::io::CanChannelBase::submit_read ( struct io_can_chan_read read)
inlinenoexcept
See also
io_can_chan_submit_read()

Definition at line 476 of file can.hpp.

◆ submit_read() [2/3]

template<class F >
void lely::io::CanChannelBase::submit_read ( can_msg msg,
can_err err,
::std::chrono::nanoseconds *  dp,
ev_exec_t exec,
F &&  f 
)
inline
See also
io_can_chan_submit_read()

Definition at line 483 of file can.hpp.

◆ submit_read() [3/3]

template<class F >
void lely::io::CanChannelBase::submit_read ( can_msg msg,
can_err err,
::std::chrono::nanoseconds *  dp,
F &&  f 
)
inline
See also
io_can_chan_submit_read()

Definition at line 492 of file can.hpp.

◆ cancel_read()

bool lely::io::CanChannelBase::cancel_read ( struct io_can_chan_read read)
inlinenoexcept
See also
io_can_chan_cancel_read()

Definition at line 499 of file can.hpp.

◆ abort_read()

bool lely::io::CanChannelBase::abort_read ( struct io_can_chan_read read)
inlinenoexcept
See also
io_can_chan_abort_read()

Definition at line 505 of file can.hpp.

◆ async_read() [1/2]

ev::Future<int, int> lely::io::CanChannelBase::async_read ( ev_exec_t exec,
can_msg msg,
can_err err = nullptr,
timespec *  tp = nullptr,
struct io_can_chan_read **  pread = nullptr 
)
inline
See also
io_can_chan_async_read()

Definition at line 511 of file can.hpp.

◆ async_read() [2/2]

ev::Future<int, int> lely::io::CanChannelBase::async_read ( can_msg msg,
can_err err = nullptr,
timespec *  tp = nullptr,
struct io_can_chan_read **  pread = nullptr 
)
inline
See also
io_can_chan_async_read()

Definition at line 520 of file can.hpp.

◆ write() [1/2]

void lely::io::CanChannelBase::write ( const can_msg msg,
int  timeout,
::std::error_code &  ec 
)
inlinenoexcept
See also
io_can_chan_write()

Definition at line 527 of file can.hpp.

◆ write() [2/2]

void lely::io::CanChannelBase::write ( const can_msg msg,
int  timeout = -1 
)
inline
See also
io_can_chan_write()

Definition at line 539 of file can.hpp.

◆ submit_write() [1/3]

void lely::io::CanChannelBase::submit_write ( struct io_can_chan_write write)
inlinenoexcept
See also
io_can_chan_submit_write()

Definition at line 547 of file can.hpp.

◆ submit_write() [2/3]

template<class F >
void lely::io::CanChannelBase::submit_write ( const can_msg msg,
ev_exec_t exec,
F &&  f 
)
inline
See also
io_can_chan_submit_write()

Definition at line 554 of file can.hpp.

◆ submit_write() [3/3]

template<class F >
void lely::io::CanChannelBase::submit_write ( const can_msg msg,
F &&  f 
)
inline
See also
io_can_chan_submit_write()

Definition at line 562 of file can.hpp.

◆ cancel_write()

bool lely::io::CanChannelBase::cancel_write ( struct io_can_chan_write write)
inlinenoexcept
See also
io_can_chan_cancel_write()

Definition at line 568 of file can.hpp.

◆ abort_write()

bool lely::io::CanChannelBase::abort_write ( struct io_can_chan_write write)
inlinenoexcept
See also
io_can_chan_abort_write()

Definition at line 574 of file can.hpp.

◆ async_write() [1/2]

ev::Future<void, int> lely::io::CanChannelBase::async_write ( ev_exec_t exec,
const can_msg msg,
struct io_can_chan_write **  pwrite = nullptr 
)
inline
See also
io_can_chan_async_write()

Definition at line 580 of file can.hpp.

◆ async_write() [2/2]

ev::Future<void, int> lely::io::CanChannelBase::async_write ( const can_msg msg,
struct io_can_chan_write **  pwrite = nullptr 
)
inline
See also
io_can_chan_async_write()

Definition at line 589 of file can.hpp.


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