PCANBasic Class

PCAN-Basic API class implementation

Definition

Namespace: Peak.Can.Basic.BackwardCompatibility
Assembly: PCANBasic.NET (in PCANBasic.NET.dll) Version: 4.9.0
C#
public static class PCANBasic
Inheritance
Object    PCANBasic

Methods

FilterMessages Configures the reception filter.
GetErrorText Returns a descriptive text for a given TPCANStatus code, in any of the supported languages.
GetStatus Gets the current BUS status of a PCAN Channel.
GetValue(UInt16, TPCANParameter, TPCANChannelInformation) Retrieves a PCAN Channel value.
GetValue(UInt16, TPCANParameter, StringBuilder, UInt32) Retrieves a PCAN Channel value.
GetValue(UInt16, TPCANParameter, UInt32, UInt32) Retrieves a PCAN Channel value.
GetValue(UInt16, TPCANParameter, UInt64, UInt32) Retrieves a PCAN Channel value.
Initialize(UInt16, TPCANBaudrate)

Initializes a PCAN Channel.

Initialize(UInt16, TPCANBaudrate, TPCANType, UInt32, UInt16)

Initializes a PCAN Channel.

InitializeFD

Initializes a FD capable PCAN Channel.

LookUpChannel Finds the handle of a PCAN Channel that matches the given parameters.
Read(UInt16, TPCANMsg) Reads a CAN message from the receive queue of a PCAN Channel.
Read(UInt16, TPCANMsg, TPCANTimestamp) Reads a CAN message and its time stamp from the receive queue of a PCAN Channel.
ReadFD(UInt16, TPCANMsgFD) Reads a CAN message from the receive queue of a FD capable PCAN Channel.
ReadFD(UInt16, TPCANMsgFD, UInt64) Reads a CAN message and its time stamp from the receive queue of a FD capable PCAN Channel.
Reset Discards all messages contained in the receive and transmit queues of a PCAN Channel.
SetValue(UInt16, TPCANParameter, String, UInt32) Configures a feature of a PCAN Channel.
SetValue(UInt16, TPCANParameter, UInt32, UInt32) Configures a feature of a PCAN Channel.
SetValue(UInt16, TPCANParameter, UInt64, UInt32) Configures a feature of a PCAN Channel.
Uninitialize Uninitializes one or all initialized PCAN Channels.
Write Transmits a CAN message.
WriteFD Transmits a CAN message using a FD capable PCAN Channel.

Fields

FEATURE_DELAY_CAPABLE Device supports a delay between sending frames (FPGA based USB devices).
FEATURE_FD_CAPABLE Device supports flexible data-rate (CAN-FD).
FEATURE_IO_CAPABLE Device supports I/O functionality for electronic circuits (USB-Chip devices).
LAN_DIRECTION_READ The PCAN Channel is limited to incoming communication only.
LAN_DIRECTION_READ_WRITE The PCAN Channel communication is bidirectional.
LAN_DIRECTION_WRITE The PCAN Channel is limited to outgoing communication only.
LOG_FUNCTION_ALL Logs all possible information within the PCAN-Basic API functions.
LOG_FUNCTION_DEFAULT Logs system exceptions / errors.
LOG_FUNCTION_ENTRY Logs the entries to the PCAN-Basic API functions.
LOG_FUNCTION_LEAVE Logs the exits from the PCAN-Basic API functions.
LOG_FUNCTION_PARAMETERS Logs the parameters passed to the PCAN-Basic API functions.
LOG_FUNCTION_READ Logs the CAN messages received within the CAN_Read function.
LOG_FUNCTION_WRITE Logs the CAN messages passed to the CAN_Write function.
LOOKUP_CONTROLLER_NUMBER Searches a PCAN Channel by its 0-based CAN controller index.
LOOKUP_DEVICE_ID Searches a PCAN Channel by its device identifier.
LOOKUP_DEVICE_TYPE Searches a PCAN Channel by its device type (see TPCANDevice).
LOOKUP_IP_ADDRESS Searches a PCAN Channel by its IP address (PCAN_LAN Channels only. See PCAN-LAN Handles).
MAX_LENGTH_HARDWARE_NAME Represents the maximum length that the name of a device can have (32 characters + terminator).
MAX_LENGTH_VERSION_STRING Represents the maximum length that a version string can have (255 characters + terminator).
PCAN_BR_CLOCK Clock frequency in hertz (80000000, 60000000, 40000000, 30000000, 24000000, 20000000)
PCAN_BR_CLOCK_MHZ Clock frequency in megahertz (80, 60, 40, 30, 24, 20)
PCAN_BR_DATA_BRP Clock prescaler for high-speed data time quantum
PCAN_BR_DATA_SAMPLE Secondary sample point delay for high-speed data bit rate in cycles
PCAN_BR_DATA_SJW Synchronization Jump Width for high-speed data bit rate in time quanta
PCAN_BR_DATA_TSEG1 TSEG1 segment for fast data bit rate in time quanta
PCAN_BR_DATA_TSEG2 TSEG2 segment for fast data bit rate in time quanta
PCAN_BR_NOM_BRP Clock prescaler for nominal time quantum
PCAN_BR_NOM_SAMPLE Sample point for nominal bit rate
PCAN_BR_NOM_SJW Synchronization Jump Width for nominal bit rate in time quanta
PCAN_BR_NOM_TSEG1 TSEG1 segment for nominal bit rate in time quanta
PCAN_BR_NOM_TSEG2 TSEG2 segment for nominal bit rate in time quanta
PCAN_CHANNEL_AVAILABLE The PCAN Channel handle is available to be connected (PnP Hardware: it means furthermore that the hardware is plugged-in).
PCAN_CHANNEL_OCCUPIED The PCAN Channel handle is valid, and is already being used.
PCAN_CHANNEL_PCANVIEW The PCAN Channel handle is already being used by a PCAN-View application, but is available to connect.
PCAN_CHANNEL_UNAVAILABLE The PCAN Channel handle is illegal, or its associated hardware is not available.
PCAN_DNGBUS1 PPCAN-Dongle/LPT interface, channel 1
PCAN_FILTER_CLOSE The PCAN filter is closed. No messages will be received.
PCAN_FILTER_CUSTOM The PCAN filter is custom configured. Only registered. messages will be received
PCAN_FILTER_OPEN The PCAN filter is fully opened. All messages will be received.
PCAN_ISABUS1 PCAN-ISA interface, channel 1
PCAN_ISABUS2 PCAN-ISA interface, channel 2
PCAN_ISABUS3 PCAN-ISA interface, channel 3
PCAN_ISABUS4 PCAN-ISA interface, channel 4
PCAN_ISABUS5 PCAN-ISA interface, channel 5
PCAN_ISABUS6 PCAN-ISA interface, channel 6
PCAN_ISABUS7 PCAN-ISA interface, channel 7
PCAN_ISABUS8 PCAN-ISA interface, channel 8
PCAN_LANBUS1 PCAN-LAN interface, channel 1
PCAN_LANBUS10 PCAN-LAN interface, channel 10
PCAN_LANBUS11 PCAN-LAN interface, channel 11
PCAN_LANBUS12 PCAN-LAN interface, channel 12
PCAN_LANBUS13 PCAN-LAN interface, channel 13
PCAN_LANBUS14 PCAN-LAN interface, channel 14
PCAN_LANBUS15 PCAN-LAN interface, channel 15
PCAN_LANBUS16 PCAN-LAN interface, channel 16
PCAN_LANBUS2 PCAN-LAN interface, channel 2
PCAN_LANBUS3 PCAN-LAN interface, channel 3
PCAN_LANBUS4 PCAN-LAN interface, channel 4
PCAN_LANBUS5 PCAN-LAN interface, channel 5
PCAN_LANBUS6 PCAN-LAN interface, channel 6
PCAN_LANBUS7 PCAN-LAN interface, channel 7
PCAN_LANBUS8 PCAN-LAN interface, channel 8
PCAN_LANBUS9 PCAN-LAN interface, channel 9
PCAN_NONEBUS Undefined/default value for a PCAN bus
PCAN_PARAMETER_OFF The PCAN parameter is not set (inactive).
PCAN_PARAMETER_ON The PCAN parameter is set (active).
PCAN_PCCBUS1 PCAN-PC Card interface, channel 1
PCAN_PCCBUS2 PCAN-PC Card interface, channel 2
PCAN_PCIBUS1 PCAN-PCI interface, channel 1
PCAN_PCIBUS10 PCAN-PCI interface, channel 10
PCAN_PCIBUS11 PCAN-PCI interface, channel 11
PCAN_PCIBUS12 PCAN-PCI interface, channel 12
PCAN_PCIBUS13 PCAN-PCI interface, channel 13
PCAN_PCIBUS14 PCAN-PCI interface, channel 14
PCAN_PCIBUS15 PCAN-PCI interface, channel 15
PCAN_PCIBUS16 PCAN-PCI interface, channel 16
PCAN_PCIBUS2 PCAN-PCI interface, channel 2
PCAN_PCIBUS3 PCAN-PCI interface, channel 3
PCAN_PCIBUS4 PCAN-PCI interface, channel 4
PCAN_PCIBUS5 PCAN-PCI interface, channel 5
PCAN_PCIBUS6 PCAN-PCI interface, channel 6
PCAN_PCIBUS7 PCAN-PCI interface, channel 7
PCAN_PCIBUS8 PCAN-PCI interface, channel 8
PCAN_PCIBUS9 PCAN-PCI interface, channel 9
PCAN_USBBUS1 PCAN-USB interface, channel 1
PCAN_USBBUS10 PCAN-USB interface, channel 10
PCAN_USBBUS11 PCAN-USB interface, channel 11
PCAN_USBBUS12 PCAN-USB interface, channel 12
PCAN_USBBUS13 PCAN-USB interface, channel 13
PCAN_USBBUS14 PCAN-USB interface, channel 14
PCAN_USBBUS15 PCAN-USB interface, channel 15
PCAN_USBBUS16 PCAN-USB interface, channel 16
PCAN_USBBUS2 PCAN-USB interface, channel 2
PCAN_USBBUS3 PCAN-USB interface, channel 3
PCAN_USBBUS4 PCAN-USB interface, channel 4
PCAN_USBBUS5 PCAN-USB interface, channel 5
PCAN_USBBUS6 PCAN-USB interface, channel 6
PCAN_USBBUS7 PCAN-USB interface, channel 7
PCAN_USBBUS8 PCAN-USB interface, channel 8
PCAN_USBBUS9 PCAN-USB interface, channel 9
SERVICE_STATUS_RUNNING The service is running.
SERVICE_STATUS_STOPPED The service is not running.
TRACE_FILE_DATA_LENGTH Causes using the data length column ('l') instead of the DLC column ('L') in the trace file.
TRACE_FILE_DATE Includes the date into the name of the trace file.
TRACE_FILE_OVERWRITE Causes the overwriting of available traces (same name).
TRACE_FILE_SEGMENTED Traced data is distributed in several files with size PAN_TRACE_SIZE.
TRACE_FILE_SINGLE A single file is written until it size reaches PAN_TRACE_SIZE.
TRACE_FILE_TIME Includes the start time into the name of the trace file.

See Also