HardwareName

This parameter is used to retrieve a description text from the hardware represented by a PCAN Channel. This text allows the recognition of device’s models that use the same interface, for example, USB. A normal PCAN USB adapter would return “PCAN-USB” while the new dual CAN/LIN FD adapter would return “PCAN-USB Pro FD”.

This parameter can be used when it is needed to differentiate between several hardware models using the same interface (e.g., PCAN-PCI, PCAN-ExpressCard).

Availability

Available since PCAN-Basic version 1.0.6.

It can be read without initialization since PCAN-Basic version 4.4.0.

Supported By

Access Mode

This parameter can only be read. It cannot be modified.

Possible Values

The value is a null-terminated string which contains the name of the hardware specified by the given PCAN Channel. This string has a maximum length of MaxHardwareNameLength, null-termination character included.

According with the hardware model represented by the current PCAN-Channel, the following texts can be returned:

Hardware Name Value

Interface

hardware Description

PCAN-PCI

PCAN-PCI

CAN interface for PCI.

PCAN-PCI Express

PCAN-PCI

CAN interface for PCI Express.

PCAN-PCI Express FD

PCAN-PCI

CAN and CAN FD interface for PCI Express.

PCAN-cPCI

PCAN-PCI

CAN interface for CompactPCI.

PCAN-MiniPCI

PCAN-PCI

CAN interface for Mini PCI.

PCAN-miniPCIe

PCAN-PCI

CAN interface for PCI Express Mini (PCIe).

PCAN-miniPCIe FD

PCAN-PCI

CAN and CAN FD interface for PCI Express Mini (PCIe).

PCAN-M.2

PCAN-PCI

CAN and CAN FD interface for M.2 (PCIe).

PCAN-Chip PCIe FD

PCAN-PCI

Chip solutions for the CAN FD connection to PCI Express.

PCAN-PCI/104-Plus

PCAN-PCI

CAN interface for PC/104-Plus.

PCAN-PCI/104-Plus Quad

PCAN-PCI

Four-Channel CAN interface for PC/104-Plus.

PCAN-PCI/104-Express

PCAN-PCI

CAN interface for PCI/104-Express.

PCAN-PC/104-Express FD

PCAN-PCI

CAN and CAN FD interface for PCI/104-Express.

PCAN-ExpressCard

PCAN-PCI

PCAN-ExpressCard.

PCAN-ExpressCard 34

PCAN-PCI

PCAN-ExpressCard 34.

PCAN-USB

PCAN-USB

.

PCAN-USB FD

PCAN-USB

PCAN-USB FD adapter.

PCAN-USB Pro

PCAN-USB

PCAN-USB Pro dual CAN/LIN.

PCAN-USB Pro FD

PCAN-USB

PCAN-USB Pro FD dual CAN/LIN.

PCAN-USB Hub

PCAN-USB

All-in-one USB adapter for communication through USB, CAN and RS-232.

PCAN-USB X6

PCAN-USB

6-Channel CAN and CAN FD interface for high-speed USB 2.0.

PCAN-Chip USB

PCAN-USB

Stamp module for the implementation of CAN FD to USB connections.

PCAN-Ethernet Gateway DR

PCAN-LAN

PCAN-Gateway wired for mounting on a DIN rail.

PCAN-Wireless Gateway DR

PCAN-LAN

PCAN-Gateway wireless for mounting on a DIN rail.

PCAN-Wireless Gateway

PCAN-LAN

PCAN-Gateway wireless with D-Sub connector.

PCAN-Wireless Automotive Gateway

PCAN-LAN

PCAN-Gateway wireless with automotive connector.

Default Value

Does not apply.

Initialization Status

Get: It can be read on initialized or uninitialized PCAN Channels.

Example

The following code shows how to retrieve the name from USB hardware:

C#
PcanChannel[] channelsToCheck = { PcanChannel.Usb01, PcanChannel.Usb02, PcanChannel.Usb03 };
string name;

for (int i = 0; i < 3; i++)
    if (Api.GetValue(channelsToCheck[i], PcanParameter.HardwareName, out name) == PcanStatus.OK)
        Console.WriteLine($"Channel {channelsToCheck[i]} associated hardware: {name}");

See Also