CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
|
This file contains the definitions of the functions that comprise the CDI Utility Functions API. More...
#include "cdi_utility_api.h"
#include <assert.h>
#include <stddef.h>
#include "cdi_baseline_profile_api.h"
#include "cdi_core_api.h"
#include "cdi_test_unit_api.h"
#include "cdi_os_api.h"
#include "utilities_api.h"
Macros | |
#define | RTP_ROLLOVER_COUNT 0x100000000ULL |
How many times an RTP counter increments before rolling over. An RTP timestamp is specified in IETF RFC 3550 as a 32 bit value. | |
Functions | |
const CdiEnumStringKey * | CdiUtilityKeyGetArray (CdiEnumStringKeyType key_type) |
const char * | CdiUtilityEnumValueToString (const CdiEnumStringKey *key_array, int enum_value) |
int | CdiUtilityStringToEnumValue (const CdiEnumStringKey *key_array, const char *name_str) |
const char * | CdiUtilityKeyEnumToString (CdiEnumStringKeyType key_type, int enum_value) |
int | CdiUtilityKeyStringToEnum (CdiEnumStringKeyType key_type, const char *name_str) |
uint32_t | CdiUtilityPtpToRtp (const CdiPtpTimestamp *ptp_timestamp_ptr, uint32_t sample_rate) |
Function used to convert a PTP timestamp into an RTP timestamp. | |
uint64_t | CdiUtilityPtpTimestampToMicroseconds (const CdiPtpTimestamp *timestamp_ptr) |
Variables | |
static const CdiEnumStringKey | adapter_type_key_array [] |
Enum/string keys for CdiAdapterTypeSelection. | |
static const CdiEnumStringKey | buffer_type_key_array [] |
Enum/string keys for CdiBufferType. | |
static const CdiEnumStringKey | protocols_key_array [] |
Enum/String keys for ConnectionProtocolType. | |
static const CdiEnumStringKey | log_method_key_array [] |
Enum/string keys for CdiLogMethod. | |
static const CdiEnumStringKey | log_component_key_array [] |
Enum/string keys for CdiLogComponent. | |
static const CdiEnumStringKey | log_level_key_array [] |
Enum/string keys for CdiLogLevel. | |
static const CdiEnumStringKey | connection_status_key_array [] |
Enum/string keys for CdiConnectionStatus. | |
This file contains the definitions of the functions that comprise the CDI Utility Functions API.
const char * CdiUtilityEnumValueToString | ( | const CdiEnumStringKey * | key_array, |
int | enum_value ) |
Convert an enum value to a string.
key_array | Pointer to array enum/string key pairs to use for the conversion. |
enum_value | Value to convert to a string. |
const char * CdiUtilityKeyEnumToString | ( | CdiEnumStringKeyType | key_type, |
int | enum_value ) |
Function used to convert an enum value to a string.
key_type | Enum from CdiEnumStringKeyType which indicates which key-value array to search for enum_value. |
enum_value | Value to convert to a string. |
const CdiEnumStringKey * CdiUtilityKeyGetArray | ( | CdiEnumStringKeyType | key_type | ) |
Function used to get a pointer to a key-value array of a type specified by key_type.
key_type | Enum from CdiEnumStringKeyType which indicates which key-value array to return. |
int CdiUtilityKeyStringToEnum | ( | CdiEnumStringKeyType | key_type, |
const char * | name_str ) |
Function used to convert a string to a matching enum value.
key_type | Enum from CdiEnumStringKeyType which indicates which key-value array to search for name_str. |
name_str | Pointer to string name of enumerated value. |
uint64_t CdiUtilityPtpTimestampToMicroseconds | ( | const CdiPtpTimestamp * | timestamp_ptr | ) |
Convert the specified PTP timestamp into microseconds.
timestamp_ptr | Pointer to PTP timestamp to convert. |
uint32_t CdiUtilityPtpToRtp | ( | const CdiPtpTimestamp * | ptp_timestamp_ptr, |
uint32_t | sample_rate ) |
Function used to convert a PTP timestamp into an RTP timestamp.
ptp_timestamp_ptr | A pointer to a PTP timestamp consisting of seconds and nanoseconds; |
sample_rate | A sample rate value in Hz for the number of samples per second used for the RTP units. |
int CdiUtilityStringToEnumValue | ( | const CdiEnumStringKey * | key_array, |
const char * | name_str ) |
Convert a string to a matching enum value.
key_array | Pointer to array enum/string key pairs to use for the conversion. |
name_str | Pointer to string name of enumerated value. |
|
static |
Enum/string keys for CdiAdapterTypeSelection.
|
static |
Enum/string keys for CdiBufferType.
|
static |
Enum/string keys for CdiConnectionStatus.
|
static |
Enum/string keys for CdiLogComponent.
|
static |
Enum/string keys for CdiLogLevel.
|
static |
Enum/string keys for CdiLogMethod.
|
static |
Enum/String keys for ConnectionProtocolType.