RtNalGetReceiveTimeStamp
RtNalGetReceiveTimeStamp returns the timestamp of the last received packet.
Syntax
BOOL RtNalGetReceiveTimeStamp( RTNAL_QUEUE_HANDLE queueHandle, PRTNAL_HW_TIME pHardwareTimeStamps );
Parameters
queueHandle
The receive queue handle returned by RtNalAcquireQueue.
pHardwareTimeStamps
An output pointer that will receive the hardware time stamps. This value cannot be NULL.
Return Value
Returns TRUE if the function succeeds. Otherwise it returns FALSE. Call GetLastError to obtain an error code. The possible error codes are listed below:
Error Code | Meaning |
---|---|
ERROR_DEVICE_FEATURE_NOT_SUPPORTED | The NIC driver does not support receive timestamps. |
ERROR_INVALID_DATA | The driver cannot obtain a valid time stamp. |
ERROR_INVALID_HANDLE | The argument queueHandle is invalid. |
ERROR_INVALID_PARAMETER | queueHandle or pHardwareTimeStamps is a NULL pointer. |
ERROR_NOT_READY |
RtNalInit has not completed successfully. |
Remarks
For a list of supported functions for specific drivers, see Matrix of Supported Real-Time NAL Functions by NIC Driver.
To get a result, the caller must:
- Enable time-stamping for a specific Ethernet type by calling RtNalSetReceiveFilterEntryEthertype.
- Set the PTP message type from RTNAL_PTP_MESSAGE_TYPE by calling RtNalSetReceiveTimeStampType.
The result is read from timestamp registers on the NIC. Once it's read, the value is no longer accessible as the registers are automatically cleared. The value will not be updated until it's read.
The caller must provide a non-NULL output pointer for the result.
While accepting a queue handle, this API is not queue specific. The queue handle is only needed to identify the precise NIC driver to access.
There are no receive timestamps per queue.
The RtNalE1000 driver does not support receive timestamps.
The RtNalIGC driver does not support the use of the RtNalGetReceiveTimeStamp function. If an application using the RtNalIGC driver needs to retrieve the receive timestamp, it must implement a receive callback and get the timestamp from the RTNAL_FRAME structure.
Requirements
Minimum Supported Version | RTX64 4.0 |
Header | rtnapi.h, RtNalApi.h |
Library | RtNal.lib |
See Also: