nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
cloud_codec.h File Reference
#include <zephyr/kernel.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <cJSON_os.h>
#include <zephyr/net/net_ip.h>
#include <modem/lte_lc.h>
#include <net/wifi_location_common.h>
#include <nrf_modem_gnss.h>
#include "lwm2m/lwm2m_dummy.h"

Go to the source code of this file.

Data Structures

struct  cloud_data_battery
 Structure containing battery data published to cloud. More...
 
struct  cloud_data_gnss_pvt
 
struct  cloud_data_gnss
 Structure containing GNSS data published to cloud. More...
 
struct  cloud_data_no_data
 
struct  cloud_data_cfg
 
struct  cloud_data_impact
 
struct  cloud_data_sensors
 
struct  cloud_data_modem_static
 
struct  cloud_data_modem_dynamic
 
struct  cloud_data_ui
 
struct  cloud_codec_data
 
struct  cloud_data_neighbor_cells
 
struct  cloud_data_wifi_access_points
 
struct  cloud_data_cloud_location
 
struct  cloud_data_agnss_request
 
struct  cloud_data_pgps_request
 
struct  cloud_codec_evt
 

Macros

#define CLOUD_GNSS_HEADING_ACC_LIMIT   (float)60.0
 

Typedefs

typedef void(* cloud_codec_evt_handler_t) (const struct cloud_codec_evt *evt)
 Event handler prototype.
 

Enumerations

enum  cloud_codec_event_type { CLOUD_CODEC_EVT_CONFIG_UPDATE = 1 }
 

Functions

int cloud_codec_init (struct cloud_data_cfg *cfg, cloud_codec_evt_handler_t event_handler)
 Initialize cloud codec.
 
int cloud_codec_encode_cloud_location (struct cloud_codec_data *output, struct cloud_data_cloud_location *cloud_location)
 Encode cloud codec cloud location data.
 
int cloud_codec_decode_cloud_location (const char *input, size_t input_len, struct location_data *location)
 Decode received cloud location data.
 
int cloud_codec_encode_agnss_request (struct cloud_codec_data *output, struct cloud_data_agnss_request *agnss_request)
 Encode cloud codec A-GNSS request.
 
int cloud_codec_encode_pgps_request (struct cloud_codec_data *output, struct cloud_data_pgps_request *pgps_request)
 Encode cloud codec P-GPS request.
 
int cloud_codec_decode_config (const char *input, size_t input_len, struct cloud_data_cfg *cfg)
 Decode received configuration.
 
int cloud_codec_encode_config (struct cloud_codec_data *output, struct cloud_data_cfg *cfg)
 Encode current configuration.
 
int cloud_codec_encode_data (struct cloud_codec_data *output, struct cloud_data_gnss *gnss_buf, struct cloud_data_sensors *sensor_buf, struct cloud_data_modem_static *modem_stat_buf, struct cloud_data_modem_dynamic *modem_dyn_buf, struct cloud_data_ui *ui_buf, struct cloud_data_impact *impact_buf, struct cloud_data_battery *bat_buf)
 Encode cloud buffer data.
 
int cloud_codec_encode_ui_data (struct cloud_codec_data *output, struct cloud_data_ui *ui_buf)
 Encode UI data.
 
int cloud_codec_encode_impact_data (struct cloud_codec_data *output, struct cloud_data_impact *impact_buf)
 Encode impact data.
 
int cloud_codec_encode_batch_data (struct cloud_codec_data *output, struct cloud_data_gnss *gnss_buf, struct cloud_data_sensors *sensor_buf, struct cloud_data_modem_static *modem_stat_buf, struct cloud_data_modem_dynamic *modem_dyn_buf, struct cloud_data_ui *ui_buf, struct cloud_data_impact *impact_buf, struct cloud_data_battery *bat_buf, size_t gnss_buf_count, size_t sensor_buf_count, size_t modem_stat_buf_count, size_t modem_dyn_buf_count, size_t ui_buf_count, size_t impact_buf_count, size_t bat_buf_count)
 Encode a batch of cloud buffer data.
 
void cloud_codec_populate_sensor_buffer (struct cloud_data_sensors *sensor_buffer, struct cloud_data_sensors *new_sensor_data, int *head_sensor_buf, size_t buffer_count)
 
void cloud_codec_populate_ui_buffer (struct cloud_data_ui *ui_buffer, struct cloud_data_ui *new_ui_data, int *head_ui_buf, size_t buffer_count)
 
void cloud_codec_populate_impact_buffer (struct cloud_data_impact *impact_buf, struct cloud_data_impact *new_impact_data, int *head_impact_buf, size_t buffer_count)
 
void cloud_codec_populate_bat_buffer (struct cloud_data_battery *bat_buffer, struct cloud_data_battery *new_bat_data, int *head_bat_buf, size_t buffer_count)
 
void cloud_codec_populate_gnss_buffer (struct cloud_data_gnss *gnss_buffer, struct cloud_data_gnss *new_gnss_data, int *head_gnss_buf, size_t buffer_count)
 
void cloud_codec_populate_modem_dynamic_buffer (struct cloud_data_modem_dynamic *modem_buffer, struct cloud_data_modem_dynamic *new_modem_data, int *head_modem_buf, size_t buffer_count)