truck-code
can.h
Go to the documentation of this file.
1 
13 #ifndef SRC_JBUS_CAN_H_
14 #define SRC_JBUS_CAN_H_
15 
16 #include "utils/common.h" /* BYTE */
17 #include "jbus/j1939_struct.h"
18 #include <string>
19 
20 
51 extern void can_init(int argc, char *argv[], resmgr_connect_funcs_t *pconn,
52  resmgr_io_funcs_t *pio, IOFUNC_ATTR_T *pattr);
53 
54 
82 extern int can_set_filter(int fd, unsigned long id, unsigned long mask);
83 
84 
94 extern int can_empty_queue(int fd);
95 
96 
123 extern int can_arm(int fd, int channel_id);
124 
125 
146 extern int can_read(intptr_t fd, unsigned long *id, char *extended, void *data,
147  BYTE size);
148 
149 
179 extern int can_write(intptr_t fd, unsigned long id, char extended, void *data,
180  BYTE size);
181 
182 
195 extern int can_send(int fd, j1939_pdu_typ *pdu);
196 
197 
198 #endif /* SRC_JBUS_CAN_H_ */
int can_empty_queue(int fd)
Definition: can.cpp:142
int can_arm(int fd, int channel_id)
Definition: can.cpp:149
int can_set_filter(int fd, unsigned long id, unsigned long mask)
Definition: can.cpp:132
void can_init(int argc, char *argv[], resmgr_connect_funcs_t *pconn, resmgr_io_funcs_t *pio, IOFUNC_ATTR_T *pattr)
Definition: can.cpp:30
int can_read(intptr_t fd, unsigned long *id, char *extended, void *data, BYTE size)
Definition: can.cpp:166
unsigned char BYTE
Definition: common.h:39
int can_send(int fd, j1939_pdu_typ *pdu)
Definition: can.cpp:239
int can_write(intptr_t fd, unsigned long id, char extended, void *data, BYTE size)
Definition: can.cpp:221
Definition: j1939_struct.h:32