CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
Loading...
Searching...
No Matches
test_common.h
Go to the documentation of this file.
1// -------------------------------------------------------------------------------------------
2// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
3// This file is part of the AWS CDI-SDK, licensed under the BSD 2-Clause "Simplified" License.
4// License details at: https://github.com/aws/aws-cdi-sdk/blob/mainline/LICENSE
5// -------------------------------------------------------------------------------------------
6
13#ifndef TEST_COMMON_H__
14#define TEST_COMMON_H__
15
16#include <stdarg.h>
17#include <stdbool.h>
18
19#include "cdi_avm_api.h"
22#include "cdi_logger_api.h"
23#include "cdi_log_enums.h"
24
25//*********************************************************************************************************************
26//***************************************** START OF DEFINITIONS AND TYPES ********************************************
27//*********************************************************************************************************************
28
33
35#define PAYLOAD_PROGRESS_UPDATE_FREQUENCY (60)
36
38#define DEFAULT_PROTOCOL_TYPE (kProtocolTypeRaw)
39
41#define DEFAULT_NUM_TRANSACTIONS (0)
42
44#define DEFAULT_PAYLOAD_SIZE (5184000)
45
47#define DEFAULT_USE_EFA (true)
48
50#define ARRAY_ELEMENT_COUNT(thisarray) ((int)(sizeof(thisarray)/sizeof(thisarray[0])))
51
52//*********************************************************************************************************************
53//******************************************* START OF PUBLIC FUNCTIONS ***********************************************
54//*********************************************************************************************************************
55
65bool TestStringToInt(const char* str, int* num_ptr, char** ret_end_str);
66
76bool TestCommandLineParserCreate(int* argc_ptr, const char*** argv_ptr, CommandLineHandle* ret_handle);
77
84
93void SimpleConsoleLog(CdiLogLevel log_level, const char* format_str, ...);
94
104void TestLogAVMChanges(uint16_t stream_identifier, int payload_size, CdiAvmConfig* config_ptr,
105 const CdiAvmBaselineConfig* baseline_config_ptr, CdiAvmBaselineConfig* last_baseline_config_ptr);
106
107#endif // TEST_COMMON_H__
This file declares the public API data types, structures and functions that comprise the CDI audio,...
This file declares the public API data types, structures and functions that facilitate parsing and sy...
This file contains declarations and definitions for the CDI AVM baseline profile API functions.
This file declares the public enum data types that are part of the CDI log API.
CdiLogLevel
This selector determines the log level of messages generated using the CdiLogMessageCallback()....
Definition cdi_log_enums.h:50
The declarations in this header file correspond to the definitions in logger.c.
Structure that aggregates the audio, video, and ancillary data structures into a single structure.
Definition cdi_baseline_profile_01_00_api.h:189
This is the generic AVM configuration structure which describes the format of each stream.
Definition cdi_avm_api.h:113
Definition test_common.c:34
struct CommandLineState * CommandLineHandle
Forward reference of structure to create pointers later.
Definition test_common.h:32
void TestCommandLineParserDestroy(CommandLineHandle handle)
Definition test_common.c:337
void TestLogAVMChanges(uint16_t stream_identifier, int payload_size, CdiAvmConfig *config_ptr, const CdiAvmBaselineConfig *baseline_config_ptr, CdiAvmBaselineConfig *last_baseline_config_ptr)
Definition test_common.c:348
bool TestCommandLineParserCreate(int *argc_ptr, const char ***argv_ptr, CommandLineHandle *ret_handle)
Definition test_common.c:310
void SimpleConsoleLog(CdiLogLevel log_level, const char *format_str,...)
Definition test_common.c:279
bool TestStringToInt(const char *str, int *num_ptr, char **ret_end_str)
Definition test_common.c:292