ndGetTimeStamp
- Updated2025-10-07
- 1 minute(s) read
Purpose
Gets timestamp information about the first/last send/received frame of the ISO TP for CAN and LIN.
Format
void ndGetTimeStamp (
TD1 *diagRef,
unsigned long long *timeStampWriteFirst,
unsigned long long *timeStampWriteLast,
unsigned long long *timeStampReadFirst,
unsigned long long *timeStampReadLast);
Input
diagRef
Specifies the diagnostic session handle, obtained from ndOpenDiagnosticOnCANFD or ndOpenDiagnosticOnLIN and passed to subsequent diagnostic functions. Normally, it is not necessary to manually manipulate the elements of this struct. Output
timeStampWriteFirst
Contains the timestamp of the first write frame. This is usually the FF or SF of the ISO TP.
timeStampWriteLast
Contains the timestamp of the last write frame. This is usually the CF or SF of the ISO TP.
timeStampReadFirst
Contains the timestamp of the first read frame. This is usually the FF or SF of the ISO TP.
timeStampReadLast
Contains the timestamp of the last read frame. This is usually the CF or SF of the ISO TP. Description
The received timestamps should be converted to system time using the FileTimeToLocalFileTime and FileTimeToSystemTime functions. Add <windows.h> to your project for this.
The UDS Get DTCs example includes an example for getting the timestamp.