Lely core libraries
2.2.5
|
The implementation of a CAN network interface. More...
Data Fields | |
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 ... | |
io_timer_t * | timer |
A pointer to the timer used for CAN network events. | |
io_tqueue_t * | tq |
A pointer to the timer queue used to schedule wait operations. | |
struct io_tqueue_wait | wait_next |
The operation used to wait for the next CANopen event. | |
struct io_tqueue_wait | wait_confirm |
The operation used to wait for a CAN frame write confirmation. | |
int | txtimeo |
The timeout (in milliseconds) when waiting for a CAN frame write confirmation. | |
io_can_chan_t * | chan |
A pointer to a CAN channel. | |
struct can_msg | read_msg |
The CAN frame being read. | |
struct can_err | read_err |
The CAN error frame being read. | |
struct io_can_chan_read | read |
The operation used to read CAN frames. | |
int | read_errc |
The error code of the last read operation. | |
size_t | read_errcnt |
The number of errors since the last successful read operation. | |
int | state |
The current state of the CAN bus. | |
struct can_msg | write_msg |
The CAN frame being written. | |
struct io_can_chan_write | write |
The operation used to write CAN frames. | |
int | write_errc |
The error code of the last write operation. | |
size_t | write_errcnt |
The number of errors since the last successful write operation. | |
struct spscring | tx_ring |
The ring buffer used to control the transmit queue. | |
struct can_msg * | tx_buf |
The transmit queue. | |
size_t | tx_errcnt |
The number of frames dropped due to the transmit queue being full. | |
mtx_t | mtx |
The mutex protecting the callbacks, flags and internal CAN network interface. | |
io_can_net_on_error_func_t * | on_read_error_func |
A pointer to the function invoked when a new CAN frame read error occurs, or when a read operation completes successfully after one or more errors. | |
void * | on_read_error_arg |
The user-specified argument for on_read_error_func. | |
io_can_net_on_error_func_t * | on_queue_error_func |
A pointer to the function invoked when a CAN frame is dropped because the transmit queue is full, or when a frame is successfully queued after one or more errors. | |
void * | on_queue_error_arg |
The user-specified argument for on_queue_error_func. | |
io_can_net_on_error_func_t * | on_write_error_func |
A pointer to the function invoked when a new CAN frame write error occurs, or when a write operation completes successfully after one or more errors. | |
void * | on_write_error_arg |
The user-specified argument for on_write_error_func. | |
io_can_net_on_can_state_func_t * | on_can_state_func |
A pointer to the function to be invoked when a CAN bus state change is detected. | |
void * | on_can_state_arg |
The user-specified argument for #on_state_func. | |
io_can_net_on_can_error_func_t * | on_can_error_func |
A pointer to the function to be invoked when an error is detected on the CAN bus. | |
void * | on_can_error_arg |
The user-specified argument for #on_error_func. | |
unsigned | started: 1 |
A flag indicating wheter the CAN network interface has been started. | |
unsigned | shutdown: 1 |
A flag indicating whether the I/O service has been shut down. | |
unsigned | wait_next_submitted: 1 |
A flag indicating whether wait_next has been submitted to tq. | |
unsigned | wait_confirm_submitted: 1 |
A flag indicating whether wait_confirm has been submitted to tq. | |
unsigned | read_submitted: 1 |
A flag indicating whether read has been submitted to chan. | |
unsigned | write_submitted: 1 |
A flag indicating whether write has been submitted to chan. | |
can_net_t * | net |
A pointer to the internal CAN network interface. | |
struct timespec | next |
The time at which the next CAN timer will trigger. | |