nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
LwM2M carrier library objects

Functions

void lwm2m_carrier_time_read (int32_t *utc_time, int *utc_offset, const char **tz)
 
int32_t lwm2m_carrier_utc_time_read (void)
 
int lwm2m_carrier_utc_offset_read (void)
 
char * lwm2m_carrier_timezone_read (void)
 
int lwm2m_carrier_utc_time_write (int32_t time)
 
int lwm2m_carrier_utc_offset_write (int offset)
 
int lwm2m_carrier_timezone_write (const char *tz)
 
int lwm2m_carrier_avail_power_sources_set (const uint8_t *power_sources, uint8_t power_source_count)
 
int lwm2m_carrier_power_source_voltage_set (uint8_t power_source, int32_t value)
 
int lwm2m_carrier_power_source_current_set (uint8_t power_source, int32_t value)
 
int lwm2m_carrier_battery_level_set (uint8_t battery_level)
 
int lwm2m_carrier_battery_status_set (int32_t battery_status)
 
int lwm2m_carrier_error_code_add (int32_t error)
 
int lwm2m_carrier_error_code_remove (int32_t error)
 
int lwm2m_carrier_memory_total_set (uint32_t memory_total)
 
int lwm2m_carrier_memory_free_read (void)
 
int lwm2m_carrier_identity_read (uint16_t instance_id, uint16_t identity_type, char *buffer, uint16_t *buffer_len)
 
int lwm2m_carrier_identity_write (uint16_t instance_id, uint16_t identity_type, const char *value)
 
int lwm2m_carrier_portfolio_instance_create (uint16_t instance_id)
 
int lwm2m_carrier_location_set (double latitude, double longitude, float altitude, uint32_t timestamp, float uncertainty)
 
int lwm2m_carrier_velocity_set (int heading, float speed_h, float speed_v, float uncertainty_h, float uncertainty_v)
 
int lwm2m_carrier_app_data_set (const uint16_t *path, uint16_t path_len, const uint8_t *buffer, size_t buffer_len)
 
int lwm2m_carrier_log_data_set (const uint8_t *buffer, size_t buffer_len)
 

LwM2M carrier library app data container objects

Used in lwm2m_carrier_app_data_set() and lwm2m_carrier_event_app_data_t to identify the application date object.

#define LWM2M_CARRIER_OBJECT_BINARY_APP_DATA_CONTAINER   19
 
#define LWM2M_CARRIER_OBJECT_APP_DATA_CONTAINER   10250
 

LwM2M device available power sources

Values for the OMA LwM2M Device object Available Power Sources resource (/3/0/6). Set using lwm2m_carrier_avail_power_sources_set().

#define LWM2M_CARRIER_POWER_SOURCE_DC   0
 
#define LWM2M_CARRIER_POWER_SOURCE_INTERNAL_BATTERY   1
 
#define LWM2M_CARRIER_POWER_SOURCE_EXTERNAL_BATTERY   2
 
#define LWM2M_CARRIER_POWER_SOURCE_ETHERNET   4
 
#define LWM2M_CARRIER_POWER_SOURCE_USB   5
 
#define LWM2M_CARRIER_POWER_SOURCE_AC   6
 
#define LWM2M_CARRIER_POWER_SOURCE_SOLAR   7
 

LwM2M device error codes

Values for the OMA LwM2M Device object Error Code resource (/3/0/11).

Set using lwm2m_carrier_error_code_add() and cleared using lwm2m_carrier_error_code_remove().

#define LWM2M_CARRIER_ERROR_CODE_NO_ERROR   0
 
#define LWM2M_CARRIER_ERROR_CODE_LOW_CHARGE   1
 
#define LWM2M_CARRIER_ERROR_CODE_EXTERNAL_SUPPLY_OFF   2
 
#define LWM2M_CARRIER_ERROR_CODE_GPS_FAILURE   3
 
#define LWM2M_CARRIER_ERROR_CODE_LOW_SIGNAL   4
 
#define LWM2M_CARRIER_ERROR_CODE_OUT_OF_MEMORY   5
 
#define LWM2M_CARRIER_ERROR_CODE_SMS_FAILURE   6
 
#define LWM2M_CARRIER_ERROR_CODE_IP_CONNECTIVITY_FAILURE   7
 
#define LWM2M_CARRIER_ERROR_CODE_PERIPHERAL_MALFUNCTION   8
 

LwM2M device battery status

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

Set using lwm2m_carrier_battery_status_set().

Note
The battery status resource is only relevant if lwm2m_carrier_power_source_values has been set to LWM2M_CARRIER_POWER_SOURCE_INTERNAL_BATTERY.
#define LWM2M_CARRIER_BATTERY_STATUS_NORMAL   0
 
#define LWM2M_CARRIER_BATTERY_STATUS_CHARGING   1
 
#define LWM2M_CARRIER_BATTERY_STATUS_CHARGE_COMPLETE   2
 
#define LWM2M_CARRIER_BATTERY_STATUS_DAMAGED   3
 
#define LWM2M_CARRIER_BATTERY_STATUS_LOW_BATTERY   4
 
#define LWM2M_CARRIER_BATTERY_STATUS_NOT_INSTALLED   5
 
#define LWM2M_CARRIER_BATTERY_STATUS_UNKNOWN   6
 

LwM2M portfolio identity types

Resource instance identifiers (y) for the OMA LwM2M Portfolio object Identity resource (/16/x/0/y).

Used in lwm2m_carrier_identity_read() and lwm2m_carrier_identity_write().

#define LWM2M_CARRIER_IDENTITY_ID   0
 
#define LWM2M_CARRIER_IDENTITY_MANUFACTURER   1
 
#define LWM2M_CARRIER_IDENTITY_MODEL   2
 
#define LWM2M_CARRIER_IDENTITY_SW_VERSION   3
 

Detailed Description

This section describes commands to interact with values set in LwM2M objects in the carrier library. This allows you to communicate information to the LwM2M server.