CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
Loading...
Searching...
No Matches
endpoint_manager.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 ENDPOINT_MANAGER_H__
14#define ENDPOINT_MANAGER_H__
15
16// The configuration.h file must be included first since it can have defines which affect subsequent files.
17#include "configuration.h"
18
19#include "cdi_core_api.h"
20#include "cdi_os_api.h"
21#include "private.h"
22#include "protocol.h"
23
24//*********************************************************************************************************************
25//***************************************** START OF DEFINITIONS AND TYPES ********************************************
26//*********************************************************************************************************************
27
31typedef struct EndpointManagerGlobalState* EndpointManagerGlobalHandle;
32
38
49
54
55//*********************************************************************************************************************
56//******************************************* START OF PUBLIC FUNCTIONS ***********************************************
57//*********************************************************************************************************************
58
71 CdiUserCbParameter stats_user_cb_param,
72 const CdiStatsConfigData* stats_config_ptr,
73 EndpointManagerHandle* ret_handle_ptr);
74
81
90
98void EndpointManagerRemoteEndpointInfoSet(CdiEndpointHandle handle, const struct sockaddr_in* remote_address_ptr,
99 const char* stream_name_str);
100
109
118
127
135const struct sockaddr_in* EndpointManagerEndpointRemoteAddressGet(CdiEndpointHandle handle);
136
151 const char* dest_ip_addr_str, int dest_port,
152 const char* stream_name_str,
153 CdiEndpointHandle* ret_endpoint_handle_ptr);
154
168 const struct sockaddr_in* source_address_ptr,
169 const char* stream_name_str,
170 CdiEndpointHandle* ret_endpoint_handle_ptr);
171
182 const CdiProtocolVersionNumber* remote_version_ptr);
183
193
202
211
220
229
242CdiSignalType EndpointManagerThreadRegister(EndpointManagerHandle handle, const char* thread_name_str);
243
253
261bool EndpointManagerPoll(CdiEndpointHandle* handle_ptr);
262
272
282
289
296
303
312
321
333 const char* error_msg_str);
334
335#endif // ENDPOINT_MANAGER_H__
This file declares the public API data types, structures and functions that comprise the CDI low-leve...
CdiReturnStatus
Values used for API function return codes.
Definition cdi_core_api.h:189
void(* CdiCoreStatsCallback)(const CdiCoreStatsCbData *data_ptr)
Prototype of statistics callback function. The user code must implement a function with this prototyp...
Definition cdi_core_api.h:606
CdiConnectionStatus
This enumeration is used to indicate the current state of a connection. NOTE: Any changes made here M...
Definition cdi_core_api.h:368
void * CdiUserCbParameter
Type used as user defined data that is passed to the registered user RX/TX callback functions.
Definition cdi_core_api.h:182
This file contains the declarations for OS functions for creating/managing/freeing threads,...
struct CdiSignalType_t * CdiSignalType
Define portable signal type. Don't use void* here, which prevents the compiler from type checking.
Definition cdi_os_api.h:189
This header file contains definitions used to define the build configuration of the CDI SDK's impleme...
CdiReturnStatus EndpointManagerCreate(CdiConnectionHandle handle, CdiCoreStatsCallback stats_cb_ptr, CdiUserCbParameter stats_user_cb_param, const CdiStatsConfigData *stats_config_ptr, EndpointManagerHandle *ret_handle_ptr)
Definition endpoint_manager.c:490
bool EndpointManagerIsEndpoint(EndpointManagerHandle handle, CdiEndpointHandle endpoint_handle)
Definition endpoint_manager.c:1180
void EndpointManagerQueueEndpointReset(CdiEndpointHandle handle)
Definition endpoint_manager.c:693
const char * EndpointManagerEndpointRemoteIpGet(CdiEndpointHandle handle)
Definition endpoint_manager.c:675
AdapterEndpointHandle EndpointManagerEndpointToAdapterEndpoint(CdiEndpointHandle handle)
Definition endpoint_manager.c:1232
CdiSignalType EndpointManagerThreadRegister(EndpointManagerHandle handle, const char *thread_name_str)
Definition endpoint_manager.c:778
CdiEndpointHandle EndpointManagerGetFirstEndpoint(EndpointManagerHandle handle)
Definition endpoint_manager.c:1205
CdiReturnStatus EndpointManagerRxCreateEndpoint(EndpointManagerHandle handle, int dest_port, const struct sockaddr_in *source_address_ptr, const char *stream_name_str, CdiEndpointHandle *ret_endpoint_handle_ptr)
Definition endpoint_manager.c:1018
CdiReturnStatus EndpointManagerTxCreateEndpoint(EndpointManagerHandle handle, bool is_multi_stream, const char *dest_ip_addr_str, int dest_port, const char *stream_name_str, CdiEndpointHandle *ret_endpoint_handle_ptr)
Definition endpoint_manager.c:908
bool EndpointManagerIsConnectionShuttingDown(EndpointManagerHandle handle)
Definition endpoint_manager.c:808
EndpointManagerCommand
This enumeration is used in the EndpointManagerState structure to indicate what type of endpoint comm...
Definition endpoint_manager.h:43
@ kEndpointStateShutdown
Shutdown the endpoint.
Definition endpoint_manager.h:47
@ kEndpointStateIdle
Endpoint Manager is idle. Nothing special to do.
Definition endpoint_manager.h:44
@ kEndpointStateReset
Reset the endpoint.
Definition endpoint_manager.h:45
@ kEndpointStateStart
Start the endpoint.
Definition endpoint_manager.h:46
int EndpointManagerEndpointRemotePortGet(CdiEndpointHandle handle)
Definition endpoint_manager.c:681
void EndpointManagerThreadWait(EndpointManagerHandle handle)
Definition endpoint_manager.c:789
bool EndpointManagerPoll(CdiEndpointHandle *handle_ptr)
Definition endpoint_manager.c:1248
void EndpointManagerDestroy(EndpointManagerHandle handle)
Definition endpoint_manager.c:590
CdiReturnStatus EndpointManagerProtocolVersionSet(CdiEndpointHandle handle, const CdiProtocolVersionNumber *remote_version_ptr)
Set the protocol version for the specified endpoint. The protocol version actually used is negotiated...
Definition endpoint_manager.c:1091
void EndpointManagerQueueEndpointStart(CdiEndpointHandle handle)
Definition endpoint_manager.c:702
const struct sockaddr_in * EndpointManagerEndpointRemoteAddressGet(CdiEndpointHandle handle)
Definition endpoint_manager.c:687
EndpointManagerHandle EndpointManagerConnectionToEndpointManager(CdiConnectionHandle handle)
Definition endpoint_manager.c:639
struct EndpointManagerState * EndpointManagerHandle
Type used as the handle (pointer to an opaque structure) for a Endpoint Manager. Each handle represen...
Definition endpoint_manager.h:37
int EndpointManagerEndpointGetCount(EndpointManagerHandle handle)
Definition endpoint_manager.c:1237
struct EndpointManagerGlobalState * EndpointManagerGlobalHandle
Type used as the handle (pointer to an opaque structure) for Endpoint Manager global data.
Definition endpoint_manager.h:31
const char * EndpointManagerEndpointStreamNameGet(CdiEndpointHandle handle)
Definition endpoint_manager.c:666
void EndpointManagerRemoteEndpointInfoSet(CdiEndpointHandle handle, const struct sockaddr_in *remote_address_ptr, const char *stream_name_str)
Definition endpoint_manager.c:645
bool EndpointManagerPollThreadExit(EndpointManagerHandle handle)
Definition endpoint_manager.c:1325
void EndpointManagerConnectionStateChange(CdiEndpointHandle handle, CdiConnectionStatus status_code, const char *error_msg_str)
Definition endpoint_manager.c:820
CdiEndpointHandle EndpointManagerGetNextEndpoint(CdiEndpointHandle handle)
Definition endpoint_manager.c:1218
CdiSignalType EndpointManagerGetNotificationSignal(EndpointManagerHandle handle)
Definition endpoint_manager.c:814
void EndpointManagerEndpointDestroy(CdiEndpointHandle handle)
Definition endpoint_manager.c:1109
void EndpointManagerShutdownConnection(EndpointManagerHandle handle)
Definition endpoint_manager.c:709
This header file contains definitions of types and the one global variable used internally by the SDK...
The declarations in this header file correspond to the definitions in protcol.c.
Structure used to hold adapter endpoint state.
Definition adapter_api.h:110
Structure definition behind the connection handles shared with the user's application program....
Definition private.h:371
Structure definition behind the connection handles shared with the user's application program....
Definition private.h:330
CDI header used to identify protocol version number information.
Definition protocol.h:38
A structure that is used to hold statistics gathering configuration data.
Definition cdi_core_api.h:611
This defines a structure that contains all the state information for endpoint state changes.
Definition endpoint_manager.c:88