Lely core libraries
2.2.5
|
Go to the documentation of this file.
30 #ifndef LELY_IO2_VCAN_H_
31 #define LELY_IO2_VCAN_H_
40 void *io_vcan_ctrl_alloc(
void);
41 void io_vcan_ctrl_free(
void *ptr);
43 int flags,
int nominal,
int data,
int state);
69 io_clock_t *clock,
int flags,
int nominal,
int data,
int state);
133 void *io_vcan_chan_alloc(
void);
134 void io_vcan_chan_free(
void *ptr);
191 #endif // !LELY_IO2_VCAN_H_
io_can_ctrl_t * io_vcan_chan_get_ctrl(const io_can_chan_t *chan)
Returns a pointer to the virtual CAN controller with which a virtual CAN channel is registered,...
const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
int io_vcan_ctrl_write_err(io_can_ctrl_t *ctrl, const struct can_err *err, int timeout)
Writes a CAN error frame to a all virtual CAN channels registered with a virtual CAN controller.
A CAN or CAN FD format frame.
void io_vcan_chan_destroy(io_can_chan_t *chan)
Destroys a virtual CAN channel.
io_can_chan_t * io_vcan_chan_create(io_ctx_t *ctx, ev_exec_t *exec, size_t rxlen)
Creates a new virtual CAN channel.
io_can_ctrl_t * io_vcan_ctrl_create(io_clock_t *clock, int flags, int nominal, int data, int state)
Creates a new virtual CAN controller.
void io_vcan_ctrl_set_state(io_can_ctrl_t *ctrl, int state)
Sets the state of a virtual CAN bus: one of CAN_STATE_ACTIVE, CAN_STATE_PASSIVE, CAN_STATE_BUSOFF,...
const struct io_can_chan_vtbl *const io_can_chan_t
An abstract CAN channel.
void io_vcan_chan_close(io_can_chan_t *chan)
Closes a virtual CAN channel.
int io_vcan_ctrl_write_msg(io_can_ctrl_t *ctrl, const struct can_msg *msg, int timeout)
Writes a CAN frame to a all virtual CAN channels registered with a virtual CAN controller.
void io_vcan_chan_open(io_can_chan_t *chan, io_can_ctrl_t *ctrl)
Opens a virtual CAN channel by registering it with the specified virtual CAN controller.
void io_vcan_ctrl_destroy(io_can_ctrl_t *ctrl)
Destroys a virtual CAN controller.
const struct io_clock_vtbl *const io_clock_t
An abstract clock.
int io_vcan_chan_is_open(const io_can_chan_t *chan)
Returns 1 if the CAN channel is open and 0 if not.
const struct io_can_ctrl_vtbl *const io_can_ctrl_t
An abstract CAN controller.