ndUDS06WriteMemoryByAddress
- Updated2024-08-07
- 1 minute(s) read
ndUDS06WriteMemoryByAddress
Purpose
Executes the UDS WriteMemoryByAddress service. Writes data to the ECU memory.
Format
long ndUDS06WriteMemoryByAddress(
TD1 *diagRef,
unsigned char memAddrLen,
unsigned char memSizeLen,
unsigned long address,
unsigned long size,
unsigned char dataIn[],
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 to which data are written.
size
Defines the length of the memory block to be written.
dataIn
Defines the memory block to be written to the ECU.
len
Must contain the number of (valid) data bytes in dataIn.
Output
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.
Description
Similar to the ndUDSWriteMemoryByAddress. You can define the address and size parameter sizes in bytes.