Function anjay_factory_provision

Function Documentation

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:
  • anjay – Anjay Object to operate on.

  • data_stream – Bootstrap 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