![]() |
libPCBUSB
Version 0.13, Build 1978 of July 28, 2024
macOS Library for PCAN-USB Interfaces
|
Go to the source code of this file.
Data Structures | |
| struct | tagTPCANMsg |
| struct | tagTPCANTimestamp |
| struct | tagTPCANMsgFD |
| struct | tagTPCANChannelInformation |
Macros | |
| #define | PCAN_NONEBUS |
| Undefined/default value for a PCAN bus. More... | |
| #define | PCAN_USBBUS1 |
| PCAN-USB interface, channel 1. More... | |
| #define | PCAN_USBBUS2 |
| PCAN-USB interface, channel 2. More... | |
| #define | PCAN_USBBUS3 |
| PCAN-USB interface, channel 3. More... | |
| #define | PCAN_USBBUS4 |
| PCAN-USB interface, channel 4. More... | |
| #define | PCAN_USBBUS5 |
| PCAN-USB interface, channel 5. More... | |
| #define | PCAN_USBBUS6 |
| PCAN-USB interface, channel 6. More... | |
| #define | PCAN_USBBUS7 |
| PCAN-USB interface, channel 7. More... | |
| #define | PCAN_USBBUS8 |
| PCAN-USB interface, channel 8. More... | |
| #define | PCAN_USBBUS9 |
| PCAN-USB interface, channel 9. More... | |
| #define | PCAN_USBBUS10 |
| PCAN-USB interface, channel 10. More... | |
| #define | PCAN_USBBUS11 |
| PCAN-USB interface, channel 11. More... | |
| #define | PCAN_USBBUS12 |
| PCAN-USB interface, channel 12. More... | |
| #define | PCAN_USBBUS13 |
| PCAN-USB interface, channel 13. More... | |
| #define | PCAN_USBBUS14 |
| PCAN-USB interface, channel 14. More... | |
| #define | PCAN_USBBUS15 |
| PCAN-USB interface, channel 15. More... | |
| #define | PCAN_USBBUS16 |
| PCAN-USB interface, channel 16. More... | |
| #define | PCAN_ERROR_OK |
| No error. More... | |
| #define | PCAN_ERROR_XMTFULL |
| Transmit buffer in CAN controller is full. More... | |
| #define | PCAN_ERROR_OVERRUN |
| CAN controller was read too late. More... | |
| #define | PCAN_ERROR_BUSLIGHT |
| Bus error: an error counter reached the 'light' limit. More... | |
| #define | PCAN_ERROR_BUSHEAVY |
| Bus error: an error counter reached the 'heavy' limit. More... | |
| #define | PCAN_ERROR_BUSWARNING |
| Bus error: an error counter reached the 'warning' limit. More... | |
| #define | PCAN_ERROR_BUSPASSIVE |
| Bus error: the CAN controller is error passive. More... | |
| #define | PCAN_ERROR_BUSOFF |
| Bus error: the CAN controller is in bus-off state. More... | |
| #define | PCAN_ERROR_ANYBUSERR |
| Mask for all bus errors. More... | |
| #define | PCAN_ERROR_QRCVEMPTY |
| Receive queue is empty. More... | |
| #define | PCAN_ERROR_QOVERRUN |
| Receive queue was read too late. More... | |
| #define | PCAN_ERROR_QXMTFULL |
| Transmit queue is full. More... | |
| #define | PCAN_ERROR_REGTEST |
| Test of the CAN controller hardware registers failed (no hardware found) More... | |
| #define | PCAN_ERROR_NODRIVER |
| Driver not loaded. More... | |
| #define | PCAN_ERROR_HWINUSE |
| Hardware already in use by a Net. More... | |
| #define | PCAN_ERROR_NETINUSE |
| A Client is already connected to the Net. More... | |
| #define | PCAN_ERROR_ILLHW |
| Hardware handle is invalid. More... | |
| #define | PCAN_ERROR_ILLNET |
| Net handle is invalid. More... | |
| #define | PCAN_ERROR_ILLCLIENT |
| Client handle is invalid. More... | |
| #define | PCAN_ERROR_ILLHANDLE |
| Mask for all handle errors. More... | |
| #define | PCAN_ERROR_RESOURCE |
| Resource (FIFO, Client, timeout) cannot be created. More... | |
| #define | PCAN_ERROR_ILLPARAMTYPE |
| Invalid parameter. More... | |
| #define | PCAN_ERROR_ILLPARAMVAL |
| Invalid parameter value. More... | |
| #define | PCAN_ERROR_UNKNOWN |
| Unknown error. More... | |
| #define | PCAN_ERROR_ILLDATA |
| Invalid data, function, or action. More... | |
| #define | PCAN_ERROR_ILLMODE |
| Driver object state is wrong for the attempted operation. More... | |
| #define | PCAN_ERROR_CAUTION |
| An operation was successfully carried out, however, irregularities were registered. More... | |
| #define | PCAN_ERROR_INITIALIZE |
| Channel is not initialized [Value was changed from 0x40000 to 0x4000000]. More... | |
| #define | PCAN_ERROR_ILLOPERATION |
| Invalid operation [Value was changed from 0x80000 to 0x8000000]. More... | |
| #define | PCAN_NONE |
| Undefined, unknown or not selected PCAN device value. More... | |
| #define | PCAN_PEAKCAN |
| PCAN Non-PnP devices. NOT USED WITHIN PCAN-Basic API. More... | |
| #define | PCAN_ISA |
| PCAN-ISA, PCAN-PC/104, and PCAN-PC/104-Plus. More... | |
| #define | PCAN_DNG |
| PCAN-Dongle. More... | |
| #define | PCAN_PCI |
| PCAN-PCI, PCAN-cPCI, PCAN-miniPCI, and PCAN-PCI Express. More... | |
| #define | PCAN_USB |
| PCAN-USB and PCAN-USB Pro. More... | |
| #define | PCAN_PCC |
| PCAN-PC Card. More... | |
| #define | PCAN_VIRTUAL |
| PCAN Virtual hardware. NOT USED WITHIN PCAN-Basic API. More... | |
| #define | PCAN_LAN |
| PCAN Gateway devices. More... | |
| #define | PCAN_DEVICE_ID |
| Device identifier parameter. More... | |
| #define | PCAN_5VOLTS_POWER |
| 5-Volt power parameter More... | |
| #define | PCAN_RECEIVE_EVENT |
| PCAN receive event handler parameter. More... | |
| #define | PCAN_MESSAGE_FILTER |
| PCAN message filter parameter. More... | |
| #define | PCAN_API_VERSION |
| PCAN-Basic API version parameter. More... | |
| #define | PCAN_CHANNEL_VERSION |
| PCAN device channel version parameter. More... | |
| #define | PCAN_BUSOFF_AUTORESET |
| PCAN Reset-On-Busoff parameter. More... | |
| #define | PCAN_LISTEN_ONLY |
| PCAN Listen-Only parameter. More... | |
| #define | PCAN_LOG_LOCATION |
| Directory path for log files. More... | |
| #define | PCAN_LOG_STATUS |
| Debug-Log activation status. More... | |
| #define | PCAN_LOG_CONFIGURE |
| Configuration of the debugged information (LOG_FUNCTION_***) More... | |
| #define | PCAN_LOG_TEXT |
| Custom insertion of text into the log file. More... | |
| #define | PCAN_CHANNEL_CONDITION |
| Availability status of a PCAN-Channel. More... | |
| #define | PCAN_HARDWARE_NAME |
| PCAN hardware name parameter. More... | |
| #define | PCAN_RECEIVE_STATUS |
| Message reception status of a PCAN-Channel. More... | |
| #define | PCAN_CONTROLLER_NUMBER |
| CAN-Controller number of a PCAN-Channel. More... | |
| #define | PCAN_TRACE_LOCATION |
| Directory path for PCAN trace files. More... | |
| #define | PCAN_TRACE_STATUS |
| CAN tracing activation status. More... | |
| #define | PCAN_TRACE_SIZE |
| Configuration of the maximum file size of a CAN trace. More... | |
| #define | PCAN_TRACE_CONFIGURE |
| Configuration of the trace file storing mode (TRACE_FILE_***) More... | |
| #define | PCAN_CHANNEL_IDENTIFYING |
| Physical identification of a USB based PCAN-Channel by blinking its associated LED. More... | |
| #define | PCAN_CHANNEL_FEATURES |
| Capabilities of a PCAN device (FEATURE_***) More... | |
| #define | PCAN_BITRATE_ADAPTING |
| Using of an existing bit rate (PCAN-View connected to a channel) More... | |
| #define | PCAN_BITRATE_INFO |
| Configured bit rate as Btr0Btr1 value. More... | |
| #define | PCAN_BITRATE_INFO_FD |
| Configured bit rate as TPCANBitrateFD string. More... | |
| #define | PCAN_BUSSPEED_NOMINAL |
| Configured nominal CAN Bus speed as Bits per seconds. More... | |
| #define | PCAN_BUSSPEED_DATA |
| Configured CAN data speed as Bits per seconds. More... | |
| #define | PCAN_IP_ADDRESS |
| Remote address of a LAN channel as string in IPv4 format. More... | |
| #define | PCAN_LAN_SERVICE_STATUS |
| Status of the Virtual PCAN-Gateway Service. More... | |
| #define | PCAN_ALLOW_STATUS_FRAMES |
| Status messages reception status within a PCAN-Channel. More... | |
| #define | PCAN_ALLOW_RTR_FRAMES |
| RTR messages reception status within a PCAN-Channel. More... | |
| #define | PCAN_ALLOW_ERROR_FRAMES |
| Error messages reception status within a PCAN-Channel. More... | |
| #define | PCAN_INTERFRAME_DELAY |
| Delay, in microseconds, between sending frames. More... | |
| #define | PCAN_ACCEPTANCE_FILTER_11BIT |
| Filter over code and mask patterns for 11-Bit messages. More... | |
| #define | PCAN_ACCEPTANCE_FILTER_29BIT |
| Filter over code and mask patterns for 29-Bit messages. More... | |
| #define | PCAN_IO_DIGITAL_CONFIGURATION |
| Output mode of 32 digital I/O pin of a PCAN-USB Chip. 1: Output-Active 0 : Output Inactive. More... | |
| #define | PCAN_IO_DIGITAL_VALUE |
| Value assigned to a 32 digital I/O pins of a PCAN-USB Chip. More... | |
| #define | PCAN_IO_DIGITAL_SET |
| Value assigned to a 32 digital I/O pins of a PCAN-USB Chip - Multiple digital I/O pins to 1 = High. More... | |
| #define | PCAN_IO_DIGITAL_CLEAR |
| Clear multiple digital I/O pins to 0. More... | |
| #define | PCAN_IO_ANALOG_VALUE |
| Get value of a single analog input pin. More... | |
| #define | PCAN_FIRMWARE_VERSION |
| Get the version of the firmware used by the device associated with a PCAN-Channel. More... | |
| #define | PCAN_ATTACHED_CHANNELS_COUNT |
| Get the amount of PCAN channels attached to a system. More... | |
| #define | PCAN_ATTACHED_CHANNELS |
| Get information about PCAN channels attached to a system. More... | |
| #define | PCAN_ALLOW_ECHO_FRAMES |
| Echo messages reception status within a PCAN-Channel. More... | |
| #define | PCAN_DEVICE_PART_NUMBER |
| Get the part number associated to a device. More... | |
| #define | PCAN_HARD_RESET_STATUS |
| Activation status of hard reset processing via CAN_Reset calls. More... | |
| #define | PCAN_LAN_CHANNEL_DIRECTION |
| Communication direction of a PCAN-Channel representing a PCAN-LAN interface. More... | |
| #define | PCAN_EXT_BTR0BTR1 |
| UVS: bit-timing register. More... | |
| #define | PCAN_EXT_TX_COUNTER |
| UVS: number of transmitted frames. More... | |
| #define | PCAN_EXT_RX_COUNTER |
| UVS: number of received frames. More... | |
| #define | PCAN_EXT_ERR_COUNTER |
| UVS: number of error frames. More... | |
| #define | PCAN_EXT_RX_QUE_OVERRUN |
| UVS: receive queue overrun counter. More... | |
| #define | PCAN_EXT_HARDWARE_VERSION |
| UVS: version number of the interface firmware. More... | |
| #define | PCAN_EXT_SOFTWARE_VERSION |
| UVS: version number of the driver respectively library. More... | |
| #define | PCAN_EXT_RECEIVE_CALLBACK |
| UVS: callback function called on the reception of an URB. More... | |
| #define | PCAN_EXT_LOG_USB |
| UVS: Log USB communication (URB buffer <==> CAN messages) More... | |
| #define | PCAN_DEVICE_NUMBER |
| Deprecated parameter. Use PCAN_DEVICE_ID instead. More... | |
| #define | PCAN_PARAMETER_OFF |
| The PCAN parameter is not set (inactive) More... | |
| #define | PCAN_PARAMETER_ON |
| The PCAN parameter is set (active) More... | |
| #define | PCAN_FILTER_CLOSE |
| The PCAN filter is closed. No messages will be received. More... | |
| #define | PCAN_FILTER_OPEN |
| The PCAN filter is fully opened. All messages will be received. More... | |
| #define | PCAN_FILTER_CUSTOM |
| The PCAN filter is custom configured. Only registered messages will be received. More... | |
| #define | PCAN_CHANNEL_UNAVAILABLE |
| The PCAN-Channel handle is illegal, or its associated hardware is not available. More... | |
| #define | PCAN_CHANNEL_AVAILABLE |
| The PCAN-Channel handle is available to be connected (PnP Hardware: it means furthermore that the hardware is plugged-in) More... | |
| #define | PCAN_CHANNEL_OCCUPIED |
| The PCAN-Channel handle is valid, and is already being used. More... | |
| #define | PCAN_CHANNEL_PCANVIEW |
| The PCAN-Channel handle is already being used by a PCAN-View application, but is available to connect. More... | |
| #define | LOG_FUNCTION_DEFAULT |
| Logs system exceptions / errors. More... | |
| #define | LOG_FUNCTION_ENTRY |
| Logs the entries to the PCAN-Basic API functions. More... | |
| #define | LOG_FUNCTION_PARAMETERS |
| Logs the parameters passed to the PCAN-Basic API functions. More... | |
| #define | LOG_FUNCTION_LEAVE |
| Logs the exits from the PCAN-Basic API functions. More... | |
| #define | LOG_FUNCTION_WRITE |
| Logs the CAN messages passed to the CAN_Write function. More... | |
| #define | LOG_FUNCTION_READ |
| Logs the CAN messages received within the CAN_Read function. More... | |
| #define | LOG_FUNCTION_ALL |
| Logs all possible information within the PCAN-Basic API functions. More... | |
| #define | TRACE_FILE_SINGLE |
| A single file is written until it size reaches PAN_TRACE_SIZE. More... | |
| #define | TRACE_FILE_SEGMENTED |
| Traced data is distributed in several files with size PAN_TRACE_SIZE. More... | |
| #define | TRACE_FILE_DATE |
| Includes the date into the name of the trace file. More... | |
| #define | TRACE_FILE_TIME |
| Includes the start time into the name of the trace file. More... | |
| #define | TRACE_FILE_OVERWRITE |
| Causes the overwriting of available traces (same name) More... | |
| #define | TRACE_FILE_DATA_LENGTH |
| Causes using the data length column ('l') instead of the DLC column ('L') in the trace file. More... | |
| #define | FEATURE_FD_CAPABLE |
| Device supports flexible data-rate (CAN-FD) More... | |
| #define | FEATURE_DELAY_CAPABLE |
| Device supports a delay between sending frames (FPGA based USB devices) More... | |
| #define | FEATURE_IO_CAPABLE |
| Device supports I/O functionality for electronic circuits (USB-Chip devices) More... | |
| #define | SERVICE_STATUS_STOPPED |
| The service is not running. More... | |
| #define | SERVICE_STATUS_RUNNING |
| The service is running. More... | |
| #define | LAN_DIRECTION_READ |
| The PCAN-Channel is limited to incoming communication only. More... | |
| #define | LAN_DIRECTION_WRITE |
| The PCAN-Channel is limited to outgoing communication only. More... | |
| #define | LAN_DIRECTION_READ_WRITE |
| #define | MAX_LENGTH_HARDWARE_NAME |
| Maximum length of the name of a device: 32 characters + terminator. More... | |
| #define | MAX_LENGTH_VERSION_STRING |
| Maximum length of a version string: 255 characters + terminator. More... | |
| #define | PCAN_MESSAGE_STANDARD |
| The PCAN message is a CAN Standard Frame (11-bit identifier) More... | |
| #define | PCAN_MESSAGE_RTR |
| The PCAN message is a CAN Remote-Transfer-Request Frame. More... | |
| #define | PCAN_MESSAGE_EXTENDED |
| The PCAN message is a CAN Extended Frame (29-bit identifier) More... | |
| #define | PCAN_MESSAGE_FD |
| The PCAN message represents a FD frame in terms of CiA Specs. More... | |
| #define | PCAN_MESSAGE_BRS |
| The PCAN message represents a FD bit rate switch (CAN data at a higher bit rate) More... | |
| #define | PCAN_MESSAGE_ESI |
| The PCAN message represents a FD error state indicator(CAN FD transmitter was error active) More... | |
| #define | PCAN_MESSAGE_ECHO |
| The PCAN message represents an echo CAN Frame. More... | |
| #define | PCAN_MESSAGE_ERRFRAME |
| The PCAN message represents an error frame. More... | |
| #define | PCAN_MESSAGE_STATUS |
| The PCAN message represents a PCAN status message. More... | |
| #define | LOOKUP_DEVICE_TYPE |
| Lookup channel by Device type (see PCAN devices e.g. PCAN_USB) More... | |
| #define | LOOKUP_DEVICE_ID |
| Lookup channel by device id. More... | |
| #define | LOOKUP_CONTROLLER_NUMBER |
| Lookup channel by CAN controller 0-based index. More... | |
| #define | LOOKUP_IP_ADDRESS |
| Lookup channel by IP address (LAN channels only) More... | |
| #define | PCAN_MODE_STANDARD |
| #define | PCAN_MODE_EXTENDED |
| #define | PCAN_BAUD_1M |
| 1 MBit/s More... | |
| #define | PCAN_BAUD_800K |
| 800 kBit/s More... | |
| #define | PCAN_BAUD_500K |
| 500 kBit/s More... | |
| #define | PCAN_BAUD_250K |
| 250 kBit/s More... | |
| #define | PCAN_BAUD_125K |
| 125 kBit/s More... | |
| #define | PCAN_BAUD_100K |
| 100 kBit/s More... | |
| #define | PCAN_BAUD_95K |
| 95,238 kBit/s More... | |
| #define | PCAN_BAUD_83K |
| 83,333 kBit/s More... | |
| #define | PCAN_BAUD_50K |
| 50 kBit/s More... | |
| #define | PCAN_BAUD_47K |
| 47,619 kBit/s More... | |
| #define | PCAN_BAUD_33K |
| 33,333 kBit/s More... | |
| #define | PCAN_BAUD_20K |
| 20 kBit/s More... | |
| #define | PCAN_BAUD_10K |
| 10 kBit/s More... | |
| #define | PCAN_BAUD_5K |
| 5 kBit/s More... | |
| #define | PCAN_BR_CLOCK |
| #define | PCAN_BR_CLOCK_MHZ |
| #define | PCAN_BR_NOM_BRP |
| #define | PCAN_BR_NOM_TSEG1 |
| #define | PCAN_BR_NOM_TSEG2 |
| #define | PCAN_BR_NOM_SJW |
| #define | PCAN_BR_NOM_SAMPLE |
| #define | PCAN_BR_DATA_BRP |
| #define | PCAN_BR_DATA_TSEG1 |
| #define | PCAN_BR_DATA_TSEG2 |
| #define | PCAN_BR_DATA_SJW |
| #define | PCAN_BR_DATA_SAMPLE |
| #define | TPCANHandle |
| Represents a PCAN hardware channel handle. More... | |
| #define | TPCANStatus |
| Represents a PCAN status/error code (ATTENTION: changed from 64-bit to 32-bit) More... | |
| #define | TPCANParameter |
| Represents a PCAN parameter to be read or set. More... | |
| #define | TPCANDevice |
| Represents a PCAN device. More... | |
| #define | TPCANMessageType |
| Represents the type of a PCAN message. More... | |
| #define | TPCANType |
| Represents the type of PCAN hardware to be initialized. More... | |
| #define | TPCANMode |
| Represents a PCAN filter mode. More... | |
| #define | TPCANBaudrate |
| Represents a PCAN Baud rate register value. More... | |
| #define | TPCANBitrateFD |
| Represents a PCAN-FD bit rate string. More... | |
| #define | TPCANTimestampFD |
| Represents a timestamp of a received PCAN FD message. More... | |
| #define | _DEF_ARG |
Typedefs | |
| typedef struct tagTPCANMsg | TPCANMsg |
| typedef struct tagTPCANTimestamp | TPCANTimestamp |
| typedef struct tagTPCANMsgFD | TPCANMsgFD |
| typedef struct tagTPCANChannelInformation | TPCANChannelInformation |
Functions | |
| TPCANStatus | CAN_Initialize (TPCANHandle Channel, TPCANBaudrate Btr0Btr1, TPCANType HwType _DEF_ARG, DWORD IOPort _DEF_ARG, WORD Interrupt _DEF_ARG) |
| Initializes a PCAN Channel. More... | |
| TPCANStatus | CAN_InitializeFD (TPCANHandle Channel, TPCANBitrateFD BitrateFD) |
| Initializes a FD capable PCAN Channel. More... | |
| TPCANStatus | CAN_Uninitialize (TPCANHandle Channel) |
| Uninitializes one or all PCAN Channels initialized by CAN_Initialize. More... | |
| TPCANStatus | CAN_Reset (TPCANHandle Channel) |
| Resets the receive and transmit queues of the PCAN Channel. More... | |
| TPCANStatus | CAN_GetStatus (TPCANHandle Channel) |
| Gets the current status of a PCAN Channel. More... | |
| TPCANStatus | CAN_Read (TPCANHandle Channel, TPCANMsg *MessageBuffer, TPCANTimestamp *TimestampBuffer) |
| Reads a CAN message from the receive queue of a PCAN Channel. More... | |
| TPCANStatus | CAN_ReadFD (TPCANHandle Channel, TPCANMsgFD *MessageBuffer, TPCANTimestampFD *TimestampBuffer) |
| Reads a CAN message from the receive queue of a FD capable PCAN Channel. More... | |
| TPCANStatus | CAN_Write (TPCANHandle Channel, TPCANMsg *MessageBuffer) |
| Transmits a CAN message. More... | |
| TPCANStatus | CAN_WriteFD (TPCANHandle Channel, TPCANMsgFD *MessageBuffer) |
| Transmits a CAN message over a FD capable PCAN Channel. More... | |
| TPCANStatus | CAN_FilterMessages (TPCANHandle Channel, DWORD FromID, DWORD ToID, TPCANMode Mode) |
| Configures the reception filter. More... | |
| TPCANStatus | CAN_GetValue (TPCANHandle Channel, TPCANParameter Parameter, void *Buffer, DWORD BufferLength) |
| Retrieves a PCAN Channel value. More... | |
| TPCANStatus | CAN_SetValue (TPCANHandle Channel, TPCANParameter Parameter, void *Buffer, DWORD BufferLength) |
| Configures or sets a PCAN Channel value. More... | |
| TPCANStatus | CAN_GetErrorText (TPCANStatus Error, WORD Language, LPSTR Buffer) |
| Returns a descriptive text of a given TPCANStatus error code, in any desired language. More... | |
| TPCANStatus | CAN_LookUpChannel (LPSTR Parameters, TPCANHandle *FoundChannel) |
| Finds a PCAN-Basic channel that matches with the given parameters. More... | |
| #define _DEF_ARG |
| #define FEATURE_DELAY_CAPABLE |
Device supports a delay between sending frames (FPGA based USB devices)
| #define FEATURE_FD_CAPABLE |
Device supports flexible data-rate (CAN-FD)
| #define FEATURE_IO_CAPABLE |
Device supports I/O functionality for electronic circuits (USB-Chip devices)
| #define LAN_DIRECTION_READ |
The PCAN-Channel is limited to incoming communication only.
| #define LAN_DIRECTION_READ_WRITE |
| #define LAN_DIRECTION_WRITE |
The PCAN-Channel is limited to outgoing communication only.
| #define LOG_FUNCTION_ALL |
Logs all possible information within the PCAN-Basic API functions.
| #define LOG_FUNCTION_DEFAULT |
Logs system exceptions / errors.
| #define LOG_FUNCTION_ENTRY |
Logs the entries to the PCAN-Basic API functions.
| #define LOG_FUNCTION_LEAVE |
Logs the exits from the PCAN-Basic API functions.
| #define LOG_FUNCTION_PARAMETERS |
Logs the parameters passed to the PCAN-Basic API functions.
| #define LOG_FUNCTION_READ |
Logs the CAN messages received within the CAN_Read function.
| #define LOG_FUNCTION_WRITE |
Logs the CAN messages passed to the CAN_Write function.
| #define LOOKUP_CONTROLLER_NUMBER |
Lookup channel by CAN controller 0-based index.
| #define LOOKUP_DEVICE_ID |
Lookup channel by device id.
| #define LOOKUP_DEVICE_TYPE |
Lookup channel by Device type (see PCAN devices e.g. PCAN_USB)
| #define LOOKUP_IP_ADDRESS |
Lookup channel by IP address (LAN channels only)
| #define MAX_LENGTH_HARDWARE_NAME |
Maximum length of the name of a device: 32 characters + terminator.
| #define MAX_LENGTH_VERSION_STRING |
Maximum length of a version string: 255 characters + terminator.
| #define PCAN_5VOLTS_POWER |
5-Volt power parameter
| #define PCAN_ACCEPTANCE_FILTER_11BIT |
Filter over code and mask patterns for 11-Bit messages.
| #define PCAN_ACCEPTANCE_FILTER_29BIT |
Filter over code and mask patterns for 29-Bit messages.
| #define PCAN_ALLOW_ECHO_FRAMES |
Echo messages reception status within a PCAN-Channel.
| #define PCAN_ALLOW_ERROR_FRAMES |
Error messages reception status within a PCAN-Channel.
| #define PCAN_ALLOW_RTR_FRAMES |
RTR messages reception status within a PCAN-Channel.
| #define PCAN_ALLOW_STATUS_FRAMES |
Status messages reception status within a PCAN-Channel.
| #define PCAN_API_VERSION |
PCAN-Basic API version parameter.
| #define PCAN_ATTACHED_CHANNELS |
Get information about PCAN channels attached to a system.
| #define PCAN_ATTACHED_CHANNELS_COUNT |
Get the amount of PCAN channels attached to a system.
| #define PCAN_BAUD_100K |
100 kBit/s
| #define PCAN_BAUD_10K |
10 kBit/s
| #define PCAN_BAUD_125K |
125 kBit/s
| #define PCAN_BAUD_1M |
1 MBit/s
| #define PCAN_BAUD_20K |
20 kBit/s
| #define PCAN_BAUD_250K |
250 kBit/s
| #define PCAN_BAUD_33K |
33,333 kBit/s
| #define PCAN_BAUD_47K |
47,619 kBit/s
| #define PCAN_BAUD_500K |
500 kBit/s
| #define PCAN_BAUD_50K |
50 kBit/s
| #define PCAN_BAUD_5K |
5 kBit/s
| #define PCAN_BAUD_800K |
800 kBit/s
| #define PCAN_BAUD_83K |
83,333 kBit/s
| #define PCAN_BAUD_95K |
95,238 kBit/s
| #define PCAN_BITRATE_ADAPTING |
Using of an existing bit rate (PCAN-View connected to a channel)
| #define PCAN_BITRATE_INFO |
Configured bit rate as Btr0Btr1 value.
| #define PCAN_BITRATE_INFO_FD |
Configured bit rate as TPCANBitrateFD string.
| #define PCAN_BR_CLOCK |
| #define PCAN_BR_CLOCK_MHZ |
| #define PCAN_BR_DATA_BRP |
| #define PCAN_BR_DATA_SAMPLE |
| #define PCAN_BR_DATA_SJW |
| #define PCAN_BR_DATA_TSEG1 |
| #define PCAN_BR_DATA_TSEG2 |
| #define PCAN_BR_NOM_BRP |
| #define PCAN_BR_NOM_SAMPLE |
| #define PCAN_BR_NOM_SJW |
| #define PCAN_BR_NOM_TSEG1 |
| #define PCAN_BR_NOM_TSEG2 |
| #define PCAN_BUSOFF_AUTORESET |
PCAN Reset-On-Busoff parameter.
| #define PCAN_BUSSPEED_DATA |
Configured CAN data speed as Bits per seconds.
| #define PCAN_BUSSPEED_NOMINAL |
Configured nominal CAN Bus speed as Bits per seconds.
| #define PCAN_CHANNEL_AVAILABLE |
The PCAN-Channel handle is available to be connected (PnP Hardware: it means furthermore that the hardware is plugged-in)
| #define PCAN_CHANNEL_CONDITION |
Availability status of a PCAN-Channel.
| #define PCAN_CHANNEL_FEATURES |
Capabilities of a PCAN device (FEATURE_***)
| #define PCAN_CHANNEL_IDENTIFYING |
Physical identification of a USB based PCAN-Channel by blinking its associated LED.
| #define PCAN_CHANNEL_OCCUPIED |
The PCAN-Channel handle is valid, and is already being used.
| #define PCAN_CHANNEL_PCANVIEW |
The PCAN-Channel handle is already being used by a PCAN-View application, but is available to connect.
| #define PCAN_CHANNEL_UNAVAILABLE |
The PCAN-Channel handle is illegal, or its associated hardware is not available.
| #define PCAN_CHANNEL_VERSION |
PCAN device channel version parameter.
| #define PCAN_CONTROLLER_NUMBER |
CAN-Controller number of a PCAN-Channel.
| #define PCAN_DEVICE_ID |
Device identifier parameter.
| #define PCAN_DEVICE_NUMBER |
Deprecated parameter. Use PCAN_DEVICE_ID instead.
| #define PCAN_DEVICE_PART_NUMBER |
Get the part number associated to a device.
| #define PCAN_DNG |
PCAN-Dongle.
| #define PCAN_ERROR_ANYBUSERR |
Mask for all bus errors.
| #define PCAN_ERROR_BUSHEAVY |
Bus error: an error counter reached the 'heavy' limit.
| #define PCAN_ERROR_BUSLIGHT |
Bus error: an error counter reached the 'light' limit.
| #define PCAN_ERROR_BUSOFF |
Bus error: the CAN controller is in bus-off state.
| #define PCAN_ERROR_BUSPASSIVE |
Bus error: the CAN controller is error passive.
| #define PCAN_ERROR_BUSWARNING |
Bus error: an error counter reached the 'warning' limit.
| #define PCAN_ERROR_CAUTION |
An operation was successfully carried out, however, irregularities were registered.
| #define PCAN_ERROR_HWINUSE |
Hardware already in use by a Net.
| #define PCAN_ERROR_ILLCLIENT |
Client handle is invalid.
| #define PCAN_ERROR_ILLDATA |
Invalid data, function, or action.
| #define PCAN_ERROR_ILLHANDLE |
Mask for all handle errors.
| #define PCAN_ERROR_ILLHW |
Hardware handle is invalid.
| #define PCAN_ERROR_ILLMODE |
Driver object state is wrong for the attempted operation.
| #define PCAN_ERROR_ILLNET |
Net handle is invalid.
| #define PCAN_ERROR_ILLOPERATION |
Invalid operation [Value was changed from 0x80000 to 0x8000000].
| #define PCAN_ERROR_ILLPARAMTYPE |
Invalid parameter.
| #define PCAN_ERROR_ILLPARAMVAL |
Invalid parameter value.
| #define PCAN_ERROR_INITIALIZE |
Channel is not initialized [Value was changed from 0x40000 to 0x4000000].
| #define PCAN_ERROR_NETINUSE |
A Client is already connected to the Net.
| #define PCAN_ERROR_NODRIVER |
Driver not loaded.
| #define PCAN_ERROR_OK |
No error.
| #define PCAN_ERROR_OVERRUN |
CAN controller was read too late.
| #define PCAN_ERROR_QOVERRUN |
Receive queue was read too late.
| #define PCAN_ERROR_QRCVEMPTY |
Receive queue is empty.
| #define PCAN_ERROR_QXMTFULL |
Transmit queue is full.
| #define PCAN_ERROR_REGTEST |
Test of the CAN controller hardware registers failed (no hardware found)
| #define PCAN_ERROR_RESOURCE |
Resource (FIFO, Client, timeout) cannot be created.
| #define PCAN_ERROR_UNKNOWN |
Unknown error.
| #define PCAN_ERROR_XMTFULL |
Transmit buffer in CAN controller is full.
| #define PCAN_EXT_BTR0BTR1 |
UVS: bit-timing register.
| #define PCAN_EXT_ERR_COUNTER |
UVS: number of error frames.
| #define PCAN_EXT_HARDWARE_VERSION |
UVS: version number of the interface firmware.
| #define PCAN_EXT_LOG_USB |
UVS: Log USB communication (URB buffer <==> CAN messages)
| #define PCAN_EXT_RECEIVE_CALLBACK |
UVS: callback function called on the reception of an URB.
| #define PCAN_EXT_RX_COUNTER |
UVS: number of received frames.
| #define PCAN_EXT_RX_QUE_OVERRUN |
UVS: receive queue overrun counter.
| #define PCAN_EXT_SOFTWARE_VERSION |
UVS: version number of the driver respectively library.
| #define PCAN_EXT_TX_COUNTER |
UVS: number of transmitted frames.
| #define PCAN_FILTER_CLOSE |
The PCAN filter is closed. No messages will be received.
| #define PCAN_FILTER_CUSTOM |
The PCAN filter is custom configured. Only registered messages will be received.
| #define PCAN_FILTER_OPEN |
The PCAN filter is fully opened. All messages will be received.
| #define PCAN_FIRMWARE_VERSION |
Get the version of the firmware used by the device associated with a PCAN-Channel.
| #define PCAN_HARD_RESET_STATUS |
Activation status of hard reset processing via CAN_Reset calls.
| #define PCAN_HARDWARE_NAME |
PCAN hardware name parameter.
| #define PCAN_INTERFRAME_DELAY |
Delay, in microseconds, between sending frames.
| #define PCAN_IO_ANALOG_VALUE |
Get value of a single analog input pin.
| #define PCAN_IO_DIGITAL_CLEAR |
Clear multiple digital I/O pins to 0.
| #define PCAN_IO_DIGITAL_CONFIGURATION |
Output mode of 32 digital I/O pin of a PCAN-USB Chip. 1: Output-Active 0 : Output Inactive.
| #define PCAN_IO_DIGITAL_SET |
Value assigned to a 32 digital I/O pins of a PCAN-USB Chip - Multiple digital I/O pins to 1 = High.
| #define PCAN_IO_DIGITAL_VALUE |
Value assigned to a 32 digital I/O pins of a PCAN-USB Chip.
| #define PCAN_IP_ADDRESS |
Remote address of a LAN channel as string in IPv4 format.
| #define PCAN_ISA |
PCAN-ISA, PCAN-PC/104, and PCAN-PC/104-Plus.
| #define PCAN_LAN |
PCAN Gateway devices.
| #define PCAN_LAN_CHANNEL_DIRECTION |
Communication direction of a PCAN-Channel representing a PCAN-LAN interface.
| #define PCAN_LAN_SERVICE_STATUS |
Status of the Virtual PCAN-Gateway Service.
| #define PCAN_LISTEN_ONLY |
PCAN Listen-Only parameter.
| #define PCAN_LOG_CONFIGURE |
Configuration of the debugged information (LOG_FUNCTION_***)
| #define PCAN_LOG_LOCATION |
Directory path for log files.
| #define PCAN_LOG_STATUS |
Debug-Log activation status.
| #define PCAN_LOG_TEXT |
Custom insertion of text into the log file.
| #define PCAN_MESSAGE_BRS |
The PCAN message represents a FD bit rate switch (CAN data at a higher bit rate)
| #define PCAN_MESSAGE_ECHO |
The PCAN message represents an echo CAN Frame.
| #define PCAN_MESSAGE_ERRFRAME |
The PCAN message represents an error frame.
| #define PCAN_MESSAGE_ESI |
The PCAN message represents a FD error state indicator(CAN FD transmitter was error active)
| #define PCAN_MESSAGE_EXTENDED |
The PCAN message is a CAN Extended Frame (29-bit identifier)
| #define PCAN_MESSAGE_FD |
The PCAN message represents a FD frame in terms of CiA Specs.
| #define PCAN_MESSAGE_FILTER |
PCAN message filter parameter.
| #define PCAN_MESSAGE_RTR |
The PCAN message is a CAN Remote-Transfer-Request Frame.
| #define PCAN_MESSAGE_STANDARD |
The PCAN message is a CAN Standard Frame (11-bit identifier)
| #define PCAN_MESSAGE_STATUS |
The PCAN message represents a PCAN status message.
| #define PCAN_MODE_EXTENDED |
| #define PCAN_MODE_STANDARD |
| #define PCAN_NONE |
Undefined, unknown or not selected PCAN device value.
| #define PCAN_NONEBUS |
Undefined/default value for a PCAN bus.
| #define PCAN_PARAMETER_OFF |
The PCAN parameter is not set (inactive)
| #define PCAN_PARAMETER_ON |
The PCAN parameter is set (active)
| #define PCAN_PCC |
PCAN-PC Card.
| #define PCAN_PCI |
PCAN-PCI, PCAN-cPCI, PCAN-miniPCI, and PCAN-PCI Express.
| #define PCAN_PEAKCAN |
PCAN Non-PnP devices. NOT USED WITHIN PCAN-Basic API.
| #define PCAN_RECEIVE_EVENT |
PCAN receive event handler parameter.
| #define PCAN_RECEIVE_STATUS |
Message reception status of a PCAN-Channel.
| #define PCAN_TRACE_CONFIGURE |
Configuration of the trace file storing mode (TRACE_FILE_***)
| #define PCAN_TRACE_LOCATION |
Directory path for PCAN trace files.
| #define PCAN_TRACE_SIZE |
Configuration of the maximum file size of a CAN trace.
| #define PCAN_TRACE_STATUS |
CAN tracing activation status.
| #define PCAN_USB |
PCAN-USB and PCAN-USB Pro.
| #define PCAN_USBBUS1 |
PCAN-USB interface, channel 1.
| #define PCAN_USBBUS10 |
PCAN-USB interface, channel 10.
| #define PCAN_USBBUS11 |
PCAN-USB interface, channel 11.
| #define PCAN_USBBUS12 |
PCAN-USB interface, channel 12.
| #define PCAN_USBBUS13 |
PCAN-USB interface, channel 13.
| #define PCAN_USBBUS14 |
PCAN-USB interface, channel 14.
| #define PCAN_USBBUS15 |
PCAN-USB interface, channel 15.
| #define PCAN_USBBUS16 |
PCAN-USB interface, channel 16.
| #define PCAN_USBBUS2 |
PCAN-USB interface, channel 2.
| #define PCAN_USBBUS3 |
PCAN-USB interface, channel 3.
| #define PCAN_USBBUS4 |
PCAN-USB interface, channel 4.
| #define PCAN_USBBUS5 |
PCAN-USB interface, channel 5.
| #define PCAN_USBBUS6 |
PCAN-USB interface, channel 6.
| #define PCAN_USBBUS7 |
PCAN-USB interface, channel 7.
| #define PCAN_USBBUS8 |
PCAN-USB interface, channel 8.
| #define PCAN_USBBUS9 |
PCAN-USB interface, channel 9.
| #define PCAN_VIRTUAL |
PCAN Virtual hardware. NOT USED WITHIN PCAN-Basic API.
| #define SERVICE_STATUS_RUNNING |
The service is running.
| #define SERVICE_STATUS_STOPPED |
The service is not running.
| #define TPCANBaudrate |
Represents a PCAN Baud rate register value.
| #define TPCANBitrateFD |
Represents a PCAN-FD bit rate string.
| #define TPCANDevice |
Represents a PCAN device.
| #define TPCANHandle |
Represents a PCAN hardware channel handle.
| #define TPCANMessageType |
Represents the type of a PCAN message.
| #define TPCANMode |
Represents a PCAN filter mode.
| #define TPCANParameter |
Represents a PCAN parameter to be read or set.
| #define TPCANStatus |
Represents a PCAN status/error code (ATTENTION: changed from 64-bit to 32-bit)
| #define TPCANTimestampFD |
Represents a timestamp of a received PCAN FD message.
| #define TPCANType |
Represents the type of PCAN hardware to be initialized.
| #define TRACE_FILE_DATA_LENGTH |
Causes using the data length column ('l') instead of the DLC column ('L') in the trace file.
| #define TRACE_FILE_DATE |
Includes the date into the name of the trace file.
| #define TRACE_FILE_OVERWRITE |
Causes the overwriting of available traces (same name)
| #define TRACE_FILE_SEGMENTED |
Traced data is distributed in several files with size PAN_TRACE_SIZE.
| #define TRACE_FILE_SINGLE |
A single file is written until it size reaches PAN_TRACE_SIZE.
| #define TRACE_FILE_TIME |
Includes the start time into the name of the trace file.
| typedef struct tagTPCANChannelInformation TPCANChannelInformation |
Describes an available PCAN channel
| typedef struct tagTPCANMsg TPCANMsg |
Represents a PCAN message
| typedef struct tagTPCANMsgFD TPCANMsgFD |
Represents a PCAN message from a FD capable hardware
| typedef struct tagTPCANTimestamp TPCANTimestamp |
Represents a timestamp of a received PCAN message Total Microseconds = micros + 1000 * millis + 0x100000000 * 1000 * millis_overflow
| TPCANStatus CAN_FilterMessages | ( | TPCANHandle | Channel, |
| DWORD | FromID, | ||
| DWORD | ToID, | ||
| TPCANMode | Mode | ||
| ) |
Configures the reception filter.
| [in] | Channel | The handle of a PCAN Channel. |
| [in] | FromID | The lowest CAN ID to be received. |
| [in] | ToID | The highest CAN ID to be received. |
| [in] | Mode | Message type, Standard (11-bit identifier) or Extended (29-bit identifier). |
| TPCANStatus CAN_GetErrorText | ( | TPCANStatus | Error, |
| WORD | Language, | ||
| LPSTR | Buffer | ||
| ) |
Returns a descriptive text of a given TPCANStatus error code, in any desired language.
| [in] | Error | A TPCANStatus error code. |
| [in] | Language | Indicates a 'Primary language ID'. |
| [out] | Buffer | Buffer for a null terminated char array. |
| TPCANStatus CAN_GetStatus | ( | TPCANHandle | Channel | ) |
Gets the current status of a PCAN Channel.
| [in] | Channel | The handle of a PCAN Channel. |
| TPCANStatus CAN_GetValue | ( | TPCANHandle | Channel, |
| TPCANParameter | Parameter, | ||
| void * | Buffer, | ||
| DWORD | BufferLength | ||
| ) |
Retrieves a PCAN Channel value.
| [in] | Channel | The handle of a PCAN Channel. |
| [in] | Parameter | The TPCANParameter parameter to get. |
| [out] | Buffer | Buffer for the parameter value. |
| [in] | BufferLength | Size in bytes of the buffer. |
| TPCANStatus CAN_Initialize | ( | TPCANHandle | Channel, |
| TPCANBaudrate | Btr0Btr1, | ||
| TPCANType HwType | _DEF_ARG, | ||
| DWORD IOPort | _DEF_ARG, | ||
| WORD Interrupt | _DEF_ARG | ||
| ) |
Initializes a PCAN Channel.
| [in] | Channel | The handle of a PCAN Channel. |
| [in] | Btr0Btr1 | The speed for the communication (BTR0BTR1 code). |
| [in] | HwType | (not used with PCAN USB devices) |
| [in] | IOPort | (not used with PCAN USB devices) |
| [in] | Interrupt | (not used with PCAN USB devices) |
| TPCANStatus CAN_InitializeFD | ( | TPCANHandle | Channel, |
| TPCANBitrateFD | BitrateFD | ||
| ) |
Initializes a FD capable PCAN Channel.
| [in] | Channel | The handle of a FD capable PCAN Channel. |
| [in] | BitrateFD | The speed for the communication (FD bit rate string). |
* 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 *
| TPCANStatus CAN_LookUpChannel | ( | LPSTR | Parameters, |
| TPCANHandle * | FoundChannel | ||
| ) |
Finds a PCAN-Basic channel that matches with the given parameters.
| [in] | Parameters | A comma separated string contained pairs of parameter-name/value to be matched within a PCAN-Basic channel |
| [out] | FoundChannel | Buffer for returning the PCAN-Basic channel, when found |
| TPCANStatus CAN_Read | ( | TPCANHandle | Channel, |
| TPCANMsg * | MessageBuffer, | ||
| TPCANTimestamp * | TimestampBuffer | ||
| ) |
Reads a CAN message from the receive queue of a PCAN Channel.
| [in] | Channel | The handle of a PCAN Channel. |
| [out] | MessageBuffer | A TPCANMsg structure buffer to store the CAN message. |
| [out] | TimestampBuffer | A TPCANTimestamp structure buffer to get the reception time of the message. If this value is not desired, this parameter should be passed as NULL. |
| TPCANStatus CAN_ReadFD | ( | TPCANHandle | Channel, |
| TPCANMsgFD * | MessageBuffer, | ||
| TPCANTimestampFD * | TimestampBuffer | ||
| ) |
Reads a CAN message from the receive queue of a FD capable PCAN Channel.
| [in] | Channel | The handle of a FD capable PCAN Channel. |
| [out] | MessageBuffer | A TPCANMsgFD structure buffer to store the CAN message. |
| [out] | TimestampBuffer | A TPCANTimestampFD buffer to get the reception time of the message. If this value is not desired, this parameter should be passed as NULL. |
| TPCANStatus CAN_Reset | ( | TPCANHandle | Channel | ) |
Resets the receive and transmit queues of the PCAN Channel.
| [in] | Channel | The handle of a PCAN Channel. |
| TPCANStatus CAN_SetValue | ( | TPCANHandle | Channel, |
| TPCANParameter | Parameter, | ||
| void * | Buffer, | ||
| DWORD | BufferLength | ||
| ) |
Configures or sets a PCAN Channel value.
| [in] | Channel | The handle of a PCAN Channel. |
| [in] | Parameter | The TPCANParameter parameter to set. |
| [in] | Buffer | Buffer with the value to be set. |
| [in] | BufferLength | Size in bytes of the buffer. |
| TPCANStatus CAN_Uninitialize | ( | TPCANHandle | Channel | ) |
Uninitializes one or all PCAN Channels initialized by CAN_Initialize.
| [in] | Channel | The handle of a PCAN Channel. |
| TPCANStatus CAN_Write | ( | TPCANHandle | Channel, |
| TPCANMsg * | MessageBuffer | ||
| ) |
Transmits a CAN message.
| [in] | Channel | The handle of a PCAN Channel. |
| [in] | MessageBuffer | A TPCANMsg buffer with the message to be sent. |
| TPCANStatus CAN_WriteFD | ( | TPCANHandle | Channel, |
| TPCANMsgFD * | MessageBuffer | ||
| ) |
Transmits a CAN message over a FD capable PCAN Channel.
| [in] | Channel | The handle of a FD capable PCAN Channel. |
| [in] | MessageBuffer | A TPCANMsgFD buffer with the message to be sent. |