Go to the documentation of this file.
28 #if ((__GNUC__ > 2) || (__GNUC__ > 2) && (__GNUC_MINOR__ >= 1))
29 # define NTCAN_GCCATTR_DEPRECATED __attribute__((deprecated))
31 # define NTCAN_GCCATTR_DEPRECATED
49 #define NTCAN_EV_BASE 0x40000000
50 #define NTCAN_EV_USER 0x40000080
51 #define NTCAN_EV_LAST 0x400000FF
53 #define NTCAN_20B_BASE 0x20000000
55 #define NTCAN_RTR 0x10
56 #define NTCAN_NO_DATA 0x20
57 #define NTCAN_INTERACTION 0x20
59 #define NTCAN_EV_CAN_ERROR NTCAN_EV_BASE
60 #define NTCAN_EV_BAUD_CHANGE (NTCAN_EV_BASE + 0x1)
61 #define NTCAN_EV_CAN_ERROR_EXT (NTCAN_EV_BASE + 0x2)
64 #define NTCAN_MODE_OVERLAPPED 0x20000000
65 #define NTCAN_MODE_OBJECT 0x10000000
68 #define NTCAN_MAX_TX_QUEUESIZE 2047
69 #define NTCAN_MAX_RX_QUEUESIZE 2047
70 #define NTCAN_NO_QUEUE -1
73 #define NTCAN_NO_BAUDRATE 0x7FFFFFFF
74 #define NTCAN_AUTOBAUD 0x7FFFFFFE
77 #define NTCAN_BAUD_1000 0x0
78 #define NTCAN_BAUD_800 0xE
79 #define NTCAN_BAUD_500 0x2
80 #define NTCAN_BAUD_250 0x4
81 #define NTCAN_BAUD_125 0x6
82 #define NTCAN_BAUD_100 0x7
83 #define NTCAN_BAUD_50 0x9
84 #define NTCAN_BAUD_20 0xB
85 #define NTCAN_BAUD_10 0xD
87 #define NTCAN_USER_BAUD 0x80000000
88 #define NTCAN_USER_BAUDRATE 0x80000000
89 #define NTCAN_LISTEN_ONLY_MODE 0x40000000
90 #define NTCAN_USER_BAUDRATE_NUM 0x20000000
93 #define NTCAN_ERRNO_BASE 0x00000100
95 #define NTCAN_SUCCESS 0
97 #define NTCAN_RX_TIMEOUT (NTCAN_ERRNO_BASE +1)
98 #define NTCAN_TX_TIMEOUT (NTCAN_ERRNO_BASE +2)
100 #define NTCAN_TX_ERROR (NTCAN_ERRNO_BASE +4)
101 #define NTCAN_CONTR_OFF_BUS (NTCAN_ERRNO_BASE +5)
102 #define NTCAN_CONTR_BUSY (NTCAN_ERRNO_BASE +6)
103 #define NTCAN_CONTR_WARN (NTCAN_ERRNO_BASE +7)
104 #define NTCAN_NO_ID_ENABLED (NTCAN_ERRNO_BASE +9)
105 #define NTCAN_ID_ALREADY_ENABLED (NTCAN_ERRNO_BASE +10)
106 #define NTCAN_ID_NOT_ENABLED (NTCAN_ERRNO_BASE +11)
108 #define NTCAN_INVALID_FIRMWARE (NTCAN_ERRNO_BASE +13)
109 #define NTCAN_MESSAGE_LOST (NTCAN_ERRNO_BASE +14)
110 #define NTCAN_INVALID_HARDWARE (NTCAN_ERRNO_BASE +15)
112 #define NTCAN_PENDING_WRITE (NTCAN_ERRNO_BASE +16)
113 #define NTCAN_PENDING_READ (NTCAN_ERRNO_BASE +17)
114 #define NTCAN_INVALID_DRIVER (NTCAN_ERRNO_BASE +18)
116 #define NTCAN_SOCK_CONN_TIMEOUT (NTCAN_ERRNO_BASE + 0x80)
117 #define NTCAN_SOCK_CMD_TIMEOUT (NTCAN_ERRNO_BASE + 0x81)
118 #define NTCAN_SOCK_HOST_NOT_FOUND (NTCAN_ERRNO_BASE + 0x82)
120 #define NTCAN_INVALID_PARAMETER EINVAL
121 #define NTCAN_INVALID_HANDLE EBADFD
124 #define NTCAN_NET_NOT_FOUND ENODEV
125 #define NTCAN_INSUFFICIENT_RESOURCES ENOMEM
127 #define NTCAN_OPERATION_ABORTED EINTR
128 #define NTCAN_WRONG_DEVICE_STATE (NTCAN_ERRNO_BASE +19)
129 #define NTCAN_HANDLE_FORCED_CLOSE (NTCAN_ERRNO_BASE +20)
130 #define NTCAN_NOT_IMPLEMENTED ENOSYS
131 #define NTCAN_NOT_SUPPORTED (NTCAN_ERRNO_BASE +21)
132 #define NTCAN_CONTR_ERR_PASSIVE (NTCAN_ERRNO_BASE +22)
143 #ifndef NTCAN_CLEAN_NAMESPACE
203 #define NTCAN_FEATURE_FULL_CAN (1<<0)
204 #define NTCAN_FEATURE_BASIC_20B (1<<1)
205 #define NTCAN_FEATURE_DEVICE_NET (1<<2)
206 #define NTCAN_FEATURE_CYCLIC_TX (1<<3)
207 #define NTCAN_FEATURE_RX_OBJECT_MODE (1<<4)
208 #define NTCAN_FEATURE_TIMESTAMP (1<<5)
209 #define NTCAN_FEATURE_LISTEN_ONLY_MODE (1<<6)
210 #define NTCAN_FEATURE_SMART_DISCONNECT (1<<7)
213 #define NTCAN_BUSSTATE_OK 0x00
214 #define NTCAN_BUSSTATE_WARN 0x40
215 #define NTCAN_BUSSTATE_ERRPASSIVE 0x80
216 #define NTCAN_BUSSTATE_BUSOFF 0xC0
221 #define NTCAN_IOCTL_FLUSH_RX_FIFO 0x0001
222 #define NTCAN_IOCTL_GET_RX_MSG_COUNT 0x0002
223 #define NTCAN_IOCTL_GET_RX_TIMEOUT 0x0003
224 #define NTCAN_IOCTL_GET_TX_TIMEOUT 0x0004
230 #define NTCAN_IOCTL_SET_20B_HND_FILTER 0x0005
231 #define NTCAN_IOCTL_GET_SERIAL 0x0006
232 #define NTCAN_IOCTL_GET_TIMESTAMP_FREQ 0x0007
233 #define NTCAN_IOCTL_GET_TIMESTAMP 0x0008
234 #define NTCAN_IOCTL_ABORT_RX 0x0009
235 #define NTCAN_IOCTL_ABORT_TX 0x000A
236 #define NTCAN_IOCTL_SET_RX_TIMEOUT 0x000B
237 #define NTCAN_IOCTL_SET_TX_TIMEOUT 0x000C
238 #define NTCAN_IOCTL_TX_OBJ_CREATE 0x000D
239 #define NTCAN_IOCTL_TX_OBJ_AUTOANSWER_ON 0x000E
240 #define NTCAN_IOCTL_TX_OBJ_AUTOANSWER_OFF 0x000F
241 #define NTCAN_IOCTL_TX_OBJ_UPDATE 0x0010
242 #define NTCAN_IOCTL_TX_OBJ_DESTROY 0x0011
244 #define NTCAN_IOCTL_TX_OBJ_SCHEDULE_START 0x0013
245 #define NTCAN_IOCTL_TX_OBJ_SCHEDULE_STOP 0x0014
246 #define NTCAN_IOCTL_TX_OBJ_SCHEDULE 0x0015
EXPORT NTCAN_RESULT CALLTYPE canSendT(NTCAN_HANDLE handle, CMSG_T *cmsg, int32_t *len)
#define NTCAN_GCCATTR_DEPRECATED
EXPORT NTCAN_RESULT CALLTYPE canSendEvent(NTCAN_HANDLE handle, EVMSG *evmsg)
EXPORT NTCAN_RESULT CALLTYPE canIdDelete(NTCAN_HANDLE handle, int32_t id)
EXPORT NTCAN_RESULT CALLTYPE canSend(NTCAN_HANDLE handle, CMSG *cmsg, int32_t *len)
EXPORT NTCAN_RESULT CALLTYPE canStatus(NTCAN_HANDLE handle, CAN_IF_STATUS *cstat)
EXPORT NTCAN_RESULT CALLTYPE canGetOverlappedResult(NTCAN_HANDLE handle, OVERLAPPED *ovrlppd, int32_t *len, int32_t bWait)
EXPORT NTCAN_RESULT CALLTYPE canReadEvent(NTCAN_HANDLE handle, EVMSG *evmsg, OVERLAPPED *ovrlppd)
EXPORT NTCAN_RESULT CALLTYPE canWrite(NTCAN_HANDLE handle, CMSG *cmsg, int32_t *len, OVERLAPPED *ovrlppd)
EXPORT NTCAN_RESULT CALLTYPE canReadT(NTCAN_HANDLE handle, CMSG_T *cmsg_t, int32_t *len, OVERLAPPED *ovrlppd)
EXPORT NTCAN_RESULT CALLTYPE canSetBaudrate(NTCAN_HANDLE handle, uint32_t baud)
EXPORT NTCAN_RESULT CALLTYPE canOpen(int32_t net, uint32_t flags, int32_t txqueuesize, int32_t rxqueuesize, int32_t txtimeout, int32_t rxtimeout, NTCAN_HANDLE *handle)
EXPORT NTCAN_RESULT CALLTYPE canIoctl(NTCAN_HANDLE handle, uint32_t ulCmd, void *pArg)
EXPORT NTCAN_RESULT CALLTYPE canGetBaudrate(NTCAN_HANDLE handle, uint32_t *baud)
EXPORT NTCAN_RESULT CALLTYPE canClose(NTCAN_HANDLE handle)
EXPORT NTCAN_RESULT CALLTYPE canRead(NTCAN_HANDLE handle, CMSG *cmsg, int32_t *len, OVERLAPPED *ovrlppd)
EXPORT NTCAN_RESULT CALLTYPE canTakeT(NTCAN_HANDLE handle, CMSG_T *cmsg_t, int32_t *len)
EXPORT NTCAN_RESULT CALLTYPE canTake(NTCAN_HANDLE handle, CMSG *cmsg, int32_t *len)
EXPORT NTCAN_RESULT CALLTYPE canWriteT(NTCAN_HANDLE handle, CMSG_T *cmsg, int32_t *len, OVERLAPPED *ovrlppd)
EXPORT NTCAN_RESULT CALLTYPE canIdAdd(NTCAN_HANDLE handle, int32_t id)
libntcan
Author(s): Florian Weisshardt
autogenerated on Fri Aug 2 2024 09:40:26