Rtnl2TransmitOverLogicalTxQueue
Rtnl2TransmitOverLogicalTxQueue transmits one frame through a specified Logical Transmit Queue.
Syntax
BOOL Rtnl2TransmitOverLogicalTxQueue(
[in] RTNL2_HLOGICAL_TX_QUEUE LogicalTxQueue,
[in, out] RTNL2_TRANSMIT_DESC *pTransmitDesc,
[in] ULONG DescStructSize
);
Parameters
[in] LogicalTxQueue
A handle to the Logical Transmit Queue returned by the Rtnl2CreateLogicalTxQueue function.
[in, out] pTransmitDesc
The address of the RTNL2_TRANSMIT_DESC structure (allocated by the caller) describing the requested transmit operation.
[in] DescStructSize
The size of the RTNL2_TRANSMIT_DESC structure.
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_DEVICE_FEATURE_NOT_SUPPORTED |
The RTNL2_TRANSMIT_DESC.EgressTimestampRequired field in the supplied pTransmitDesc structure is set to TRUE but the underlying hardware doesn’t support hardware timestamping. |
|
ERROR_DEVICE_NO_RESOURCES |
There are no available NL2 buffers in the Logical Transmit Queue. |
|
ERROR_INVALID_PARAMETER |
One of the following conditions occurred:
|
| RTNL2_ERROR_EGRESS_TIMESTAMP_IN_PROGRESS | The RTNL2_TRANSMIT_DESC.EgressTimestampRequired field in the supplied pTransmitDesc structure is set to TRUE but there is already an Egress Timestamping operation in progress on that Logical Transmit Queue. The application must wait until the Egress Timestamp event is signaled by the NL2 and must call the Rtnl2GetLogicalTxQueueTimestamp function before it can transmit another to-be-timestamped frame. |
|
RTNL2_ERROR_OVERSIZED_FRAME |
The length of the supplied frame is greater than what the hardware can transmit. |
|
RTNL2_ERROR_INCOMPATIBLE_REQUEST |
The supplied pTransmitDesc structure contains fields that this version of the NL2 doesn’t know how to interpret. |
|
RTNL2_ERROR_LOGICAL_TX_QUEUE_IS_DESTROYING |
Another thread of the calling process is executing Rtnl2DestroyLogicalTxQueue at the same time. |
|
RTNL2_ERROR_NO_MORE_COMMUNICATION |
Unable to communicate with the NL2 process. This might be because the NL2 process is no longer running, or because an application process thread was terminated during a previous call to an NL2 API function. |
| RTNL2_ERROR_LOGICAL_TX_QUEUE_TIMESTAMPING_NOT_ENABLED |
The RTNL2_TRANSMIT_DESC.EgressTimestampRequired field in the supplied pTransmitDesc structure is set to TRUE but Rtnl2EnableLogicalTxQueueTimestamping has not been called successfully on this Logical Transmit Queue. |
| ERROR_NOT_READY | The calling process has not called Rtnl2Init. |
Remarks
The RTNL2_TRANSMIT_DESC structure pointed by parameter pTransmitDesc must be allocated by the caller. The NL2 does not keep track of it. Once the function returns, the caller can either reuse that structure for another transmit operation or free it.
The caller MUST zero-out the structure pointed to by parameter pTransmitDesc to zero before populating it, and MUST set parameter DescStructSize to sizeof(RTNL2_TRANSMIT_DESC) to ensure backward and forward compatibility.
Rtnl2TransmitOverLogicalTxQueue obtains one of the available NL2 buffers that compose the Logical Transmit Queue, copies the supplied frame content into the NL2 buffer, and marks the NL2 buffer as ready for transmit through the underlying Physical Transmit Queue. The actual transmission occurs immediately if the Physical Transmit Queue is available, otherwise it is completed asynchronously by the Transmit Queue sharing thread.
Characteristics
| Real-time | ||
|
Deterministic |
No |
|
| Local memory usage | ||
|
Process |
External MSpace usage |
Internal MSpace usage |
|
System |
No |
No |
|
NL2 process |
No |
No |
|
Calling process |
No |
No |
| Contiguous memory usage | ||
|
Usage |
No |
|
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
eRTOS 1.0 SDK |
Rtnl2Api.h |
Rtnl2Api.lib |
See Also: