|
CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
|
This file contains definitions and functions for the transmit-side CDI minimal test application. More...
#include <assert.h>#include <inttypes.h>#include <stdbool.h>#include "cdi_baseline_profile_01_00_api.h"#include "cdi_baseline_profile_02_00_api.h"#include "cdi_core_api.h"#include "cdi_raw_api.h"#include "test_common.h"Data Structures | |
| struct | TestSettings |
| A structure that holds all the test settings for a connection as set from the command line. More... | |
| struct | TestConnectionInfo |
| A structure for storing all info related to a specific connection, including test settings, connection configuration data from the SDK, and state information for the test connection. More... | |
Macros | |
| #define | DEFAULT_RATE_NUMERATOR (60) |
| Default rate numerator. | |
| #define | DEFAULT_RATE_DENOMINATOR (1) |
| Default rate denominator. | |
| #define | DEFAULT_TX_TIMEOUT (16666) |
| Default Tx timeout. | |
| #define | TestConsoleLog SimpleConsoleLog |
| Define TestConsoleLog. | |
Functions | |
| void | PrintHelp (void) |
| static bool | ParseCommandLine (int argc, const char **argv, TestSettings *test_settings_ptr) |
| static void | TestConnectionCallback (const CdiCoreConnectionCbData *cb_data_ptr) |
| static void | ProcessCoreTxCallback (TestConnectionInfo *connection_info_ptr, const CdiCoreCbData *core_cb_data_ptr) |
| static void | TestAvmTxCallback (const CdiAvmTxCbData *cb_data_ptr) |
| static CdiReturnStatus | MakeAvmConfig (const TestConnectionInfo *connection_info_ptr, CdiAvmConfig *avm_config_ptr, int *payload_unit_size_ptr) |
| static CdiReturnStatus | SendAvmPayload (TestConnectionInfo *connection_info_ptr, CdiSgList *sgl_ptr, CdiPtpTimestamp *timestamp_ptr, CdiAvmConfig *avm_config_ptr, int stream_identifier) |
| static void | TestRawTxCallback (const CdiRawTxCbData *cb_data_ptr) |
| static CdiReturnStatus | SendRawPayload (TestConnectionInfo *connection_info_ptr, CdiSgList *sgl_ptr, CdiPtpTimestamp *timestamp_ptr) |
| int | main (int argc, const char **argv) |
This file contains definitions and functions for the transmit-side CDI minimal test application.
| int main | ( | int | argc, |
| const char ** | argv ) |
C main entry function.
| argc | Number of command line arguments. |
| argv | Pointer to array of pointers to command line arguments. |
|
static |
Creates the generic configuration structure to use when sending AVM payloads.
| connection_info_ptr | Pointer to a structure containing user settings needed for the configuration. |
| avm_config_ptr | Address of where to write the generated generic configuration structure. |
| payload_unit_size_ptr | Pointer to the location into which the payload unit size is to be written. This value needs to be set in payload_config_ptr->core_config_data.unit_size for calls to CdiAvmTxPayload(). |
|
static |
Parse command line and write to the specified TestSettings structure.
| argc | Number of command line arguments. |
| argv | Pointer to array of pointers to command line arguments. |
| test_settings_ptr | Address where to write returned settings. |
| void PrintHelp | ( | void | ) |
Output command line help message.
|
static |
Process core Tx callback, that is common to both AVM and RAW Tx payload callbacks.
| connection_info_ptr | Pointer to test connection state data. |
| core_cb_data_ptr | Pointer to core callback data. |
|
static |
Send a payload using an AVM API function.
| connection_info_ptr | Pointer to connection info structure. |
| sgl_ptr | Pointer to SGL. |
| timestamp_ptr | Pointer to timestamp. |
| avm_config_ptr | Pointer to the generic configuration structure to use for the stream. |
| stream_identifier | Stream identifer. |
|
static |
Send a payload using a RAW API function.
| connection_info_ptr | Pointer to connection info structure. |
| sgl_ptr | Pointer to SGL. |
| timestamp_ptr | Pointer to timestamp. |
|
static |
Handle the Tx AVM callback. NOTE: Only used by the AVM API functions.
| cb_data_ptr | Pointer to Tx AVM callback data. |
|
static |
Handle the connection callback.
| cb_data_ptr | Pointer to CdiCoreConnectionCbData callback data. |
|
static |
Handle the Tx RAW callback. NOTE: Only used by the RAW API functions.
| cb_data_ptr | Pointer to Tx RAW callback data. |