27 #ifndef LELY_IO2_USER_CAN_H_
28 #define LELY_IO2_USER_CAN_H_
51 const struct can_msg *msg,
int timeout,
void *arg);
53 void *io_user_can_chan_alloc(
void);
54 void io_user_can_chan_free(
void *ptr);
56 ev_exec_t *exec,
int flags,
size_t rxlen,
int txtimeo,
86 int flags,
size_t rxlen,
int txtimeo,
107 const struct timespec *tp,
int timeout);
124 const struct timespec *tp,
int timeout);
const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
This header file is part of the I/O library; it contains the abstract CAN bus interface.
const struct io_can_chan_vtbl *const io_can_chan_t
An abstract CAN channel.
void io_user_can_chan_destroy(io_can_chan_t *chan)
Destroys a user-defined CAN channel.
int io_user_can_chan_on_msg(io_can_chan_t *chan, const struct can_msg *msg, const struct timespec *tp, int timeout)
Processes an incoming CAN frame.
int io_user_can_chan_on_err(io_can_chan_t *chan, const struct can_err *err, const struct timespec *tp, int timeout)
Processes an incoming CAN error frame.
io_can_chan_t * io_user_can_chan_create(io_ctx_t *ctx, ev_exec_t *exec, int flags, size_t rxlen, int txtimeo, io_user_can_chan_write_t *func, void *arg)
Creates a new user-defined CAN channel.
int io_user_can_chan_write_t(const struct can_msg *msg, int timeout, void *arg)
The type of function invoked by a user-defined CAN channel when a CAN frame needs to be written.
A CAN or CAN FD format frame.