AppDynamics IoT C++ SDK
AppDynamics IoT C++ library contains code that facilitates capturing availability, usage, network performance and errors of an IoT Application.
|
#include "appd_iot_def.h"
Go to the source code of this file.
Macros | |
#define | __APPD_IOT_API |
Functions | |
appd_iot_error_code_t | appd_iot_init_sdk (appd_iot_sdk_config_t sdkcfg, appd_iot_device_config_t devcfg) __APPD_IOT_API |
This method Initializes the SDK. This method must be called before all other SDK Apis are called. It is recommened to call this method early in your application's start up sequence. More... | |
appd_iot_error_code_t | appd_iot_register_network_interface (appd_iot_http_cb_t http_cb) __APPD_IOT_API |
This method registers network interface This method must be called before calling appd_iot_send_all_events(). More... | |
appd_iot_error_code_t | appd_iot_add_custom_event (appd_iot_custom_event_t custom_event) __APPD_IOT_API |
This method adds custom event data Each call to add event will create a new event. More... | |
appd_iot_error_code_t | appd_iot_add_network_request_event (appd_iot_network_request_event_t network_request_event) __APPD_IOT_API |
This method adds event data Each call to add event will create a new event. More... | |
appd_iot_error_code_t | appd_iot_add_error_event (appd_iot_error_event_t error_event) __APPD_IOT_API |
This method adds event data Each call to add event will create a new event. More... | |
appd_iot_error_code_t | appd_iot_send_all_events (void) __APPD_IOT_API |
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. More... | |
appd_iot_error_code_t | appd_iot_clear_all_events (void) __APPD_IOT_API |
This method removes all event data stored in memory This call is not needed if appd_iot_send_all_events return SUCCESS. More... | |
appd_iot_error_code_t | appd_iot_check_app_status (void) __APPD_IOT_API |
Use this API to check with AppDynamics Collector on the status of IoT Application on AppDynamics Controller, whether instrumentation is enabled or not. If the Collector returns Success, SDK gets ENABLED in case it has been DISABLED previously by Collector due to license expiry, kill switch or data limit exceeded. It is required that SDK initialization is already done using the API appd_iot_init_sdk() before calling this function. More... | |
#define __APPD_IOT_API |
Attribute added to all the API's that need to be made public outside of appdynamics iot shared dynamic library.
appd_iot_error_code_t appd_iot_init_sdk | ( | appd_iot_sdk_config_t | sdkcfg, |
appd_iot_device_config_t | devcfg | ||
) |
This method Initializes the SDK.
This method must be called before all other SDK Apis are called.
It is recommened to call this method early in your application's start up sequence.
sdkcfg | contains sdk configuration such as collector url, appkey etc |
devcfg | contains device configuration such as device type/name and hw/fw/sw versions |
This method Initializes the SDK.
This method must be called before all other SDK Apis are called.
It is recommened to call this method early in your application's start up sequence.
sdkcfg | contains sdk configuration such as collector url, appkey etc |
devcfg | contains device information such as device type/name and hw/fw/sw versions |
appd_iot_error_code_t appd_iot_register_network_interface | ( | appd_iot_http_cb_t | http_cb | ) |
This method registers network interface
This method must be called before calling appd_iot_send_all_events().
http_cb | contains function pointers for http req send and http resp done callbacks . http request send callback will be called when appd_iot_send_all_events is triggered. http response done callback will be called after send http req callback returns and resp is processed. |
This method registers network interface
This method must be called before calling appd_iot_send_all_events().
http_cb | contains function pointers for http request send and http response done callbacks . http request send callback will be called when appd_iot_send_all_events is triggered. http response done callback will be called after send http request callback returns and response is processed. |
appd_iot_error_code_t appd_iot_add_custom_event | ( | appd_iot_custom_event_t | custom_event | ) |
This method adds custom event data
Each call to add event will create a new event.
custom_event | contains details of the event |
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_add_network_request_event | ( | appd_iot_network_request_event_t | network_request_event | ) |
This method adds event data
Each call to add event will create a new event.
network_request_event | contains details of the network request |
This method adds event data
Each call to add event will create a new event.
network_request_event | contains network event data |
appd_iot_error_code_t appd_iot_add_error_event | ( | appd_iot_error_event_t | error_event | ) |
This method adds event data
Each call to add event will create a new event.
error_event | contains details of the error event |
This method adds event data
Each call to add event will create a new event.
error_event | contains event data |
appd_iot_error_code_t appd_iot_send_all_events | ( | void | ) |
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.
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 | ) |
This method removes all event data stored in memory
This call is not needed if appd_iot_send_all_events return SUCCESS.
This method removes all event data stored in memory
This call is not needed if appd_iot_send_all_events return SUCCESS.
appd_iot_error_code_t appd_iot_check_app_status | ( | void | ) |
Use this API to check with AppDynamics Collector on the status of IoT Application on AppDynamics Controller, whether instrumentation is enabled or not. If the Collector returns Success, SDK gets ENABLED in case it has been DISABLED previously by Collector due to license expiry, kill switch or data limit exceeded.
It is required that SDK initialization is already done using the API appd_iot_init_sdk() before calling this function.