anjay
Loading...
Searching...
No Matches
factory_provisioning.h File Reference
#include <avsystem/commons/avs_errno.h>
#include <avsystem/commons/avs_stream.h>
#include <anjay/core.h>

Go to the source code of this file.

Functions

avs_error_t anjay_factory_provision (anjay_t *anjay, avs_stream_t *data_stream)
 

Function Documentation

◆ anjay_factory_provision()

avs_error_t anjay_factory_provision ( anjay_t anjay,
avs_stream_t *  data_stream 
)

Reads Bootstrap Information from the stream (data_stream) and initializes Anjay's data model. Expected format of the stream data is SenML CBOR, as used for a Write-Composite operation.

Parameters
anjayAnjay Object to operate on.
data_streamBootstrap Information data stream.
Returns
  • AVS_OK for success
  • avs_errno(AVS_EBADMSG) if Anjay failed to apply bootstrap information
  • avs_errno(AVS_ENOMEM) if Anjay failed to allocate memory
  • avs_errno(AVS_EAGAIN) if connection with Bootstrap Server is in progress
  • avs_errno(AVS_EPROTO) in case of other internal errors