nRF Connect SDK API 2.8.99
|
int lwm2m_carrier_avail_power_sources_set | ( | const uint8_t * | power_sources, |
uint8_t | power_source_count ) |
#include <lib/bin/lwm2m_carrier/include/lwm2m_carrier.h>
Set the OMA LwM2M Device
object Available Power Sources
resource (/3/0/6).
It is necessary to call this function before any other device power source related functions listed in this file, as any updates of voltage/current measurements performed on power sources that have not been reported will be discarded. Upon consecutive calls of this function, the corresponding current and voltage measurements will be reset to 0. Similarly, the battery status will be set to UNKNOWN and the battery level to 0%.
[in] | power_sources | Array of available lwm2m_carrier_power_source_values. |
[in] | power_source_count | Number of power sources currently used by the device. |
0 | If the available power sources have been set successfully. |
-E2BIG | If the reported number of power sources is bigger than the maximum supported. |
-EINVAL | If one or more of the power sources are not supported. |
-ENOENT | If LwM2M object is not initialized yet. |