The declarations in this header file correspond to the definitions in internal_rx.c.
More...
Go to the source code of this file.
|
typedef struct RxPayloadWorkRequestState * | RxPayloadWorkRequestHandle |
| Type used as the handle (pointer to an opaque structure) for a Rx work request. Each handle represents a instance of a Rx work request structure. FIFO.
|
|
|
CdiReturnStatus | RxCreateInternal (CdiConnectionProtocolType protocol_type, CdiRxConfigData *config_data_ptr, CdiCallback rx_cb_ptr, CdiConnectionHandle *ret_handle_ptr) |
|
void | RxConnectionDestroyInternal (CdiConnectionHandle con_handle) |
|
CdiReturnStatus | RxEndpointCreateDynamicPools (CdiEndpointHandle handle) |
| Create dynamically allocated memory pools for the specified endpoint.
|
|
void | RxEndpointDestroy (CdiEndpointHandle handle) |
|
void | RxPacketReceive (void *param_ptr, Packet *packet_ptr, EndpointMessageType message_type) |
|
void | RxSendPayload (CdiEndpointState *endpoint_ptr, RxPayloadState *send_payload_state_ptr) |
|
void | RxFreePayloadResources (CdiEndpointState *endpoint_ptr, RxPayloadState *payload_state_ptr, bool free_memory_state) |
|
void | RxInvokeAppPayloadCallback (CdiConnectionState *con_state_ptr, AppPayloadCallbackData *app_cb_data_ptr) |
|
CdiReturnStatus | RxEnqueueFreeBuffer (const CdiSgList *sgl_ptr) |
|
bool | RxPollFreeBuffer (void *param_ptr, CdiSgList *ret_packet_buffer_sgl_ptr) |
|
void | RxEndpointFlushResources (CdiEndpointState *endpoint_ptr) |
|
The declarations in this header file correspond to the definitions in internal_rx.c.
◆ RxConnectionDestroyInternal()
◆ RxCreateInternal()
Create a raw receiver connection.
- Parameters
-
protocol_type | Specifies the protocol for payload (E.g. RAW or AVM) |
config_data_ptr | Address of a structure with all of the parameters to use for setting up the connection. |
rx_cb_ptr | The address of a function which will be called whenever a payload is received from the remote host. |
ret_handle_ptr | An address which will receive the handle of the newly created connection. |
- Returns
- kCdiStatusOk if the connection was successfully created, otherwise a value indicating why it failed.
◆ RxEndpointCreateDynamicPools()
Create dynamically allocated memory pools for the specified endpoint.
- Parameters
-
handle | Handle of endpoint to create dynamic memory pools. |
- Returns
- kCdiStatusOk if the connection was successfully created, otherwise a value indicating why it failed.
◆ RxEndpointDestroy()
Destroy resources associated with the specified endpoint.
- Parameters
-
handle | Handle of endpoint to destroy. |
◆ RxEndpointFlushResources()
Flush resources associated with Rx. NOTE: This function should only be called after the thread has been paused using EndpointManagerThreadWait().
- Parameters
-
endpoint_ptr | Pointer to endpoint to free resources. |
◆ RxEnqueueFreeBuffer()
Enqueue to free the receive buffer.
- Parameters
-
sgl_ptr | The scatter-gather list containing the memory to be freed. |
- Returns
- kCdiStatusOk if the connection was successfully created, otherwise a value indicating why it failed.
◆ RxFreePayloadResources()
Free payload resources.
- Parameters
-
endpoint_ptr | Pointer to connection state structure. |
payload_state_ptr | Pointer to payload structure being updated. |
free_memory_state | |
◆ RxInvokeAppPayloadCallback()
Invoke the user registered Rx callback function for a payload.
- Parameters
-
con_state_ptr | Pointer to connection state data. |
app_cb_data_ptr | Pointer to application callback data. |
◆ RxPacketReceive()
A packet has been received by the receiver. Need to reassemble it into a payload and send the payload SGL to the application.
- Parameters
-
param_ptr | Pointer to connection that the packet was received on as a void*. |
packet_ptr | Pointer to the received packet. |
message_type | Endpoint message type. |
◆ RxPollFreeBuffer()
bool RxPollFreeBuffer |
( |
void * | param_ptr, |
|
|
CdiSgList * | ret_packet_buffer_sgl_ptr ) |
Called from PollThread() in the adapter to poll if any Rx buffers need to be freed. If there are any, this function will free payload level resources and then return a list of adapter packet buffer SGLs that need to be freed by the caller.
- Parameters
-
param_ptr | A pointer to data used by the function. |
ret_packet_buffer_sgl_ptr | Pointer to address where to write the returned packet buffer SGL that needs to be freed by the caller. |
- Returns
- Returns true if an adapter buffer SGL is being returned.
◆ RxSendPayload()
Send the payload on to the next stage because it is complete or determined to be in error.
- Parameters
-
endpoint_ptr | Pointer to endpoint state structure. |
send_payload_state_ptr | Pointer to the payload state for the completed payload. |