The declarations in this header file correspond to the definitions in test_common.c.
More...
#include <stdarg.h>
#include <stdbool.h>
#include "cdi_avm_api.h"
#include "cdi_avm_payloads_api.h"
#include "cdi_baseline_profile_api.h"
#include "cdi_logger_api.h"
#include "cdi_log_enums.h"
Go to the source code of this file.
|
#define | PAYLOAD_PROGRESS_UPDATE_FREQUENCY (60) |
| How often to update stdout with payload progress.
|
|
#define | DEFAULT_PROTOCOL_TYPE (kProtocolTypeRaw) |
| Default value for protocol type.
|
|
#define | DEFAULT_NUM_TRANSACTIONS (0) |
| Default number of transactions. 0= Run forever.
|
|
#define | DEFAULT_PAYLOAD_SIZE (5184000) |
| Default payload size.
|
|
#define | DEFAULT_USE_EFA (true) |
| Default EFA usage.
|
|
#define | ARRAY_ELEMENT_COUNT(thisarray) ((int)(sizeof(thisarray)/sizeof(thisarray[0]))) |
| Number of elements in a static array.
|
|
|
typedef struct CommandLineState | CommandLineState |
| Forward reference of structure to create pointers later.
|
|
typedef struct CommandLineState * | CommandLineHandle |
| Forward reference of structure to create pointers later.
|
|
|
bool | TestStringToInt (const char *str, int *num_ptr, char **ret_end_str) |
|
bool | TestCommandLineParserCreate (int *argc_ptr, const char ***argv_ptr, CommandLineHandle *ret_handle) |
|
void | TestCommandLineParserDestroy (CommandLineHandle handle) |
|
void | SimpleConsoleLog (CdiLogLevel log_level, const char *format_str,...) |
|
void | TestLogAVMChanges (uint16_t stream_identifier, int payload_size, CdiAvmConfig *config_ptr, const CdiAvmBaselineConfig *baseline_config_ptr, CdiAvmBaselineConfig *last_baseline_config_ptr) |
|
The declarations in this header file correspond to the definitions in test_common.c.
◆ SimpleConsoleLog()
void SimpleConsoleLog |
( |
CdiLogLevel | log_level, |
|
|
const char * | format_str, |
|
|
| ... ) |
Not using the console logger, so implement this API here so it can be used from within test_common.c and test applications that use this file.
- Parameters
-
log_level | The log level for this message. |
format_str | Format string specifier. |
... | The remaining parameters contain a variable length list of arguments. |
◆ TestCommandLineParserCreate()
bool TestCommandLineParserCreate |
( |
int * | argc_ptr, |
|
|
const char *** | argv_ptr, |
|
|
CommandLineHandle * | ret_handle ) |
Create an instance of a command line parser.
- Parameters
-
argc_ptr | Pointer to number of command line arguments. |
argv_ptr | Pointer pointer to array of pointers to command line arguments. |
ret_handle | Address where to write returned handle of parser. |
- Returns
- true if successful, otherwise false.
◆ TestCommandLineParserDestroy()
Destroy an instance of the command line parser.
- Parameters
-
◆ TestLogAVMChanges()
- Parameters
-
stream_identifier | |
payload_size | |
config_ptr | |
baseline_config_ptr | |
last_baseline_config_ptr | |
◆ TestStringToInt()
bool TestStringToInt |
( |
const char * | str, |
|
|
int * | num_ptr, |
|
|
char ** | ret_end_str ) |
Convert a string to an integer.
- Parameters
-
str | Pointer to string to convert. |
num_ptr | Address where to write converted integer value. |
ret_end_str | Optional address where to write pointer to string after last character parsed. |
- Returns
- true if successful, otherwise false.