Anjay Lite
|
Default implementation of the LwM2M Device Object (/3). More...
Go to the source code of this file.
Data Structures | |
struct | anj_dm_device_object_init_t |
struct | anj_dm_device_obj_t |
Typedefs | |
typedef void | anj_dm_reboot_callback_t(void *arg, anj_t *anj) |
Functions | |
int | anj_dm_device_obj_install (anj_t *anj, anj_dm_device_obj_t *device_obj, const anj_dm_device_object_init_t *obj_init) |
Default implementation of the LwM2M Device Object (/3).
Provides installation and basic metadata resources such as manufacturer, model, serial number, firmware version, and reboot handling.
typedef void anj_dm_reboot_callback_t(void *arg, anj_t *anj) |
Callback function type for handling the Reboot Resource (/3/0/4).
This function is invoked when the Reboot Resource is executed by the LwM2M server. The user is expected to perform a system reboot after this callback returns.
arg | Opaque argument passed to the callback, as provided in anj_dm_device_object_init_t::reboot_cb_arg. |
anj | Anjay object. |
int anj_dm_device_obj_install | ( | anj_t * | anj, |
anj_dm_device_obj_t * | device_obj, | ||
const anj_dm_device_object_init_t * | obj_init | ||
) |
Installs Device Object (/3) in data model.
Example usage:
anj | Anjay object. |
device_obj | Pointer to a variable that will hold the state of the Object. |
obj_init | Pointer to Object's initialization structure. |