Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
lwm2m_res_item Struct Reference

LwM2M resource item structure. More...

#include <lwm2m.h>

Data Fields

struct lwm2m_obj_pathpath
 Pointer to LwM2M path as a struct.
 
void * value
 Pointer to resource value.
 
uint16_t size
 Size of the value.
 

Detailed Description

LwM2M resource item structure.

Value type must match the target resource as no type conversion are done and the value is just memcopied.

Following C types are used for resource types:

  • BOOL is uint8_t
  • U8 is uint8_t
  • S8 is int8_t
  • U16 is uint16_t
  • S16 is int16_t
  • U32 is uint32_t
  • S32 is int32_t
  • S64 is int64_t
  • TIME is time_t
  • FLOAT is double
  • OBJLNK is struct lwm2m_objlnk
  • STRING is char * and the null-terminator should be included in the size.
  • OPAQUE is any binary data. When null-terminated string is written in OPAQUE resource, the terminator should not be included in size.

Field Documentation

◆ path

struct lwm2m_obj_path* lwm2m_res_item::path

Pointer to LwM2M path as a struct.

◆ size

uint16_t lwm2m_res_item::size

Size of the value.

For string resources, it should contain the null-terminator.

◆ value

void* lwm2m_res_item::value

Pointer to resource value.


The documentation for this struct was generated from the following file: