Retrieve the receive timestamp from the packet buffer.
HPESTATUS hpe1588GetRxTimestamp(
HPEHANDLE devhandle,
void *pktbuf,
HPE_1588_TIMESTAMP *rxts
);
devhandle
pktbuf
rxts
HPE_1588_TIMESTAMP structure to receive the timestamp. How to prepare a queue and handle receive timestamps:
// Assume that queue 1 will generate receive timestamps for each frame // Prepare the queue: hpeSetReceiveQueueAttribs(hpe, 1, HPE_RX_TIMESTAMP); : // The timestmap data will be inserted ahead of the receive data. // Find the offset to the packet data: DWORD timestamp_extra; // number of bytes prepended to receive data for timestamp hpe1588GetRxTimestampHeaderSize(hpe, ×tamp_extra); : // receive a buffer HPERXBUFFERSET *rxs = NULL; HPE_1588_TIMESTAMP ts; BYTE *frame; hpeWaitForReceiveQueueComplete(hpe, 1, INFINITE); hpeGetReceiveQueueBuffer(hpe, 1, &rxbuf); // read timestamp into ts structure hpe1588GetRxTimestamp(hpe, rxbuf->ptr, &ts); // now point to frame data for processing frame = rxbuf->ptr + timestamp_extra;
A status value indicating the success or failure of the operation:
E_OK |
The operation completed successfully. |
E_EXIST |
The handle given is not a handle for an open HPE interface. |
E_SUPPORT |
IEEE1588 functionality is not supported by the hardware interface. |
| Versions | Defined in | Include | Link to |
|---|---|---|---|
| INtime 6.0 (HPE3) | intime/rt/include/hpeif2.h | hpeif2.h | hpeif2.lib |