CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
Loading...
Searching...
No Matches
rx_reorder_payloads.h File Reference

This header file contains definitions of types needed for the reordering of payloads. More...

#include <stdint.h>
#include "internal.h"

Go to the source code of this file.

Functions

RxPayloadStateRxReorderPayloadStateGet (CdiEndpointState *endpoint_ptr, CdiPoolHandle rx_payload_state_pool_handle, int sequence_num)
 
void RxReorderPayloadResetState (RxPayloadState *payload_state_ptr, int payload_num)
 
void RxReorderPayloadError (CdiEndpointState *endpoint_ptr, RxPayloadState *payload_state_ptr)
 Set payload in an error state and free associated payload resources (but not payload state).
 
bool RxReorderPayloadIsStale (CdiEndpointState *endpoint_ptr, RxPayloadState *payload_state_ptr)
 Determine if a payload has not received any packets within the packet out of order window. See CDI_MAX_RX_PACKET_OUT_OF_ORDER_WINDOW.
 
void RxReorderPayloadSendPayload (CdiEndpointState *endpoint_ptr, RxPayloadState *send_payload_state_ptr)
 
void RxReorderPayloadSendReadyPayloads (CdiEndpointState *endpoint_ptr)
 
void RxReorderPayloadSeekFirstPayload (CdiEndpointState *endpoint_ptr)
 

Detailed Description

This header file contains definitions of types needed for the reordering of payloads.

Function Documentation

◆ RxReorderPayloadError()

void RxReorderPayloadError ( CdiEndpointState * endpoint_ptr,
RxPayloadState * payload_state_ptr )

Set payload in an error state and free associated payload resources (but not payload state).

Parameters
endpoint_ptrPointer to endpoint state structure.
payload_state_ptrPointer to the payload state.

◆ RxReorderPayloadIsStale()

bool RxReorderPayloadIsStale ( CdiEndpointState * endpoint_ptr,
RxPayloadState * payload_state_ptr )

Determine if a payload has not received any packets within the packet out of order window. See CDI_MAX_RX_PACKET_OUT_OF_ORDER_WINDOW.

Parameters
endpoint_ptrPointer to endpoint state structure.
payload_state_ptrPointer to the payload state.
Returns
true if payload is stale, otherwise false.

◆ RxReorderPayloadResetState()

void RxReorderPayloadResetState ( RxPayloadState * payload_state_ptr,
int payload_num )

Reset payload state data.

Parameters
payload_state_ptrPointer to payload state data to reset.
payload_numPayload number to set.

◆ RxReorderPayloadSeekFirstPayload()

void RxReorderPayloadSeekFirstPayload ( CdiEndpointState * endpoint_ptr)

Advance the current Rx reorder window index to the first entry that contains a payload.

Parameters
endpoint_ptrPointer to endpoint state structure.

◆ RxReorderPayloadSendPayload()

void RxReorderPayloadSendPayload ( CdiEndpointState * endpoint_ptr,
RxPayloadState * send_payload_state_ptr )

Send the payload on to the next stage because it is complete or determined to be in error.

Parameters
endpoint_ptrPointer to endpoint state structure.
send_payload_state_ptrPointer to the payload state for the completed payload.

◆ RxReorderPayloadSendReadyPayloads()

void RxReorderPayloadSendReadyPayloads ( CdiEndpointState * endpoint_ptr)

Starting at the beginning of the payload state list, sends any payloads that are complete or in an error state.

Parameters
endpoint_ptrPointer to endpoint state structure.

◆ RxReorderPayloadStateGet()

RxPayloadState * RxReorderPayloadStateGet ( CdiEndpointState * endpoint_ptr,
CdiPoolHandle rx_payload_state_pool_handle,
int sequence_num )

Get pointer to Rx payload state structure for the specified payload sequence number. If one does not already exist then a new one is created.

Parameters
endpoint_ptrPointer to endpoint state structure.
rx_payload_state_pool_handleHandle of Rx payload state pool to use when allocating new payload state structures.
sequence_numPayload sequence number.
Returns
Pointer to returned Rx payload state structure. If an error occurred, NULL is returned.