ndUDS06ReadMemoryByAddress
- Updated2025-10-07
- 2 minute(s) read
Purpose
Executes the UDS ReadMemoryByAddress service. Reads data from the ECU memory.
Format
long ndUDS06ReadMemoryByAddress(
TD1 *diagRef,
unsigned char memAddrLen,
unsigned char memSizeLen,
unsigned long address,
unsigned long size,
unsigned char dataOut[],
long *len,
LVBoolean *success);
Input
diagRef
Specifies the handle for the diagnostic session, obtained from ndOpenDiagnosticOnCANFD or ndOpenDiagnosticOnIPStack and passed to subsequent diagnostic functions. Normally, it is not necessary to manually manipulate the elements of this struct.
memAddrLen
Defines the number of address bytes transferred to the ECU. This implicitly defines the maximum allowed for the address parameter.
memSizeLen
Defines the number of size bytes transferred to the ECU. This implicitly defines the maximum allowed for the size parameter.
address
Defines the memory address from which data are read.
size
Defines the length of the memory block to be read. Output
dataOut
Returns the memory data from the ECU.
len
On input, len must contain the dataOut array length. On return, it contains the number of valid data bytes in the dataOut array.
success
Indicates successful receipt of a positive response message for this diagnostic service.
Return Value
The return value indicates the function call status as a signed 32-bit integer. Zero means the function executed successfully. A negative value specifies an error, which means the function did not perform the expected behavior. A positive value specifies a warning, which means the function performed as expected, but a condition arose that may require attention.
Use the ndStatusToString function to obtain a descriptive string for the return value.
DescriptionSimilar to ndUDSReadMemoryByAddress. You can define the address and size parameter sizes in bytes.