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_interface.h"
Go to the source code of this file.
Data Structures | |
struct | json_t |
JSON struct which holds json string in a buffer. More... | |
Enumerations | |
enum | json_ops_t { DEINIT, INIT, START_ARRAY, START_OBJECT, ADD_DATA, END_OBJECT, END_ARRAY } |
Enums to keep track of last JSON Operation completed. More... | |
Functions | |
json_t * | appd_iot_json_init (void) |
Creates, Initializes and returns a new json struct. More... | |
appd_iot_error_code_t | appd_iot_json_start_array (json_t *json, const char *array_name) |
starts json array by adding char '[' to json buf. If a name is given it will be "name":[ More... | |
appd_iot_error_code_t | appd_iot_json_start_object (json_t *json, const char *object_name) |
starts json object by adding char '{' to json buf. If a name is given it will be "name":{ More... | |
appd_iot_error_code_t | appd_iot_json_end_object (json_t *json) |
ends json object by adding char '}' to json buf. More... | |
appd_iot_error_code_t | appd_iot_json_end_array (json_t *json) |
ends json object by adding char ']' to json buf. More... | |
appd_iot_error_code_t | appd_iot_json_add_string_key_value (json_t *json, const char *key, const char *strval) |
adds key:value pair to json object with value as string More... | |
appd_iot_error_code_t | appd_iot_json_add_integer_key_value (json_t *json, const char *key, int64_t intval) |
adds key:value pair to json object with value as 64 bit integer More... | |
appd_iot_error_code_t | appd_iot_json_add_double_key_value (json_t *json, const char *key, double doubleval) |
adds key:value pair to json object with value as double More... | |
appd_iot_error_code_t | appd_iot_json_add_boolean_key_value (json_t *json, const char *key, bool boolval) |
adds key:value pair to json object with value as boolean More... | |
appd_iot_error_code_t | appd_iot_json_add_string_value (json_t *json, const char *value) |
adds value to json object. This function is typically used to add string values to JSON arrays More... | |
appd_iot_error_code_t | appd_iot_json_add_integer_value (json_t *json, int64_t intval) |
adds value to json object. This function is typically used to add integer values to JSON arrays More... | |
appd_iot_error_code_t | appd_iot_json_add_double_value (json_t *json, double doubleval) |
adds value to json object. This function is typically used to add double values to JSON arrays More... | |
appd_iot_error_code_t | appd_iot_json_add_boolean_value (json_t *json, bool boolval) |
adds value to json object. This function is typically used to add boolean values to JSON arrays More... | |
const char * | appd_iot_json_get_string (json_t *json) |
returns the json string constructed so far. More... | |
const char * | appd_iot_json_pretty_print (json_t *json) |
format and returns json string with line breaks, indentiation at start/end of objects/arrays More... | |
void | appd_iot_json_free (json_t *json) |
frees json structure More... | |
enum json_ops_t |
Enums to keep track of last JSON Operation completed.
Enumerator | |
---|---|
DEINIT | |
INIT | |
START_ARRAY | |
START_OBJECT | |
ADD_DATA | |
END_OBJECT | |
END_ARRAY |
json_t* appd_iot_json_init | ( | void | ) |
Creates, Initializes and returns a new json struct.
appd_iot_error_code_t appd_iot_json_start_array | ( | json_t * | json, |
const char * | array_name | ||
) |
starts json array by adding char '[' to json buf. If a name is given it will be "name":[
json | struct which contains the json buf |
array_name | has the string for the key to json array |
appd_iot_error_code_t appd_iot_json_start_object | ( | json_t * | json, |
const char * | object_name | ||
) |
starts json object by adding char '{' to json buf. If a name is given it will be "name":{
json | struct which contains the json buf |
object_name | has the string for the key to json object |
appd_iot_error_code_t appd_iot_json_end_object | ( | json_t * | json | ) |
ends json object by adding char '}' to json buf.
json | struct which contains the json buf |
appd_iot_error_code_t appd_iot_json_end_array | ( | json_t * | json | ) |
ends json object by adding char ']' to json buf.
json | struct which contains the json buf |
appd_iot_error_code_t appd_iot_json_add_string_key_value | ( | json_t * | json, |
const char * | key, | ||
const char * | strval | ||
) |
adds key:value pair to json object with value as string
json | struct which contains the json buf |
key | contains string representing key |
strval | contains string representing value |
appd_iot_error_code_t appd_iot_json_add_integer_key_value | ( | json_t * | json, |
const char * | key, | ||
int64_t | intval | ||
) |
adds key:value pair to json object with value as 64 bit integer
json | struct which contains the json buf |
key | contains string representing key |
intval | contains integer representing value |
appd_iot_error_code_t appd_iot_json_add_double_key_value | ( | json_t * | json, |
const char * | key, | ||
double | doubleval | ||
) |
adds key:value pair to json object with value as double
json | struct which contains the json buf |
key | contains string representing key |
doubleval | contains double representing value |
adds key:value pair to json object with value as double
appd_iot_error_code_t appd_iot_json_add_boolean_key_value | ( | json_t * | json, |
const char * | key, | ||
bool | boolval | ||
) |
adds key:value pair to json object with value as boolean
json | struct which contains the json buf |
key | contains string representing key |
boolval | contains boolean representing value |
appd_iot_error_code_t appd_iot_json_add_string_value | ( | json_t * | json, |
const char * | value | ||
) |
adds value to json object. This function is typically used to add string values to JSON arrays
json | struct which contains the json buf |
value | contains string to be added |
appd_iot_error_code_t appd_iot_json_add_integer_value | ( | json_t * | json, |
int64_t | intval | ||
) |
adds value to json object. This function is typically used to add integer values to JSON arrays
json | struct which contains the json buf |
intval | contains integer to be added |
appd_iot_error_code_t appd_iot_json_add_double_value | ( | json_t * | json, |
double | doubleval | ||
) |
adds value to json object. This function is typically used to add double values to JSON arrays
json | struct which contains the json buf |
doubleval | contains integer to be added |
appd_iot_error_code_t appd_iot_json_add_boolean_value | ( | json_t * | json, |
bool | boolval | ||
) |
adds value to json object. This function is typically used to add boolean values to JSON arrays
json | struct which contains the json buf |
boolval | contains boolean to be added |
const char* appd_iot_json_get_string | ( | json_t * | json | ) |
returns the json string constructed so far.
json | struct which contains the json buf |
const char* appd_iot_json_pretty_print | ( | json_t * | json | ) |
format and returns json string with line breaks, indentiation at start/end of objects/arrays
json | struct which contains the json buf |
void appd_iot_json_free | ( | json_t * | json | ) |
frees json structure
json | struct which contains the json buf |