CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
|
The declarations in this header file correspond to the definitions in test_args.c. More...
#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_logger_api.h"
#include "cdi_os_api.h"
#include "cdi_utility_api.h"
Go to the source code of this file.
Data Structures | |
struct | StreamSettings |
A structure that holds all the settings for a stream as set from the command line. More... | |
struct | TestSettings |
A structure that holds all the test settings for a connection as set from the command line. More... | |
struct | GlobalTestSettings |
A structure that holds all of the global test settings set from the command-line. More... | |
Typedefs | |
typedef struct TestConnectionInfo | TestConnectionInfo |
Forward reference. Contains connection state and test settings. | |
Enumerations | |
enum | TestPatternType { kTestPatternSame , kTestPatternInc , kTestPatternSHR , kTestPatternSHL , kTestPatternNone , kTestPatternIgnore } |
enum | TestOptionNames { kTestOptionLogSingleFile , kTestOptionLogMultipleFiles , kTestOptionUseStderr , kTestOptionMultiWindowConsole , kTestOptionConnectionName , kTestOptionTransmit , kTestOptionReceive , kTestOptionAVMAutoRx , kTestOptionAVMVideo , kTestOptionAVMAudio , kTestOptionAVMAncillary , kTestOptionStreamID , kTestOptionConfigSkip , kTestOptionKeepAlive , kTestOptionAdapter , kTestOptionBufferType , kTestOptionLocalIP , kTestOptionDestPort , kTestOptionRemoteIP , kTestOptionBindIP , kTestOptionShareThread , kTestOptionCore , kTestOptionPayloadSize , kTestOptionNumTransactions , kTestOptionRate , kTestOptionTxTimeout , kTestOptionRxBufferDelay , kTestOptionPattern , kTestOptionPatternStart , kTestOptionUseRiffFile , kTestOptionFileRead , kTestOptionFileWrite , kTestOptionNewConnection , kTestOptionNewConnectionMultipleEndpoints , kTestOptionNewStream , kTestOptionConnectionTimeout , kTestOptionLogLevel , kTestOptionLogComponent , kTestOptionLogTimestamps , kTestOptionNumLoops , kTestOptionStatsConfigPeriod , kTestOptionStatsConfigCloudWatch , kTestOptionNoPayloadUserData , kTestOptionHelp , kTestOptionHelpVideo , kTestOptionHelpAudio , kTestOptionHelpRiff , kTestOptionHelpStats , kTestOptionVersion } |
enum | ProgramExecutionStatus { kProgramExecutionStatusContinue , kProgramExecutionStatusExitOk , kProgramExecutionStatusExitError } |
Functions | |
void | PrintTestSettings (const TestSettings *const test_settings_ptr, const int num_connections) |
void | LogComponentToString (const CdiEnumStringKey *key_array, char *log_component_str, CdiLogComponent *log_component_ptr) |
A function that turns selected log components into a string of log components delimited by the '|' character. | |
ProgramExecutionStatus | GetArgs (int argc, const char **argv_ptr, TestSettings *test_settings_ptr, int *num_connections_found) |
The declarations in this header file correspond to the definitions in test_args.c.
Enumerated type that can be used to indicate whether the program should exit and whether it should do so with a 0 or a 1 exit status.
enum TestOptionNames |
Enum for the list of test command line options. NOTE: Must keep in sync with OptDef my_options[] table in test_args.c.
enum TestPatternType |
Enum for test pattern types. This list kept in sync with patterns_array[].
ProgramExecutionStatus GetArgs | ( | int | argc, |
const char ** | argv_ptr, | ||
TestSettings * | test_settings_ptr, | ||
int * | num_connections_found ) |
A helper function that takes in command-line arguments, sanitizes them for syntax and correctness, and then assigns them to the test_settings data structure.
argc | The system command line argument count variable. |
argv_ptr | The pointer to the system command line arguments array. |
test_settings_ptr | Pointer to an array of test settings data structures we will modify. |
num_connections_found | Pointer to the number of connections found. |
void LogComponentToString | ( | const CdiEnumStringKey * | key_array, |
char * | log_component_str, | ||
CdiLogComponent * | log_component_ptr ) |
A function that turns selected log components into a string of log components delimited by the '|' character.
key_array | Array of log component (enum, string) items. |
log_component_str | A pointer to the buffer that the resulting log component string will be held. |
log_component_ptr | A pointer to the array of selected log components; this is held in the global_test_settings structure. |
void PrintTestSettings | ( | const TestSettings *const | test_settings_ptr, |
const int | num_connections ) |
Pretty-print the test settings.
test_settings_ptr | Pointer to the test settings struct. |
num_connections | The number of connections in the test_settings array. |