Lely core libraries  2.2.5
ixxat.h
Go to the documentation of this file.
1 
22 #ifndef LELY_IO2_WIN32_IXXAT_H_
23 #define LELY_IO2_WIN32_IXXAT_H_
24 
25 #include <lely/io2/can.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
40 int io_ixxat_init(void);
41 
48 void io_ixxat_fini(void);
49 
50 void *io_ixxat_ctrl_alloc(void);
51 void io_ixxat_ctrl_free(void *ptr);
52 io_can_ctrl_t *io_ixxat_ctrl_init(io_can_ctrl_t *ctrl, const LUID *lpLuid,
53  UINT32 dwCanNo, int flags, int nominal, int data);
54 void io_ixxat_ctrl_fini(io_can_ctrl_t *ctrl);
55 
76 io_can_ctrl_t *io_ixxat_ctrl_create_from_index(UINT32 dwIndex, UINT32 dwCanNo,
77  int flags, int nominal, int data);
78 
99  UINT32 dwCanNo, int flags, int nominal, int data);
100 
103 
105 HANDLE io_ixxat_ctrl_get_handle(const io_can_ctrl_t *ctrl);
106 
107 void *io_ixxat_chan_alloc(void);
108 void io_ixxat_chan_free(void *ptr);
109 io_can_chan_t *io_ixxat_chan_init(io_can_chan_t *chan, io_ctx_t *ctx,
110  ev_exec_t *exec, int rxtimeo, int txtimeo);
111 void io_ixxat_chan_fini(io_can_chan_t *chan);
112 
135  io_ctx_t *ctx, ev_exec_t *exec, int rxtimeo, int txtimeo);
136 
139 
144 HANDLE io_ixxat_chan_get_handle(const io_can_chan_t *chan);
145 
164 int io_ixxat_chan_open(io_can_chan_t *chan, const io_can_ctrl_t *ctrl,
165  UINT16 wRxFifoSize, UINT16 wTxFifoSize);
166 
182 int io_ixxat_chan_assign(io_can_chan_t *chan, HANDLE hCanChn,
183  UINT32 dwTscClkFreq, UINT32 dwTscDivisor);
184 
195 
200 int io_ixxat_chan_is_open(const io_can_chan_t *chan);
201 
212 
213 #ifdef __cplusplus
214 }
215 #endif
216 
217 #endif // !LELY_IO2_WIN32_IXXAT_H_
io_ixxat_ctrl_get_handle
HANDLE io_ixxat_ctrl_get_handle(const io_can_ctrl_t *ctrl)
Returns the native handle of the CAN controller.
ev_exec_t
const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
Definition: ev.h:29
io_ixxat_fini
void io_ixxat_fini(void)
Frees the "vcinpl.dll" or "vcinpl2.dll" library and terminates the availability of the IXXAT function...
io_ixxat_chan_create
io_can_chan_t * io_ixxat_chan_create(io_ctx_t *ctx, ev_exec_t *exec, int rxtimeo, int txtimeo)
Creates a new IXXAT CAN channel.
io_ixxat_chan_is_open
int io_ixxat_chan_is_open(const io_can_chan_t *chan)
Returns 1 is the CAN channel is open and 0 if not.
io_ixxat_chan_get_handle
HANDLE io_ixxat_chan_get_handle(const io_can_chan_t *chan)
Returns the native handle of the CAN channel, or NULL if the channel is closed.
io_ixxat_chan_destroy
void io_ixxat_chan_destroy(io_can_chan_t *chan)
Destroys an IXXAT CAN channel.
io_can_chan_t
const struct io_can_chan_vtbl *const io_can_chan_t
An abstract CAN channel.
Definition: can.h:59
io_ixxat_chan_release
HANDLE io_ixxat_chan_release(io_can_chan_t *chan)
Dissociates and returns the native handle from a CAN channel.
io_ixxat_ctrl_create_from_luid
io_can_ctrl_t * io_ixxat_ctrl_create_from_luid(const LUID *lpLuid, UINT32 dwCanNo, int flags, int nominal, int data)
Creates a new IXXAT CAN controller from a locally unique identifier (LUID).
io_ixxat_ctrl_create_from_index
io_can_ctrl_t * io_ixxat_ctrl_create_from_index(UINT32 dwIndex, UINT32 dwCanNo, int flags, int nominal, int data)
Creates a new IXXAT CAN controller from a device index.
can.h
io_ixxat_ctrl_destroy
void io_ixxat_ctrl_destroy(io_can_ctrl_t *ctrl)
Destroys an IXXAT CAN controller.
io_ctx
Definition: ctx.c:35
io_ixxat_init
int io_ixxat_init(void)
Loads the "vcinpl.dll" or "vcinpl2.dll" library and makes the IXXAT functions available for use.
io_ixxat_chan_open
int io_ixxat_chan_open(io_can_chan_t *chan, const io_can_ctrl_t *ctrl, UINT16 wRxFifoSize, UINT16 wTxFifoSize)
Opens a CAN channel.
io_ixxat_chan_assign
int io_ixxat_chan_assign(io_can_chan_t *chan, HANDLE hCanChn, UINT32 dwTscClkFreq, UINT32 dwTscDivisor)
Assigns an existing handle to a CAN channel, and activates the channel if necessary.
io_can_ctrl_t
const struct io_can_ctrl_vtbl *const io_can_ctrl_t
An abstract CAN controller.
Definition: can.h:56
io_ixxat_chan_close
int io_ixxat_chan_close(io_can_chan_t *chan)
Closes a CAN channel.