Quantex GmbH
DE RU EN

LinkTest Запуск теста связи

Description

The function passes the test package to the adapter, which returns it back.

long LinkTest (unsigned long DeviceID, unsigned long Length, unsigned char* Data)

Options

Returned error codes

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
ERR_INVALID_TEST_DATA Test package returned from adapter distorted
ERR_INVALID_LEN_TEST_DATA Invalid test packet length

Example

#include "j2534_lib.hpp"

unsigned long DeviceID;
unsigned long Ret;
const unsigned char* TestData[] = {"Test"};

Ret = LinkTest(DeviceID, &TestData, sizeof(TestData));
if (Ret != STATUS_NOERROR)
{
    // Error handling
}