CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
|
This file contains internal definitions and implementation used with the SDK that is not part of the API. More...
#include "cloudwatch.h"
#include "cdi_logger_api.h"
#include "cdi_os_api.h"
#include "cloudwatch_sdk_metrics.h"
#include "internal_log.h"
#include "statistics.h"
Data Structures | |
struct | CloudWatchState |
Structure used to hold state data for statistics. More... | |
Functions | |
static void | FifoFullCallback (const CdiFifoFullCbData *cb_data_ptr) |
static void | CalculateDeltas (CloudWatchState *cw_state_ptr, const CdiTransferStats *transfer_stats_ptr, CloudWatchCounterBasedDeltas *delta_stats_ptr) |
static CDI_THREAD | CloudWatchThread (void *ptr) |
CdiReturnStatus | CloudWatchCreate (CdiConnectionState *con_state_ptr, CloudWatchSdkMetricsHandle cw_sdk_handle, CloudWatchHandle *return_handle_ptr) |
CdiReturnStatus | CloudWatchDestroy (CloudWatchHandle handle) |
CdiReturnStatus | CloudWatchConfigure (CloudWatchHandle handle, const CdiStatsConfigData *stats_config_ptr) |
void | CloudWatchStatisticsMessage (CloudWatchHandle handle, int stats_count, const CdiTransferStats *transfer_stats_array) |
This file contains internal definitions and implementation used with the SDK that is not part of the API.
|
static |
This function computes the differences in the statistics contained in two data sets.
cw_state_ptr | Pointer to the CloudWatch statistics state. |
transfer_stats_ptr | Address of the new statistics data set. |
delta_stats_ptr | Pointer to where the results are to be written. |
CdiReturnStatus CloudWatchConfigure | ( | CloudWatchHandle | handle, |
const CdiStatsConfigData * | stats_config_ptr ) |
Configure transfer statistics.
handle | The handle of the connection to set statistics configuration. |
stats_config_ptr | Pointer to stats configuration data. |
CdiReturnStatus CloudWatchCreate | ( | CdiConnectionState * | con_state_ptr, |
CloudWatchSdkMetricsHandle | cw_sdk_handle, | ||
CloudWatchHandle * | return_handle_ptr ) |
Create an instance of the statistics component for the specified connection.
con_state_ptr | Pointer to connection state data. |
cw_sdk_handle | CloudWatch SDK instance handle |
return_handle_ptr | Address where to write returned statistics handle. |
CdiReturnStatus CloudWatchDestroy | ( | CloudWatchHandle | handle | ) |
Free all resources related to the specified statistics component.
handle | Handle of statistics component. |
void CloudWatchStatisticsMessage | ( | CloudWatchHandle | handle, |
int | stats_count, | ||
const CdiTransferStats * | transfer_stats_array ) |
Process a message that contains new statistics to post to CloudWatch.
handle | Handle of statistics component. |
stats_count | Number of array items in transfer_stats_array. |
transfer_stats_array | Pointer to start of transfer stats array. |
|
static |
Statistic gathering thread used to invoke registered callback functions when new statistics are available.
ptr | Pointer to thread specific data. In this case, a pointer to CloudWatchState. |
|
static |
Function that will be called whenever the CloudWatch stats FIFO is full. It accumulates the new statistics into the set waiting at the head of the queue.
cb_data_ptr | The address of the callback data structure cantaining the parameters provided by the FIFO. |