11#ifndef JSON_COMMON_H__
12#define JSON_COMMON_H__
24#include <zephyr/kernel.h>
76 const char *object_label,
97 const char *object_label,
118 const char *object_label,
139 const char *object_label,
160 const char *object_label,
181 const char *object_label,
200#if defined(CONFIG_LOCATION_METHOD_WIFI)
264 const char *object_label,
301 size_t buf_count,
const char *object_label);
void json_common_config_get(cJSON *parent, struct cloud_data_cfg *data)
Extract configuration values from parent object.
int json_common_agnss_request_data_add(cJSON *parent, struct cloud_data_agnss_request *data, enum json_common_op_code op)
Encode and add A-GNSS request data to the parent object.
int json_common_config_add(cJSON *parent, struct cloud_data_cfg *data, const char *object_label)
Encode and add configuration data to the parent object.
int json_common_modem_dynamic_data_add(cJSON *parent, struct cloud_data_modem_dynamic *data, enum json_common_op_code op, const char *object_label, cJSON **parent_ref)
Encode and add dynamic modem data to the parent object.
int json_common_gnss_data_add(cJSON *parent, struct cloud_data_gnss *data, enum json_common_op_code op, const char *object_label, cJSON **parent_ref)
Encode and add GNSS data to the parent object.
int json_common_wifi_ap_data_add(cJSON *parent, struct cloud_data_wifi_access_points *data, enum json_common_op_code op)
Encode and add wifi survey data to the parent object.
int json_common_ui_data_add(cJSON *parent, struct cloud_data_ui *data, enum json_common_op_code op, const char *object_label, cJSON **parent_ref)
Encode and add User Interface data to the parent object.
int json_common_impact_data_add(cJSON *parent, struct cloud_data_impact *data, enum json_common_op_code op, const char *object_label, cJSON **parent_ref)
Encode and add Impact data to the parent object.
int json_common_battery_data_add(cJSON *parent, struct cloud_data_battery *data, enum json_common_op_code op, const char *object_label, cJSON **parent_ref)
Encode and add battery data to the parent object.
int json_common_pgps_request_data_add(cJSON *parent, struct cloud_data_pgps_request *data)
Encode and add P-GPS request data to the parent object.
int json_common_modem_static_data_add(cJSON *parent, struct cloud_data_modem_static *data, enum json_common_op_code op, const char *object_label, cJSON **parent_ref)
Encode and add static modem data to the parent object.
json_common_buffer_type
Type of data to be handled by the respective API. Used to signify what data structure that is passed ...
Definition: json_common.h:33
@ JSON_COMMON_SENSOR
Definition: json_common.h:39
@ JSON_COMMON_MODEM_STATIC
Definition: json_common.h:36
@ JSON_COMMON_IMPACT
Definition: json_common.h:35
@ JSON_COMMON_GNSS
Definition: json_common.h:38
@ JSON_COMMON_COUNT
Definition: json_common.h:42
@ JSON_COMMON_UI
Definition: json_common.h:34
@ JSON_COMMON_MODEM_DYNAMIC
Definition: json_common.h:37
@ JSON_COMMON_BATTERY
Definition: json_common.h:40
int json_common_sensor_data_add(cJSON *parent, struct cloud_data_sensors *data, enum json_common_op_code op, const char *object_label, cJSON **parent_ref)
Encode and add environmental sensor data to the parent object.
int json_common_batch_data_add(cJSON *parent, enum json_common_buffer_type type, void *buf, size_t buf_count, const char *object_label)
Encode all queued entries in the passed in buffer and add it to the parent object as an array.
int json_common_neighbor_cells_data_add(cJSON *parent, struct cloud_data_neighbor_cells *data, enum json_common_op_code op)
Encode and add neighbor cell data to the parent object.
json_common_op_code
Operation to be carried out with the passed in data.
Definition: json_common.h:46
@ JSON_COMMON_ADD_DATA_TO_OBJECT
Definition: json_common.h:53
@ JSON_COMMON_GET_POINTER_TO_OBJECT
Definition: json_common.h:55
@ JSON_COMMON_ADD_DATA_TO_ARRAY
Definition: json_common.h:51
@ JSON_COMMON_INVALID
Definition: json_common.h:47
Definition: cloud_codec.h:258
Structure containing battery data published to cloud.
Definition: cloud_codec.h:47
Definition: cloud_codec.h:103
Structure containing GNSS data published to cloud.
Definition: cloud_codec.h:78
Definition: cloud_codec.h:127
Definition: cloud_codec.h:170
Definition: cloud_codec.h:153
Definition: cloud_codec.h:217
Definition: cloud_codec.h:272
Definition: cloud_codec.h:136
Definition: cloud_codec.h:197
Definition: cloud_codec.h:229