Lely core libraries  2.2.5
lely::io::CanRouter Class Reference

A CAN frame rounter. This class is a wrapper around #io_can_rt_t*. More...

#include <can_rt.hpp>

Inheritance diagram for lely::io::CanRouter:
Collaboration diagram for lely::io::CanRouter:

Public Member Functions

 CanRouter (io_can_chan_t *chan, ev_exec_t *exec)
 
 ~CanRouter ()
 
CanChannelBase get_channel () const noexcept
 
void submit_read_frame (struct io_can_rt_read_msg &read_msg) noexcept
 
template<class F >
void submit_read_frame (uint_least32_t id, CanFlag flags, F &&f)
 
bool cancel_read_frame (struct io_can_rt_read_msg &read_msg) noexcept
 
bool abort_read_frame (struct io_can_rt_read_msg &read_msg) noexcept
 
ev::Future< const can_msg *, int > async_read_frame (uint_least32_t id, CanFlag flags, struct io_can_rt_read_msg **pread_msg=nullptr)
 
void submit_read_error (struct io_can_rt_read_err &read_err) noexcept
 
template<class F >
typename ::std::enable_if<!::std::is_base_of< io_can_rt_read_err, typename ::std::decay< F >::type >::value >::type submit_read_error (F &&f)
 
bool cancel_read_error (struct io_can_rt_read_err &read_err) noexcept
 
bool abort_read_error (struct io_can_rt_read_err &read_err) noexcept
 
ev::Future< const can_err *, int > async_read_error (struct io_can_rt_read_err **pread_err=nullptr)
 
ev::Future< void, void > async_shutdown ()
 
- 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 CAN frame rounter. This class is a wrapper around #io_can_rt_t*.

Definition at line 209 of file can_rt.hpp.

Constructor & Destructor Documentation

◆ CanRouter()

lely::io::CanRouter::CanRouter ( io_can_chan_t chan,
ev_exec_t exec 
)
inline
See also
io_can_rt_create()

Definition at line 214 of file can_rt.hpp.

◆ ~CanRouter()

lely::io::CanRouter::~CanRouter ( )
inline
See also
io_can_rt_destroy()

Definition at line 240 of file can_rt.hpp.

Member Function Documentation

◆ get_channel()

CanChannelBase lely::io::CanRouter::get_channel ( ) const
inlinenoexcept
See also
io_can_rt_get_chan()

Definition at line 246 of file can_rt.hpp.

◆ submit_read_frame() [1/2]

void lely::io::CanRouter::submit_read_frame ( struct io_can_rt_read_msg read_msg)
inlinenoexcept
See also
io_can_rt_submit_read_msg()

Definition at line 252 of file can_rt.hpp.

◆ submit_read_frame() [2/2]

template<class F >
void lely::io::CanRouter::submit_read_frame ( uint_least32_t  id,
CanFlag  flags,
F &&  f 
)
inline
See also
io_can_rt_submit_read_msg()

Definition at line 259 of file can_rt.hpp.

◆ cancel_read_frame()

bool lely::io::CanRouter::cancel_read_frame ( struct io_can_rt_read_msg read_msg)
inlinenoexcept
See also
io_can_rt_cancel_read_msg()

Definition at line 266 of file can_rt.hpp.

◆ abort_read_frame()

bool lely::io::CanRouter::abort_read_frame ( struct io_can_rt_read_msg read_msg)
inlinenoexcept
See also
io_can_rt_abort_read_msg()

Definition at line 272 of file can_rt.hpp.

◆ async_read_frame()

ev::Future<const can_msg*, int> lely::io::CanRouter::async_read_frame ( uint_least32_t  id,
CanFlag  flags,
struct io_can_rt_read_msg **  pread_msg = nullptr 
)
inline
See also
io_can_rt_async_read_msg()

Definition at line 278 of file can_rt.hpp.

◆ submit_read_error() [1/2]

void lely::io::CanRouter::submit_read_error ( struct io_can_rt_read_err read_err)
inlinenoexcept
See also
io_can_rt_submit_read_err()

Definition at line 288 of file can_rt.hpp.

◆ submit_read_error() [2/2]

template<class F >
typename ::std::enable_if<!::std::is_base_of< io_can_rt_read_err, typename ::std::decay<F>::type>::value>::type lely::io::CanRouter::submit_read_error ( F &&  f)
inline
See also
io_can_rt_submit_read_err()

Definition at line 296 of file can_rt.hpp.

◆ cancel_read_error()

bool lely::io::CanRouter::cancel_read_error ( struct io_can_rt_read_err read_err)
inlinenoexcept
See also
io_can_rt_cancel_read_err()

Definition at line 303 of file can_rt.hpp.

◆ abort_read_error()

bool lely::io::CanRouter::abort_read_error ( struct io_can_rt_read_err read_err)
inlinenoexcept
See also
io_can_rt_abort_read_err()

Definition at line 309 of file can_rt.hpp.

◆ async_read_error()

ev::Future<const can_err*, int> lely::io::CanRouter::async_read_error ( struct io_can_rt_read_err **  pread_err = nullptr)
inline
See also
io_can_rt_async_read_err()

Definition at line 315 of file can_rt.hpp.

◆ async_shutdown()

ev::Future<void, void> lely::io::CanRouter::async_shutdown ( )
inline
See also
io_can_rt_async_shutdown()

Definition at line 323 of file can_rt.hpp.


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