Rtnl2EnablePhysicalTxQueueTimestamping

Rtnl2EnablePhysicalTxQueueTimestamping enables the egress timestamping logic on a Physical Transmit Queue and creates an event to monitor Egress Timestamps.

Syntax

Copy
BOOL Rtnl2EnablePhysicalTxQueueTimestamping(
  [in]    RTNL2_HPHYSICAL_TX_QUEUE PhysicalTxQueue,
  [out]   HANDLE *pEvent
);

Parameters

[in] PhysicalTxQueue

A handle to the Physical Transmit Queue returned by the Rtnl2CreatePhysicalTxQueueEvent function.

[out] pEvent

A handle to the event used to notify the availability of a new Egress Timestamp.

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.

Possible error codes:

Error code Meaning

ERROR_ALREADY_EXISTS

The calling process has already called Rtnl2EnablePhysicalTxQueueTimestamping for this PhysicalTransmit Queue, which means that the Egress Timestamp event has already been created.

ERROR_DEVICE_FEATURE_NOT_SUPPORTED

Hardware timestamping is not supported by the hardware.

ERROR_INVALID_PARAMETER

One of the following conditions occurred:

  • The supplied Physical Transmit Queue handle is not valid.
  • Parameter pEvent is NULL.

ERROR_NOT_READY

The calling process has not called Rtnl2Init.

RTNL2_ERROR_NO_MORE_COMMUNICATION

Unable to communicate with the NL2 process. This might be because the NL2 process is not running anymore, or because an application process thread was terminated during a previous call to an NL2 API function.

RTNL2_ERROR_PHYSICAL_TX_QUEUE_IS_RELEASING

Another thread of the calling process is executing Rtnl2ReleasePhysicalTxQueue at the same time.

RTNL2_ERROR_PHYSICAL_TX_QUEUE_NOT_READY

The Physical Transmit Queue is not ready.

RTNL2_ERROR_SERIALIZED_COMMAND_TIMEOUT

The NL2 process didn't reply within an acceptable amount of time.

Remarks

The Egress Timestamp event is automatically destroyed by the NL2 when the Physical Transmit Queue is destroyed.

Characteristics

Real-time

Deterministic

No

Local memory usage

Process

External MSpace usage

Internal MSpace usage

System

No Yes. This function will allocate memory for the Event kernel object.

NL2 process

No Yes. This function will allocate memory for the object handle.

Calling process

No

Yes. This function will allocate memory for the object handle.

Contiguous memory usage

Usage

No

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

Rtnl2Api.h

Rtnl2Api.lib

See Also: