Lely core libraries
2.2.5
|
Go to the documentation of this file.
21 #ifndef LELY_IO2_INTERN_CAN_H_
22 #define LELY_IO2_INTERN_CAN_H_
34 static void io_can_chan_read_post(
36 static size_t io_can_chan_read_queue_post(
40 static size_t io_can_chan_write_queue_post(
struct sllist *queue,
int errc);
54 io_can_chan_read_queue_post(
struct sllist *queue,
int result,
int errc)
63 io_can_chan_read_post(read, result, errc);
81 io_can_chan_write_queue_post(
struct sllist *queue,
int errc)
90 io_can_chan_write_post(write,
errc);
101 #endif // !LELY_IO2_INTERN_CAN_H_
struct ev_task * ev_task_from_node(struct slnode *node)
Converts a pointer to a node in a queue to the address of the task containing the node.
const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
struct io_can_chan_read * io_can_chan_read_from_task(struct ev_task *task)
Obtains a pointer to a CAN channel read operation from a pointer to its completion task.
struct ev_task task
The task (to be) submitted upon completion (or cancellation) of the write operation.
int errc
The error number, obtained as if by get_errc(), if an error occurred or the operation was canceled.
A CAN channel read operation.
int errc
The error number, obtained as if by get_errc(), if result is -1.
A CAN channel write operation.
int result
The result of the read operation: 1 if a CAN frame is received, 0 if an error frame is received,...
void ev_exec_on_task_fini(ev_exec_t *exec)
Undoes the effect of a previous call to ev_exec_on_task_init().
struct slnode * sllist_pop_front(struct sllist *list)
Pops a node from the front of a singly-linked list.
struct io_can_chan_write * io_can_chan_write_from_task(struct ev_task *task)
Obtains a pointer to a CAN channel write operation from a pointer to its completion task.
void ev_exec_post(ev_exec_t *exec, struct ev_task *task)
Submits *task to *exec for execution.
struct ev_task task
The task (to be) submitted upon completion (or cancellation) of the read operation.
A node in a singly-linked list.
ev_exec_t * exec
A pointer to the executor to which the task is (to be) submitted.
struct io_can_chan_read_result r
The result of the read operation.