跳转到内容

BM_ReadIsotp

函数名、签名、参数与返回值和 BMAPI SDK 保持一致,可直接用于开发、检索与代码审查。

Read data block using ISOTP protocol. This API enables rapid transmission using ISOTP without app intervention, a simple example would be reading VIN using UDS: uint8_t request[] = { 0x22, 0xF1, 0x80 }; uint8_t response[4096]; uint32_t nbytes = sizeof(response); BM_WriteIsotp(channel, request, sizeof(request), config); BM_ReadIsotp(channel, response, nbytes, config); assert(response[0] == 0x62 && response[1] == 0xF1 && response[2] == 0x80);.

BMAPI BM_StatusTypeDef BM_ReadIsotp (BM_ChannelHandle handle, const void *data, uint32_t *nbytes, int timeout, BM_IsotpConfigTypeDef *config)
Direction Name Description
[in] handle Handle to the channel to read from.
[in] data A caller-allocated buffer to hold the data block output.
[in,out] nbytes Length of the received data block, in bytes. Caller must initialize this arg with the size of the caller-allocated buffer.
[in] timeout Timeout (in milliseconds) before the message is received successfully from the bus. Set any negative number (i.e. -1) to wait infinitely. Set 0 if you would like to receive asynchronously: read from BMAPI internal buffer and return immediately, use BM_WaitForNotifications() before reading.
[in] config ISOTP configuration used by current transfer.

Operation status, see BM_StatusTypeDef for details.


This reference follows the current BUSMUST BMAPI SDK. For an installed package, its bundled header and help files define the exact version-specific contract.