The function starts a hardware test with an external test plug. This test checks the operation of CAN drivers, KL line drivers and the operation of the switch.
long HwTest(unsigned long DeviceID)
Definition | Description |
---|---|
STATUS_NOERROR | Function completed successfully |
ERR_DEVICE_NOT_CONNECTED | No connection to adapter. Possible reasons: The adapter is turned off, there is no network, or the IP address is not set correctly. |
ERR_INVALID_DEVICE_ID | Set a non-existent adapter ID DeviceID |
#include "j2534_lib.hpp"
unsigned long DeviceID;
unsigned long Ret;
Ret = HwTest(DeviceID);
if (Ret != STATUS_NOERROR)
{
// Error handling
}