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

This file contains definitions and functions for the CDI unit test application. More...

#include "cdi_test_unit_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...
 

Macros

#define TestConsoleLog   SimpleConsoleLog
 Define TestConsoleLog.
 

Functions

void PrintHelp (void)
 
static bool ParseCommandLine (int argc, const char **argv, TestSettings *test_settings_ptr)
 
int main (int argc, const char **argv)
 

Detailed Description

This file contains definitions and functions for the CDI unit test application.

Function Documentation

◆ main()

int main ( int argc,
const char ** argv )

C main entry function.

Parameters
argcNumber of command line arguments.
argvPointer to array of pointers to command line arguments.
Returns
0 on success, otherwise 1 indicating a failure occurred.

◆ ParseCommandLine()

static bool ParseCommandLine ( int argc,
const char ** argv,
TestSettings * test_settings_ptr )
static

Parse command line and write to the specified TestSettings structure.

Parameters
argcNumber of command line arguments.
argvPointer to array of pointers to command line arguments.
test_settings_ptrAddress where to write returned settings.
Returns
true if successful, otherwise false.

◆ PrintHelp()

void PrintHelp ( void )

Output command line help message.