nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
cloud_wrapper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
11#ifndef CLOUD_WRAPPER_H__
12#define CLOUD_WRAPPER_H__
13
14#include <zephyr/kernel.h>
15#include <stdbool.h>
16
17#if defined(CONFIG_LWM2M)
18#include <zephyr/net/lwm2m.h>
19#else
21#endif
28#ifdef __cplusplus
29extern "C" {
30#endif
31
86};
87
93 char *buf;
95 size_t len;
96};
97
101
102 union {
106 int err;
107 uint16_t message_id;
108 };
109};
110
116typedef void (*cloud_wrap_evt_handler_t)(const struct cloud_wrap_event *evt);
117
124
131
138
147int cloud_wrap_state_get(bool ack, uint32_t id);
148
159int cloud_wrap_state_send(char *buf, size_t len, bool ack, uint32_t id);
160
172int cloud_wrap_data_send(char *buf, size_t len, bool ack, uint32_t id,
173 const struct lwm2m_obj_path path_list[]);
174
185int cloud_wrap_batch_send(char *buf, size_t len, bool ack, uint32_t id);
186
198int cloud_wrap_ui_send(char *buf, size_t len, bool ack, uint32_t id,
199 const struct lwm2m_obj_path path_list[]);
200
215int cloud_wrap_cloud_location_send(char *buf, size_t len, bool ack, uint32_t id);
216
224
239int cloud_wrap_agnss_request_send(char *buf, size_t len, bool ack, uint32_t id);
240
255int cloud_wrap_pgps_request_send(char *buf, size_t len, bool ack, uint32_t id);
256
267int cloud_wrap_memfault_data_send(char *buf, size_t len, bool ack, uint32_t id);
268
269#ifdef __cplusplus
270}
271#endif
272
277#endif /* CLOUD_WRAPPER_H__ */
int cloud_wrap_state_send(char *buf, size_t len, bool ack, uint32_t id)
Send device state data to cloud.
int cloud_wrap_state_get(bool ack, uint32_t id)
Request device state from cloud. The device state contains the device configuration.
int cloud_wrap_data_send(char *buf, size_t len, bool ack, uint32_t id, const struct lwm2m_obj_path path_list[])
Send data to cloud.
cloud_wrap_event_type
Definition: cloud_wrapper.h:33
@ CLOUD_WRAP_EVT_USER_ASSOCIATION_REQUEST
Definition: cloud_wrapper.h:45
@ CLOUD_WRAP_EVT_LTE_DISCONNECT_REQUEST
Definition: cloud_wrapper.h:69
@ CLOUD_WRAP_EVT_DATA_ACK
Definition: cloud_wrapper.h:49
@ CLOUD_WRAP_EVT_PING_ACK
Definition: cloud_wrapper.h:51
@ CLOUD_WRAP_EVT_LTE_CONNECT_REQUEST
Definition: cloud_wrapper.h:67
@ CLOUD_WRAP_EVT_DATA_RECEIVED
Definition: cloud_wrapper.h:43
@ CLOUD_WRAP_EVT_USER_ASSOCIATED
Definition: cloud_wrapper.h:47
@ CLOUD_WRAP_EVT_ERROR
Definition: cloud_wrapper.h:85
@ CLOUD_WRAP_EVT_FOTA_ERASE_PENDING
Definition: cloud_wrapper.h:77
@ CLOUD_WRAP_EVT_CONNECTING
Definition: cloud_wrapper.h:35
@ CLOUD_WRAP_EVT_CONNECTED
Definition: cloud_wrapper.h:37
@ CLOUD_WRAP_EVT_FOTA_START
Definition: cloud_wrapper.h:75
@ CLOUD_WRAP_EVT_CLOUD_LOCATION_RESULT_RECEIVED
Definition: cloud_wrapper.h:63
@ CLOUD_WRAP_EVT_FOTA_ERASE_DONE
Definition: cloud_wrapper.h:79
@ CLOUD_WRAP_EVT_PGPS_DATA_RECEIVED
Definition: cloud_wrapper.h:59
@ CLOUD_WRAP_EVT_FOTA_ERROR
Definition: cloud_wrapper.h:81
@ CLOUD_WRAP_EVT_REBOOT_REQUEST
Definition: cloud_wrapper.h:65
@ CLOUD_WRAP_EVT_DISCONNECTED
Definition: cloud_wrapper.h:39
@ CLOUD_WRAP_EVT_FOTA_DONE
Definition: cloud_wrapper.h:73
@ CLOUD_WRAP_EVT_AGNSS_DATA_RECEIVED
Definition: cloud_wrapper.h:55
void(* cloud_wrap_evt_handler_t)(const struct cloud_wrap_event *evt)
Cloud wrapper library asynchronous event handler.
Definition: cloud_wrapper.h:116
int cloud_wrap_ui_send(char *buf, size_t len, bool ack, uint32_t id, const struct lwm2m_obj_path path_list[])
Send UI data to cloud.
int cloud_wrap_memfault_data_send(char *buf, size_t len, bool ack, uint32_t id)
Send Memfault data to cloud.
int cloud_wrap_cloud_location_send(char *buf, size_t len, bool ack, uint32_t id)
Send cloud location data to cloud.
int cloud_wrap_disconnect(void)
Disconnect from cloud.
int cloud_wrap_init(cloud_wrap_evt_handler_t event_handler)
Setup and initialize the configured cloud integration layer.
int cloud_wrap_batch_send(char *buf, size_t len, bool ack, uint32_t id)
Send batched data to cloud.
int cloud_wrap_connect(void)
Connect to cloud.
bool cloud_wrap_cloud_location_response_wait(void)
Indicates whether cloud implementation can and is configured to return the resolved location back to ...
int cloud_wrap_pgps_request_send(char *buf, size_t len, bool ack, uint32_t id)
Send P-GPS request to cloud.
int cloud_wrap_agnss_request_send(char *buf, size_t len, bool ack, uint32_t id)
Send A-GNSS request to cloud.
size_t len
Definition: cloud_wrapper.h:95
char * buf
Definition: cloud_wrapper.h:93
Structure used to reference application data that is sent and received from the cloud wrapper library...
Definition: cloud_wrapper.h:91
enum cloud_wrap_event_type type
Definition: cloud_wrapper.h:100
uint16_t message_id
Definition: cloud_wrapper.h:107
struct cloud_wrap_event_data data
Definition: cloud_wrapper.h:104
int err
Definition: cloud_wrapper.h:106
Cloud wrapper API event.
Definition: cloud_wrapper.h:99
Definition: lwm2m_dummy.h:10