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

Configuration data used by one of the Cdi...RxCreate() API functions. More...

#include <cdi_core_api.h>

Data Fields

CdiAdapterHandle adapter_handle
 Handle of the adapter to use for this connection. The handle is returned by the CdiCoreNetworkAdapterInitialize() API function.
 
int dest_port
 Destination port. Value must match the dest_port specified by the transmitter which must be configured to send to the same port number. If running in an unprivileged process, this value must be in the range of unprivileged port numbers.
 
const char * bind_ip_addr_str
 The IP address of the host interface to bind to for internal CDI command communication. If NULL, interface binding is not used (default behavior). NOTE: This must be the dotted form of an IPv4 address. DNS may be supported in the future.
 
int shared_thread_id
 To reduce CPU core usage, multiple connections can share the same poll thread by specifying a shared poll thread identifier. Any connection that uses the same identifier will share a single instance of the poll thread. Dynamically adding/removing connections while payloads are transferring may cause them to be late. Therefore, connections that share the same poll thread should be created and connected before payloads are transferred. If the thread identifier is 0 or negative (ie. -1), a unique poll thread is created and associated only with this connection. NOTE: If enabled (greater than 0), then all connections with matching shared_thread_id must also match in their setting of thread_core_num.
 
int thread_core_num
 The core to dedicate to this connection's packet reception poll thread. A value of -1 disables pinning the thread to a specific core otherwise the value must be between 0 (inclusive) and the number of CPU cores (exclusive) in the host. The packet receive thread continuously polls the underlying hardware for packets so it always consumes 100% of the available time on whatever CPU it's running whether pinned or not.
 
CdiBufferType rx_buffer_type
 Type of RX buffer to use for incoming data.
 
int buffer_delay_ms
 Number of milliseconds to delay invoking the user-registered callback function for incoming payloads. Use 0 to disable, -1 to enable and the SDK automatic default value (CDI_ENABLED_RX_BUFFER_DELAY_DEFAULT_MS) or use a value up to MAXIMUM_RX_BUFFER_DELAY_MS.
 
uint64_t linear_buffer_size
 Size in bytes of the linear receive buffer used by this RX connection. This buffer is reserved from the RX buffer allocated as part of initialization of the adapter (see adapter_rx_linear_buffer_size). NOTE: This value is only used if rx_buffer_type = kCdiLinearBuffer.
 
int max_simultaneous_rx_payloads_per_connection
 The max number of allowable payloads that can be simultaneously received on a single connection in the SDK. This number should be larger than the respective transmit limit since more payloads can potentially be in flight in the receive logic. This is because Tx packets can get acknowledged to the transmitter before being fully processed by the receiver, allowing the transmitter to send more. This number must also be as large or larger than the maximum SRD packet ordering window so that we can be sure we make enough room in our state arrays for tracking all possible payloads that could be in flight at the same time. NOTE: If it's 0, then CDI_MAX_SIMULTANEOUS_RX_PAYLOADS_PER_CONNECTION will be used.
 
CdiUserCbParameter user_cb_param
 User defined callback parameter passed to a registered user RX callback function. This allows the application to associate an RX connection to a single RX callback function.
 
const char * connection_name_str
 Pointer to name of the connection. It is used as an identifier when generating log messages that are specific to this connection. If NULL or points to '\0', it is given the name generated from the SDK found in the saved_connection_name_str member of CdiConnectionState.
 
CdiLogMethodDataconnection_log_method_data_ptr
 Pointer to log configuration data for this connection.
 
CdiCoreConnectionCallback connection_cb_ptr
 Address of the user function to call whenever the status of a connection changes.
 
CdiUserCbParameter connection_user_cb_param
 User defined callback parameter passed to the user registered RX connection callback function (see connection_cb_ptr). This allows the application to associate a RX connection to a single registered user callback function.
 
CdiCoreStatsCallback stats_cb_ptr
 Address of the user function to call whenever a new set of statistics is available.
 
CdiUserCbParameter stats_user_cb_param
 User defined callback parameter passed to the user registered statistics callback function (see stats_cb_ptr). This allows the application to associate statistics to a single registered user callback function.
 
CdiStatsConfigData stats_config
 Configuration data for gathering statistics. The data can be changed at runtime using the CdiCoreStatsReconfigure() API function.
 

Detailed Description

Configuration data used by one of the Cdi...RxCreate() API functions.


The documentation for this struct was generated from the following file: