#include <lib/bin/lwm2m_carrier/include/lwm2m_carrier.h>
Read an identity in the OMA LwM2M Portfolio object Identity resource (/16/instance_id /0/identity_type ).
- Note
- If the provided buffer is NULL, the function will perform a dry run to determine the required buffer size (including the null terminator).
- Parameters
-
| [in] | instance_id | Portfolio object instance identifier. |
| [in] | identity_type | Type of Identity field to be read (lwm2m_carrier_portfolio_identity_values). |
| [in,out] | buffer | Buffer where the null-terminated response will be stored. |
| [in,out] | buffer_len | Length of the provided buffer. Will return the number of bytes of the full response. |
- Return values
-
| 0 | If the operation was successful. |
| -ENOENT | If the instance does not exist. |
| -EINVAL | If the provided buffer length reference is NULL or the identity type is invalid. |
| -ENOMEM | If the provided buffer is too small. |