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

The declarations in this header file correspond to the definitions in internal_tx.c. More...

#include "adapter_api.h"
#include "private.h"
#include "cdi_core_api.h"
#include "cdi_raw_api.h"

Go to the source code of this file.

Data Structures

struct  TxPacketHeader
 Structure used to hold Tx packet headers. Must reside in the DMA Tx memory region, since it is used directly by the adapter. It includes space for message prefix. More...
 
struct  TxExtraPacketHeader
 Structure used to hold Tx packet headers that contain extra data. Must reside in the DMA Tx memory region, since it is used directly by the adapter. It includes space for message prefix. More...
 
struct  TxPacketWorkRequest
 Structure used to hold a transmit packet work request. The lifespan of a work request starts when a packet is queued to be sent and ends when a message is received that it has either been successfully sent or a failure has occurred. More...
 

Functions

CdiReturnStatus TxCreateInternal (CdiConnectionProtocolType protocol_type, CdiTxConfigData *config_data_ptr, CdiCallback tx_cb_ptr, CdiConnectionHandle *ret_handle_ptr)
 
CdiReturnStatus TxStreamConnectionCreateInternal (CdiTxConfigData *config_data_ptr, CdiCallback tx_cb_ptr, CdiConnectionHandle *ret_handle_ptr)
 
CdiReturnStatus TxStreamEndpointCreateInternal (CdiConnectionHandle handle, CdiTxConfigDataStream *stream_config_ptr, CdiEndpointHandle *ret_handle_ptr)
 
CdiReturnStatus TxPayloadInternal (CdiEndpointState *endpoint_ptr, const CdiCoreTxPayloadConfig *core_payload_config_ptr, const CdiSgList *sgl_ptr, int max_latency_microsecs, int extra_data_size, uint8_t *extra_data_ptr)
 
CdiReturnStatus TxConnectionThreadJoin (CdiConnectionHandle con_handle)
 
void TxConnectionDestroyInternal (CdiConnectionHandle con_handle)
 
void TxEndpointDestroy (CdiEndpointHandle handle)
 
void TxPacketWorkRequestComplete (void *param_ptr, Packet *packet_ptr, EndpointMessageType message_type)
 
void TxInvokeAppPayloadCallback (CdiConnectionState *con_state_ptr, AppPayloadCallbackData *app_cb_data_ptr)
 
void TxPayloadThreadFlushResources (CdiEndpointState *endpoint_ptr)
 

Detailed Description

The declarations in this header file correspond to the definitions in internal_tx.c.

Function Documentation

◆ TxConnectionDestroyInternal()

void TxConnectionDestroyInternal ( CdiConnectionHandle con_handle)

◆ TxConnectionThreadJoin()

CdiReturnStatus TxConnectionThreadJoin ( CdiConnectionHandle con_handle)

Join Tx connection threads as part of shutting down a connection. This function waits for them to stop.

Parameters
con_handleConnection handle.

◆ TxCreateInternal()

CdiReturnStatus TxCreateInternal ( CdiConnectionProtocolType protocol_type,
CdiTxConfigData * config_data_ptr,
CdiCallback tx_cb_ptr,
CdiConnectionHandle * ret_handle_ptr )
See also
CdiRawTxCreate

◆ TxEndpointDestroy()

void TxEndpointDestroy ( CdiEndpointHandle handle)

Destroy resources associated with the specified endpoint.

Parameters
handleHandle of endpoint to destroy.

◆ TxInvokeAppPayloadCallback()

void TxInvokeAppPayloadCallback ( CdiConnectionState * con_state_ptr,
AppPayloadCallbackData * app_cb_data_ptr )

Invoke the user registered Tx callback function for a payload.

Parameters
con_state_ptrPointer to connection state data.
app_cb_data_ptrPointer to application callback data.

◆ TxPacketWorkRequestComplete()

void TxPacketWorkRequestComplete ( void * param_ptr,
Packet * packet_ptr,
EndpointMessageType message_type )

A packet has been acknowledged as being received by the receiver. The SGL needs to be freed and we need to determine when the entire payload has been freed and then tell the application.

Parameters
param_ptrPointer to connection that the packet was transmitted on as a void*.
packet_ptrPointer to packet state data.
message_typeEndpoint message type.

◆ TxPayloadInternal()

CdiReturnStatus TxPayloadInternal ( CdiEndpointState * endpoint_ptr,
const CdiCoreTxPayloadConfig * core_payload_config_ptr,
const CdiSgList * sgl_ptr,
int max_latency_microsecs,
int extra_data_size,
uint8_t * extra_data_ptr )
See also
CdiRawTxPayload

◆ TxPayloadThreadFlushResources()

void TxPayloadThreadFlushResources ( CdiEndpointState * endpoint_ptr)

Flush resources associate with TxPayloadThread(). NOTE: This function should only be called after the thread has been paused using EndpointManagerThreadWait().

Parameters
endpoint_ptrPointer to endpoint to flush resources.

◆ TxStreamConnectionCreateInternal()

CdiReturnStatus TxStreamConnectionCreateInternal ( CdiTxConfigData * config_data_ptr,
CdiCallback tx_cb_ptr,
CdiConnectionHandle * ret_handle_ptr )

◆ TxStreamEndpointCreateInternal()

CdiReturnStatus TxStreamEndpointCreateInternal ( CdiConnectionHandle handle,
CdiTxConfigDataStream * stream_config_ptr,
CdiEndpointHandle * ret_handle_ptr )