AppDynamics IoT C++ SDK
AppDynamics IoT C++ library contains code that facilitates capturing availability, usage, network performance and errors of an IoT Application.
|
#include <string.h>
#include "custom_event.hpp"
#include "appd_iot_interface.h"
#include "log.hpp"
#include "config.hpp"
#include "utils.hpp"
Functions | |
appd_iot_error_code_t | appd_iot_add_custom_event (appd_iot_custom_event_t custom_event) |
converts custom event data to beacon format and adds to beacon More... | |
appd_iot_error_code_t | appd_iot_clear_event_data (data_t *data) |
Clear event data. More... | |
appd_iot_error_code_t | appd_iot_copy_event_data (data_t *destdata, appd_iot_data_t *srcdata, int srcdata_count) |
Copies User Defined Event Data to SDK Defined Event Data. More... | |
appd_iot_error_code_t | appd_iot_send_all_events (void) |
send all events to collector More... | |
appd_iot_error_code_t | appd_iot_clear_all_events (void) |
Clear all events to collector. More... | |
appd_iot_error_code_t appd_iot_add_custom_event | ( | appd_iot_custom_event_t | custom_event | ) |
converts custom event data to beacon format and adds to beacon
This method adds custom event data
Each call to add event will create a new event.
custom_event | contains event data |
appd_iot_error_code_t appd_iot_clear_event_data | ( | data_t * | data | ) |
Clear event data.
data | that needs to be cleared |
appd_iot_error_code_t appd_iot_copy_event_data | ( | data_t * | destdata, |
appd_iot_data_t * | srcdata, | ||
int | srcdata_count | ||
) |
Copies User Defined Event Data to SDK Defined Event Data.
destdata | contains event data to be copied to |
srcdata | contains event data to be copied from |
srcdata_count | contains number of key-value pairs in user defined event data |
appd_iot_error_code_t appd_iot_send_all_events | ( | void | ) |
send all events to collector
This method sends all event data.
If events are sent successfuly to collector then they will be flushed out of memory.
If there is a network reject with response codes 402, 403 or 429 then events are flushed out of memory and SDK state set to DISABLED. If there is any other network error, events remain in memory for retry. Repeated calls to this API in SDK ENABLED State will retry sending the data in memory to the collector.
Use the API appd_iot_clear_all_events() to clear out events in memory if retries are unsuccessful.
appd_iot_error_code_t appd_iot_clear_all_events | ( | void | ) |
Clear all events to collector.
This method removes all event data stored in memory
This call is not needed if appd_iot_send_all_events return SUCCESS.