Lely core libraries
2.2.5
|
This file is part of the I/O library; it exposes the abstract CAN bus functions. More...
Go to the source code of this file.
Data Structures | |
struct | io_can_chan_async_read |
struct | io_can_chan_async_write |
Functions | |
ev_future_t * | io_can_chan_async_read (io_can_chan_t *chan, ev_exec_t *exec, struct can_msg *msg, struct can_err *err, struct timespec *tp, struct io_can_chan_read **pread) |
Submits an asynchronous read operation to a CAN channel and creates a future which becomes ready once the read operation completes (or is canceled). More... | |
ev_future_t * | io_can_chan_async_write (io_can_chan_t *chan, ev_exec_t *exec, const struct can_msg *msg, struct io_can_chan_write **pwrite) |
Submits an asynchronous write operation to a CAN channel and creates a future which becomes ready once the write operation completes (or is canceled). More... | |
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 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. | |
This file is part of the I/O library; it exposes the abstract CAN bus functions.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file can.c.
ev_future_t* io_can_chan_async_read | ( | io_can_chan_t * | chan, |
ev_exec_t * | exec, | ||
struct can_msg * | msg, | ||
struct can_err * | err, | ||
struct timespec * | tp, | ||
struct io_can_chan_read ** | pread | ||
) |
Submits an asynchronous read operation to a CAN channel and creates a future which becomes ready once the read operation completes (or is canceled).
The result of the future has type io_can_chan_read_result.
chan | a pointer to a CAN channel. |
exec | a pointer to the executor used to execute the completion function of the read operation. If NULL, the default executor of the CAN channel is used. |
msg | the address at which to store the CAN frame (can be NULL). |
err | the address at which to store the CAN error frame (can be NULL). |
tp | the address at which to store the system time at which the CAN frame or CAN error frame was received (can be NULL). |
pread | the address at which to store a pointer to the read operation (can be NULL). |
ev_future_t* io_can_chan_async_write | ( | io_can_chan_t * | chan, |
ev_exec_t * | exec, | ||
const struct can_msg * | msg, | ||
struct io_can_chan_write ** | pwrite | ||
) |
Submits an asynchronous write operation to a CAN channel and creates a future which becomes ready once the write operation completes (or is canceled).
The result of the future is an int
containing the error number.
chan | a pointer to a CAN channel. |
exec | a pointer to the executor used to execute the completion function of the write operation. If NULL, the default executor of the CAN channel is used. |
msg | a pointer to the CAN frame to be writen. |
pwrite | the address at which to store a pointer to the write operation (can be NULL). |