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

◆ nrf_cloud_rest_device_status_message_send()

int nrf_cloud_rest_device_status_message_send ( struct nrf_cloud_rest_context *const  rest_ctx,
const char *const  device_id,
const struct nrf_cloud_device_status *const  dev_status,
const int64_t  timestamp_ms 
)

#include <include/net/nrf_cloud_rest.h>

Send the device status to nRF Cloud as a device message. In addition to standard message storage, the data will also be stored in the device's shadow.

Parameters
[in,out]rest_ctxContext for communicating with nRF Cloud's REST API.
[in]device_idNull-terminated, unique device ID registered with nRF Cloud.
[in]dev_statusDevice status to be encoded in the message.
[in]timestamp_msUNIX timestamp, in milliseconds, to be included in the message.
Return values
0If successful. Otherwise, a (negative) error code is returned. See
embed:rst:inline :ref:`nrf_cloud_rest_failure` 
for details.