libPCBUSB  Version 0.11, Build 1143 of January 31, 2022
macOS Library for PCAN-USB Interfaces
PCBUSB.h
Go to the documentation of this file.
1 /* -- $HeadURL: https://svn.uv-software.net/MacCAN/PCANUSB/Library/trunk/drv/pcan_api.h $ --
2  *
3  * project : CAN - Controller Area Network
4  *
5  * purpose : PCAN Application Programming Interface
6  *
7  * copyright : (C) 2012-2022 by UV Software, Berlin
8  *
9  * compiler : Apple clang version 13.0.0 (clang-1300.0.29.30)
10  *
11  * export : TPCANStatus CAN_Initialize(TPCANHandle Channel, TPCANBaudrate Btr0Btr1, TPCANType HwType, DWORD IOPort, WORD Interrupt);
12  * TPCANStatus CAN_Uninitialize(TPCANHandle Channel);
13  * TPCANStatus CAN_Reset(TPCANHandle Channel);
14  * TPCANStatus CAN_GetStatus(TPCANHandle Channel);
15  * TPCANStatus CAN_Read(TPCANHandle Channel, TPCANMsg* MessageBuffer, TPCANTimestamp* TimestampBuffer);
16  * TPCANStatus CAN_Write(TPCANHandle Channel, TPCANMsg* MessageBuffer);
17  * TPCANStatus CAN_FilterMessages(TPCANHandle Channel, DWORD FromID, DWORD ToID, TPCANMode Mode);
18  * TPCANStatus CAN_GetValue(TPCANHandle Channel, TPCANParameter Parameter, void* Buffer, DWORD BufferLength);
19  * TPCANStatus CAN_SetValue(TPCANHandle Channel, TPCANParameter Parameter, void* Buffer, DWORD BufferLength);
20  * TPCANStatus CAN_GetErrorText(TPCANStatus Error, WORD Language, LPSTR Buffer);
21  * *** CAN FD capable devices ***
22  * TPCANStatus CAN_InitializeFD(TPCANHandle Channel, TPCANBitrateFD BitrateFD);
23  * TPCANStatus CAN_ReadFD(TPCANHandle Channel, TPCANMsgFD* MessageBuffer, TPCANTimestampFD* TimestampBuffer);
24  * TPCANStatus CAN_WriteFD(TPCANHandle Channel, TPCANMsgFD* MessageBuffer);
25  *
26  * includes : (none)
27  *
28  * author : Uwe Vogt, UV Software
29  *
30  * e-mail : uwe.vogt@uv-software.de
31  *
32  *
33  * ----------- description --------------------------------------------
34  *
35  * PCAN API - PEAK CAN Application Programming Interface
36  *
37  * This Application Programming Interface (API) is an almost compatible
38  * implementation of the PEAK PCANBasic DLL on macOS (x86_64 and arm64).
39  *
40  * Supported CAN Interfaces:
41  * - PCAN-USB
42  * - PCAN-USB FD
43  * Up to 8 devices are supported.
44  *
45  * Version of PCAN API:
46  * - Based on PEAK's version of 10/01/21
47  */
48 
49 #ifndef PCAN_API_H_INCLUDED
50 #define PCAN_API_H_INCLUDED
51 
52 /* ----------- includes -----------------------------------------------
53  */
54 
55 #ifdef __APPLE__
56 #include <MacTypes.h> // To map Windows integer types
57 #endif
58 
59 /* ----------- defines ------------------------------------------------
60  */
61 
62 #ifdef __APPLE__
63 #ifndef BYTE
64 #define BYTE UInt8
65 #endif
66 #ifndef WORD
67 #define WORD UInt16
68 #endif
69 #ifndef DWORD
70 #define DWORD UInt32
71 #endif
72 #ifndef UINT64
73 #define UINT64 UInt64
74 #endif
75 #ifndef LPSTR
76 #define LPSTR char*
77 #endif
78 #define __T(s) s
79 #endif
80 
81 /* Defined and supported PCAN channels
82  */
83 #define PCAN_NONEBUS 0x00U
84 
85 #define PCAN_USBBUS1 0x51U
86 #define PCAN_USBBUS2 0x52U
87 #define PCAN_USBBUS3 0x53U
88 #define PCAN_USBBUS4 0x54U
89 #define PCAN_USBBUS5 0x55U
90 #define PCAN_USBBUS6 0x56U
91 #define PCAN_USBBUS7 0x57U
92 #define PCAN_USBBUS8 0x58U
93 #ifndef __APPLE__
94 #define PCAN_USBBUS9 0x509U
95 #define PCAN_USBBUS10 0x50AU
96 #define PCAN_USBBUS11 0x50BU
97 #define PCAN_USBBUS12 0x50CU
98 #define PCAN_USBBUS13 0x50DU
99 #define PCAN_USBBUS14 0x50EU
100 #define PCAN_USBBUS15 0x50FU
101 #define PCAN_USBBUS16 0x510U
102 #endif
103 
104 
105 /* PCAN error and status codes
106  */
107 #define PCAN_ERROR_OK 0x00000U
108 #define PCAN_ERROR_XMTFULL 0x00001U
109 #define PCAN_ERROR_OVERRUN 0x00002U
110 #define PCAN_ERROR_BUSLIGHT 0x00004U
111 #define PCAN_ERROR_BUSHEAVY 0x00008U
112 #define PCAN_ERROR_BUSWARNING PCAN_ERROR_BUSHEAVY
113 #define PCAN_ERROR_BUSPASSIVE 0x40000U
114 #define PCAN_ERROR_BUSOFF 0x00010U
115 #define PCAN_ERROR_ANYBUSERR (PCAN_ERROR_BUSWARNING | PCAN_ERROR_BUSLIGHT | PCAN_ERROR_BUSHEAVY | PCAN_ERROR_BUSOFF | PCAN_ERROR_BUSPASSIVE)
116 #define PCAN_ERROR_QRCVEMPTY 0x00020U
117 #define PCAN_ERROR_QOVERRUN 0x00040U
118 #define PCAN_ERROR_QXMTFULL 0x00080U
119 #define PCAN_ERROR_REGTEST 0x00100U
120 #define PCAN_ERROR_NODRIVER 0x00200U
121 #define PCAN_ERROR_HWINUSE 0x00400U
122 #define PCAN_ERROR_NETINUSE 0x00800U
123 #define PCAN_ERROR_ILLHW 0x01400U
124 #define PCAN_ERROR_ILLNET 0x01800U
125 #define PCAN_ERROR_ILLCLIENT 0x01C00U
126 #define PCAN_ERROR_ILLHANDLE (PCAN_ERROR_ILLHW | PCAN_ERROR_ILLNET | PCAN_ERROR_ILLCLIENT)
127 #define PCAN_ERROR_RESOURCE 0x02000U
128 #define PCAN_ERROR_ILLPARAMTYPE 0x04000U
129 #define PCAN_ERROR_ILLPARAMVAL 0x08000U
130 #define PCAN_ERROR_UNKNOWN 0x10000U
131 #define PCAN_ERROR_ILLDATA 0x20000U
132 #define PCAN_ERROR_ILLMODE 0x80000U
133 #define PCAN_ERROR_CAUTION 0x2000000U
134 #define PCAN_ERROR_INITIALIZE 0x4000000U
135 #define PCAN_ERROR_ILLOPERATION 0x8000000U
136 
137 /* PCAN devices
138  */
139 #define PCAN_NONE 0x00U
140 #define PCAN_PEAKCAN 0x01U
141 #define PCAN_ISA 0x02U
142 #define PCAN_DNG 0x03U
143 #define PCAN_PCI 0x04U
144 #define PCAN_USB 0x05U
145 #define PCAN_PCC 0x06U
146 #define PCAN_VIRTUAL 0x07U
147 #define PCAN_LAN 0x08U
148 
149 /* PCAN parameters
150  */
151 #define PCAN_DEVICE_ID 0x01U
152 #define PCAN_5VOLTS_POWER 0x02U
153 #define PCAN_RECEIVE_EVENT 0x03U
154 #define PCAN_MESSAGE_FILTER 0x04U
155 #define PCAN_API_VERSION 0x05U
156 #define PCAN_CHANNEL_VERSION 0x06U
157 #define PCAN_BUSOFF_AUTORESET 0x07U
158 #define PCAN_LISTEN_ONLY 0x08U
159 #define PCAN_LOG_LOCATION 0x09U
160 #define PCAN_LOG_STATUS 0x0AU
161 #define PCAN_LOG_CONFIGURE 0x0BU
162 #define PCAN_LOG_TEXT 0x0CU
163 #define PCAN_CHANNEL_CONDITION 0x0DU
164 #define PCAN_HARDWARE_NAME 0x0EU
165 #define PCAN_RECEIVE_STATUS 0x0FU
166 #define PCAN_CONTROLLER_NUMBER 0x10U
167 #define PCAN_TRACE_LOCATION 0x11U
168 #define PCAN_TRACE_STATUS 0x12U
169 #define PCAN_TRACE_SIZE 0x13U
170 #define PCAN_TRACE_CONFIGURE 0x14U
171 #define PCAN_CHANNEL_IDENTIFYING 0x15U
172 #define PCAN_CHANNEL_FEATURES 0x16U
173 #define PCAN_BITRATE_ADAPTING 0x17U
174 #define PCAN_BITRATE_INFO 0x18U
175 #define PCAN_BITRATE_INFO_FD 0x19U
176 #define PCAN_BUSSPEED_NOMINAL 0x1AU
177 #define PCAN_BUSSPEED_DATA 0x1BU
178 #define PCAN_IP_ADDRESS 0x1CU
179 #define PCAN_LAN_SERVICE_STATUS 0x1DU
180 #define PCAN_ALLOW_STATUS_FRAMES 0x1EU
181 #define PCAN_ALLOW_RTR_FRAMES 0x1FU
182 #define PCAN_ALLOW_ERROR_FRAMES 0x20U
183 #define PCAN_INTERFRAME_DELAY 0x21U
184 #define PCAN_ACCEPTANCE_FILTER_11BIT 0x22U
185 #define PCAN_ACCEPTANCE_FILTER_29BIT 0x23U
186 #define PCAN_IO_DIGITAL_CONFIGURATION 0x24U
187 #define PCAN_IO_DIGITAL_VALUE 0x25U
188 #define PCAN_IO_DIGITAL_SET 0x26U
189 #define PCAN_IO_DIGITAL_CLEAR 0x27U
190 #define PCAN_IO_ANALOG_VALUE 0x28U
191 #define PCAN_FIRMWARE_VERSION 0x29U
192 #define PCAN_ATTACHED_CHANNELS_COUNT 0x2AU
193 #define PCAN_ATTACHED_CHANNELS 0x2BU
194 #define PCAN_ALLOW_ECHO_FRAMES 0x2CU
195 #define PCAN_DEVICE_PART_NUMBER 0x2DU
196 #define PCAN_EXT_BTR0BTR1 0x80U
197 #define PCAN_EXT_TX_COUNTER 0x81U
198 #define PCAN_EXT_RX_COUNTER 0x82U
199 #define PCAN_EXT_ERR_COUNTER 0x83U
200 #define PCAN_EXT_RX_QUE_OVERRUN 0x84U
201 #define PCAN_EXT_HARDWARE_VERSION 0x85U
202 #define PCAN_EXT_SOFTWARE_VERSION 0x86U
203 #define PCAN_EXT_RECEIVE_CALLBACK 0x87U
204 #define PCAN_EXT_LOG_USB 0x8FU
205 
206 /* DEPRECATED parameters
207  */
208 #define PCAN_DEVICE_NUMBER PCAN_DEVICE_ID
209 
210 /* PCAN parameter values
211  */
212 #define PCAN_PARAMETER_OFF 0x00U
213 #define PCAN_PARAMETER_ON 0x01U
214 #define PCAN_FILTER_CLOSE 0x00U
215 #define PCAN_FILTER_OPEN 0x01U
216 #define PCAN_FILTER_CUSTOM 0x02U
217 #define PCAN_CHANNEL_UNAVAILABLE 0x00U
218 #define PCAN_CHANNEL_AVAILABLE 0x01U
219 #define PCAN_CHANNEL_OCCUPIED 0x02U
220 #define PCAN_CHANNEL_PCANVIEW (PCAN_CHANNEL_AVAILABLE | PCAN_CHANNEL_OCCUPIED)
221 
222 #define LOG_FUNCTION_DEFAULT 0x00U
223 #define LOG_FUNCTION_ENTRY 0x01U
224 #define LOG_FUNCTION_PARAMETERS 0x02U
225 #define LOG_FUNCTION_LEAVE 0x04U
226 #define LOG_FUNCTION_WRITE 0x08U
227 #define LOG_FUNCTION_READ 0x10U
228 #define LOG_FUNCTION_ALL 0xFFFFU
229 
230 #define TRACE_FILE_SINGLE 0x00U
231 #define TRACE_FILE_SEGMENTED 0x01U
232 #define TRACE_FILE_DATE 0x02U
233 #define TRACE_FILE_TIME 0x04U
234 #define TRACE_FILE_OVERWRITE 0x80U
235 
236 #define FEATURE_FD_CAPABLE 0x01U
237 #define FEATURE_DELAY_CAPABLE 0x02U
238 #define FEATURE_IO_CAPABLE 0x04U
239 
240 #define SERVICE_STATUS_STOPPED 0x01U
241 #define SERVICE_STATUS_RUNNING 0x04U
242 
243 /* Other constants
244  */
245 #define MAX_LENGTH_HARDWARE_NAME 33
246 #define MAX_LENGTH_VERSION_STRING 256
247 
248 /* PCAN message types
249  */
250 #define PCAN_MESSAGE_STANDARD 0x00U
251 #define PCAN_MESSAGE_RTR 0x01U
252 #define PCAN_MESSAGE_EXTENDED 0x02U
253 #define PCAN_MESSAGE_FD 0x04U
254 #define PCAN_MESSAGE_BRS 0x08U
255 #define PCAN_MESSAGE_ESI 0x10U
256 #define PCAN_MESSAGE_ECHO 0x20U
257 #define PCAN_MESSAGE_ERRFRAME 0x40U
258 #define PCAN_MESSAGE_STATUS 0x80U
259 
260 /* LookUp Parameters
261  */
262 #define LOOKUP_DEVICE_TYPE __T("devicetype")
263 #define LOOKUP_DEVICE_ID __T("deviceid")
264 #define LOOKUP_CONTROLLER_NUMBER __T("controllernumber")
265 #define LOOKUP_IP_ADDRESS __T("ipaddress")
266 
267 /* Frame Type / Initialization Mode
268  */
269 #define PCAN_MODE_STANDARD PCAN_MESSAGE_STANDARD
270 #define PCAN_MODE_EXTENDED PCAN_MESSAGE_EXTENDED
271 
272 /* Baud rate codes = BTR0/BTR1 register values for the CAN controller.
273  * You can define your own Baud rate with the BTROBTR1 register.
274  * Take a look at www.peak-system.com for their free software "BAUDTOOL"
275  * to calculate the BTROBTR1 register for every bit rate and sample point.
276  */
277 #define PCAN_BAUD_1M 0x0014U
278 #define PCAN_BAUD_800K 0x0016U
279 #define PCAN_BAUD_500K 0x001CU
280 #define PCAN_BAUD_250K 0x011CU
281 #define PCAN_BAUD_125K 0x031CU
282 #define PCAN_BAUD_100K 0x432FU
283 #define PCAN_BAUD_95K 0xC34EU
284 #define PCAN_BAUD_83K 0x852BU
285 #define PCAN_BAUD_50K 0x472FU
286 #define PCAN_BAUD_47K 0x1414U
287 #define PCAN_BAUD_33K 0x8B2FU
288 #define PCAN_BAUD_20K 0x532FU
289 #define PCAN_BAUD_10K 0x672FU
290 #define PCAN_BAUD_5K 0x7F7FU
291 
292 /* Represents the configuration for a CAN bit rate
293  * Note:
294  * * Each parameter and its value must be separated with a '='.
295  * * Each pair of parameter/value must be separated using ','.
296  *
297  * Example:
298  * f_clock=80000000,nom_brp=10,nom_tseg1=5,nom_tseg2=2,nom_sjw=1,data_brp=4,data_tseg1=7,data_tseg2=2,data_sjw=1
299  */
300 #define PCAN_BR_CLOCK __T("f_clock")
301 #define PCAN_BR_CLOCK_MHZ __T("f_clock_mhz")
302 #define PCAN_BR_NOM_BRP __T("nom_brp")
303 #define PCAN_BR_NOM_TSEG1 __T("nom_tseg1")
304 #define PCAN_BR_NOM_TSEG2 __T("nom_tseg2")
305 #define PCAN_BR_NOM_SJW __T("nom_sjw")
306 #define PCAN_BR_NOM_SAMPLE __T("nom_sam")
307 #define PCAN_BR_DATA_BRP __T("data_brp")
308 #define PCAN_BR_DATA_TSEG1 __T("data_tseg1")
309 #define PCAN_BR_DATA_TSEG2 __T("data_tseg2")
310 #define PCAN_BR_DATA_SJW __T("data_sjw")
311 #define PCAN_BR_DATA_SAMPLE __T("data_ssp_offset")
312 
313 /* ----------- types --------------------------------------------------
314  */
315 
316 #define TPCANHandle WORD
317 #define TPCANStatus DWORD
318 #define TPCANParameter BYTE
319 #define TPCANDevice BYTE
320 #define TPCANMessageType BYTE
321 #define TPCANType BYTE
322 #define TPCANMode BYTE
323 #define TPCANBaudrate WORD
324 #define TPCANBitrateFD LPSTR
325 #define TPCANTimestampFD UINT64
326 
327 
329 typedef struct tagTPCANMsg
330 {
331  DWORD ID;
333  BYTE LEN;
334  BYTE DATA[8];
335 } TPCANMsg;
336 
340 typedef struct tagTPCANTimestamp
341 {
342  DWORD millis;
344  WORD micros;
346 
349 typedef struct tagTPCANMsgFD
350 {
351  DWORD ID;
353  BYTE DLC;
354  BYTE DATA[64];
355 } TPCANMsgFD;
356 
360 {
366  DWORD device_id;
369 
370 
371 /* ----------- variables ----------------------------------------------
372  */
373 
374 
375 /* ----------- prototypes ---------------------------------------------
376  */
377 
378 #ifdef __cplusplus
379 extern "C" {
380 #define _DEF_ARG =0
381 #else
382 #define _DEF_ARG
383 #endif
384 
396  TPCANHandle Channel,
397  TPCANBaudrate Btr0Btr1,
398  TPCANType HwType _DEF_ARG,
399  DWORD IOPort _DEF_ARG,
400  WORD Interrupt _DEF_ARG);
401 
422  TPCANHandle Channel,
423  TPCANBitrateFD BitrateFD);
424 
434  TPCANHandle Channel);
435 
445  TPCANHandle Channel);
446 
454  TPCANHandle Channel);
455 
466  TPCANHandle Channel,
467  TPCANMsg* MessageBuffer,
468  TPCANTimestamp* TimestampBuffer);
469 
480  TPCANHandle Channel,
481  TPCANMsgFD* MessageBuffer,
482  TPCANTimestampFD* TimestampBuffer);
483 
492  TPCANHandle Channel,
493  TPCANMsg* MessageBuffer);
494 
503  TPCANHandle Channel,
504  TPCANMsgFD* MessageBuffer);
505 
519  TPCANHandle Channel,
520  DWORD FromID,
521  DWORD ToID,
522  TPCANMode Mode);
523 
537  TPCANHandle Channel,
538  TPCANParameter Parameter,
539  void* Buffer,
540  DWORD BufferLength);
541 
542 
556  TPCANHandle Channel,
557  TPCANParameter Parameter,
558  void* Buffer,
559  DWORD BufferLength);
560 
573  TPCANStatus Error,
574  WORD Language,
575  LPSTR Buffer);
576 
586  LPSTR Parameters,
587  TPCANHandle* FoundChannel);
588 
589 #ifdef __cplusplus
590 }
591 #endif
592 #endif /* PCAN_API_H_INCLUDED */
593 
594 /* ----------------------------------------------------------------------
595  * Uwe Vogt, UV Software, Chausseestrasse 33 A, 10115 Berlin, Germany
596  * Tel.: +49-30-46799872, Fax: +49-30-46799873, Mobile: +49-170-3801903
597  * E-Mail: uwe.vogt@uv-software.de, Homepage: http://www.uv-software.de/
598  */
tagTPCANMsgFD::MSGTYPE
TPCANMessageType MSGTYPE
Type of the message.
Definition: PCBUSB.h:352
CAN_Write
TPCANStatus CAN_Write(TPCANHandle Channel, TPCANMsg *MessageBuffer)
Transmits a CAN message.
CAN_FilterMessages
TPCANStatus CAN_FilterMessages(TPCANHandle Channel, DWORD FromID, DWORD ToID, TPCANMode Mode)
Configures the reception filter.
CAN_GetErrorText
TPCANStatus CAN_GetErrorText(TPCANStatus Error, WORD Language, LPSTR Buffer)
Returns a descriptive text of a given TPCANStatus error code, in any desired language.
TPCANMsg
struct tagTPCANMsg TPCANMsg
CAN_GetStatus
TPCANStatus CAN_GetStatus(TPCANHandle Channel)
Gets the current status of a PCAN Channel.
_DEF_ARG
#define _DEF_ARG
Definition: PCBUSB.h:382
CAN_Reset
TPCANStatus CAN_Reset(TPCANHandle Channel)
Resets the receive and transmit queues of the PCAN Channel.
CAN_Read
TPCANStatus CAN_Read(TPCANHandle Channel, TPCANMsg *MessageBuffer, TPCANTimestamp *TimestampBuffer)
Reads a CAN message from the receive queue of a PCAN Channel.
TPCANChannelInformation
struct tagTPCANChannelInformation TPCANChannelInformation
tagTPCANChannelInformation::device_id
DWORD device_id
Device number.
Definition: PCBUSB.h:366
MAX_LENGTH_HARDWARE_NAME
#define MAX_LENGTH_HARDWARE_NAME
Maximum length of the name of a device: 32 characters + terminator.
Definition: PCBUSB.h:245
TPCANTimestamp
struct tagTPCANTimestamp TPCANTimestamp
CAN_SetValue
TPCANStatus CAN_SetValue(TPCANHandle Channel, TPCANParameter Parameter, void *Buffer, DWORD BufferLength)
Configures or sets a PCAN Channel value.
CAN_WriteFD
TPCANStatus CAN_WriteFD(TPCANHandle Channel, TPCANMsgFD *MessageBuffer)
Transmits a CAN message over a FD capable PCAN Channel.
TPCANDevice
#define TPCANDevice
PCAN device.
Definition: PCBUSB.h:319
TPCANStatus
#define TPCANStatus
PCAN status/error code (ATTENTION: changed from 64-bit to 32-bit)
Definition: PCBUSB.h:317
CAN_GetValue
TPCANStatus CAN_GetValue(TPCANHandle Channel, TPCANParameter Parameter, void *Buffer, DWORD BufferLength)
Retrieves a PCAN Channel value.
tagTPCANTimestamp::millis_overflow
WORD millis_overflow
Roll-arounds of millis.
Definition: PCBUSB.h:343
tagTPCANChannelInformation::device_name
char device_name[MAX_LENGTH_HARDWARE_NAME]
Device name.
Definition: PCBUSB.h:365
tagTPCANMsg::MSGTYPE
TPCANMessageType MSGTYPE
Type of the message.
Definition: PCBUSB.h:332
tagTPCANChannelInformation::device_type
TPCANDevice device_type
Kind of PCAN device.
Definition: PCBUSB.h:362
CAN_InitializeFD
TPCANStatus CAN_InitializeFD(TPCANHandle Channel, TPCANBitrateFD BitrateFD)
Initializes a FD capable PCAN Channel.
CAN_LookUpChannel
TPCANStatus CAN_LookUpChannel(LPSTR Parameters, TPCANHandle *FoundChannel)
Finds a PCAN-Basic channel that matches with the given parameters.
tagTPCANChannelInformation
Definition: PCBUSB.h:359
tagTPCANChannelInformation::channel_condition
DWORD channel_condition
Availability status of a PCAN-Channel.
Definition: PCBUSB.h:367
tagTPCANChannelInformation::device_features
DWORD device_features
Device capabilities flag (see FEATURE_*)
Definition: PCBUSB.h:364
TPCANType
#define TPCANType
The type of PCAN hardware to be initialized.
Definition: PCBUSB.h:321
tagTPCANTimestamp::micros
WORD micros
Microseconds: 0..999.
Definition: PCBUSB.h:344
tagTPCANChannelInformation::controller_number
BYTE controller_number
CAN-Controller number.
Definition: PCBUSB.h:363
TPCANMessageType
#define TPCANMessageType
The type of a PCAN message.
Definition: PCBUSB.h:320
tagTPCANMsg
Definition: PCBUSB.h:329
TPCANTimestampFD
#define TPCANTimestampFD
timestamp of a received PCAN FD message
Definition: PCBUSB.h:325
CAN_Initialize
TPCANStatus CAN_Initialize(TPCANHandle Channel, TPCANBaudrate Btr0Btr1, TPCANType HwType _DEF_ARG, DWORD IOPort _DEF_ARG, WORD Interrupt _DEF_ARG)
Initializes a PCAN Channel.
CAN_Uninitialize
TPCANStatus CAN_Uninitialize(TPCANHandle Channel)
Uninitializes one or all PCAN Channels initialized by CAN_Initialize.
TPCANHandle
#define TPCANHandle
PCAN hardware channel handle.
Definition: PCBUSB.h:316
tagTPCANMsg::DATA
BYTE DATA[8]
Data of the message (DATA[0]..DATA[7])
Definition: PCBUSB.h:334
TPCANMsgFD
struct tagTPCANMsgFD TPCANMsgFD
tagTPCANMsgFD
Definition: PCBUSB.h:349
tagTPCANChannelInformation::channel_handle
TPCANHandle channel_handle
PCAN channel handle.
Definition: PCBUSB.h:361
CAN_ReadFD
TPCANStatus CAN_ReadFD(TPCANHandle Channel, TPCANMsgFD *MessageBuffer, TPCANTimestampFD *TimestampBuffer)
Reads a CAN message from the receive queue of a FD capable PCAN Channel.
tagTPCANTimestamp::millis
DWORD millis
Base-value: milliseconds: 0.. 2^32-1 (ATTENTION: changed from 64-bit to 32-bit)
Definition: PCBUSB.h:342
TPCANBitrateFD
#define TPCANBitrateFD
PCAN-FD bit rate string.
Definition: PCBUSB.h:324
TPCANMode
#define TPCANMode
PCAN filter mode.
Definition: PCBUSB.h:322
tagTPCANMsgFD::DATA
BYTE DATA[64]
Data of the message (DATA[0]..DATA[63])
Definition: PCBUSB.h:354
tagTPCANMsgFD::ID
DWORD ID
11/29-bit message identifier (ATTENTION: changed to 32-bit)
Definition: PCBUSB.h:351
TPCANBaudrate
#define TPCANBaudrate
PCAN Baud rate register value.
Definition: PCBUSB.h:323
tagTPCANTimestamp
Definition: PCBUSB.h:340
tagTPCANMsgFD::DLC
BYTE DLC
Data Length Code of the message (0..15)
Definition: PCBUSB.h:353
tagTPCANMsg::ID
DWORD ID
11/29-bit message identifier (ATTENTION: changed from 64-bit to 32-bit)
Definition: PCBUSB.h:331
TPCANParameter
#define TPCANParameter
PCAN parameter to be read or set.
Definition: PCBUSB.h:318
tagTPCANMsg::LEN
BYTE LEN
Data Length Code of the message (0..8)
Definition: PCBUSB.h:333