CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
Loading...
Searching...
No Matches
User-Registered Callback Functions

User-Registered Callback Functions

There are some user-registered callback functions that must be implemented by the application. Each allows a user-defined parameter called "user_cb_param" to be passed to each of the callback functions. This can be used by the application to relate a TX payload or RX connection with the callback.

When using the CDI-RAW API, the transmitter must implement the CdiRawTxCallback() function. This callback function is invoked when a complete payload has been transmitted and acknowledged as being received by the receiver. The receiver must implement the CdiRawRxCallback() function. This callback function is invoked when a complete payload has been received. The receiving application must use the CdiCoreRxFreeBuffer() API to free the buffer. This can either be done within the user callback function or at a later time whenever the application is done with the buffer.

When using the CDI-AVM API, the transmitter must implement the CdiAvmTxCallback() function and the receiver the CdiAvmRxCallback() function.

The diagram shown below describes the user-defined parameter's data flow for both callback functions using the CDI-RAW API. The flow is the same for the CDI-AVM API.