|
Lely core libraries 2.3.2
|
The implementation of a user-defined CAN channel. More...

Data Fields | |
| const struct io_dev_vtbl * | dev_vptr |
| A pointer to the virtual table for the I/O device interface. | |
| const struct io_can_chan_vtbl * | chan_vptr |
| A pointer to the virtual table for the CAN channel interface. | |
| struct io_svc | svc |
| The I/O service representing the channel. | |
| io_ctx_t * | ctx |
| A pointer to the I/O context with which the channel is registered. | |
| ev_exec_t * | exec |
| A pointer to the executor used to execute all I/O tasks. | |
| int | flags |
| The flags specifying which CAN bus features are enabled. | |
| int | txtimeo |
| The timeout (in milliseconds) when writing a CAN frame asynchronously. | |
| io_user_can_chan_write_t * | func |
| A pointer to the function to be invoked when a CAN frame needs to be written. | |
| void * | arg |
| The user-specific value to be passed as the second argument to func. | |
| struct ev_task | read_task |
| The task responsible for initiating read operations. | |
| struct ev_task | write_task |
| The task responsible for initiating write operations. | |
| mtx_t | p_mtx |
| The mutex protecting the receive queue producer. | |
| cnd_t | p_cond |
| The condition variable used to wake up the receive queue producer. | |
| mtx_t | c_mtx |
| The mutex protecting the receive queue consumer. | |
| cnd_t | c_cond |
| The condition variable used to wake up the receive queue consumer. | |
| struct spscring | rxring |
| The ring buffer used to control the receive queue. | |
| struct io_user_can_frame * | rxbuf |
| The receive queue. | |
| mtx_t | mtx |
| The mutex protecting the channel and the queues of pending operations. | |
| unsigned | shutdown: 1 |
| A flag indicating whether the I/O service has been shut down. | |
| unsigned | read_posted: 1 |
| A flag indicating whether read_task has been posted to exec. | |
| unsigned | write_posted: 1 |
| A flag indicating whether write_task has been posted to exec. | |
| struct sllist | read_queue |
| The queue containing pending read operations. | |
| struct sllist | write_queue |
| The queue containing pending write operations. | |
| struct ev_task * | current_read |
| The read operation currently being executed. | |
| struct ev_task * | current_write |
| The write operation currently being executed. | |