nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ nrf_cloud_coap_location_send()

int nrf_cloud_coap_location_send ( const struct nrf_cloud_gnss_data *const  gnss,
bool  confirmable 
)

#include <include/net/nrf_cloud_coap.h>

Send the device location in the nrf_cloud_gnss_data PVT field to nRF Cloud.

The location message is sent as either a non-confirmable or confirmable CoAP message. Only NRF_CLOUD_GNSS_TYPE_PVT is supported.

Parameters
[in]gnssA pointer to an nrf_cloud_gnss_data struct indicating the device location, usually as determined by the GNSS unit.
[in]confirmableSelect whether to use a CON or NON CoAP transfer.
Return values
-EACCESDevice does not have a valid nRF Cloud CoAP connection.
Returns
0 If successful, nonzero if failed. Negative values are device-side errors defined in errno.h. Positive values are cloud-side errors (CoAP result codes) defined in zephyr/net/coap.h.