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

◆ lwm2m_carrier_battery_status_set()

int lwm2m_carrier_battery_status_set ( int32_t battery_status)

#include <lib/bin/lwm2m_carrier/include/lwm2m_carrier.h>

Set the OMA LwM2M Device object Battery Status resource (/3/0/20).

LWM2M_CARRIER_POWER_SOURCE_INTERNAL_BATTERY needs to be enabled first using lwm2m_carrier_avail_power_sources_set().

Parameters
[in]battery_statusInternal battery status to be reported (lwm2m_carrier_battery_status_values).
Return values
0If the battery status has been updated successfully.
-EINVALIf the battery status is not supported.
-ENODEVIf internal battery is not listed as an available power source.