Anjay Lite
Loading...
Searching...
No Matches
device_object.h
Go to the documentation of this file.
1/*
2 * Copyright 2023-2025 AVSystem <avsystem@avsystem.com>
3 * AVSystem Anjay Lite LwM2M SDK
4 * All rights reserved.
5 *
6 * Licensed under AVSystem Anjay Lite LwM2M Client SDK - Non-Commercial License.
7 * See the attached LICENSE file for details.
8 */
9
10#include <anj/init.h>
11
12#ifndef ANJ_DM_DEVICE_OBJECT_H
13# define ANJ_DM_DEVICE_OBJECT_H
14
15# include <anj/core.h>
16# include <anj/dm/core.h>
17
18# ifdef __cplusplus
19extern "C" {
20# endif
21
22# ifdef ANJ_WITH_DEFAULT_DEVICE_OBJ
23
24/*
25 * HACK: error handling is not supported so in order to comply with the
26 * definition of the object only one instance of Error Code resource is
27 * defined with the value set to 0 which means "no errors".
28 */
29# define ANJ_DM_DEVICE_ERR_CODE_RES_INST_MAX_COUNT 1
30
45typedef void anj_dm_reboot_callback_t(void *arg, anj_t *anj);
46
59typedef struct {
60 // /3/0/0 resource value
61 const char *manufacturer;
62 // /3/0/1 resource value
63 const char *model_number;
64 // /3/0/2 resource value
65 const char *serial_number;
66 // /3/0/3 resource value
67 const char *firmware_version;
68 // /3/0/4 resource callback
69 // if not set, execute on /3/0/4 (reboot) resource will fail
71 // argument passed to the reboot callback
74
93
123 anj_dm_device_obj_t *device_obj,
125
126# endif // ANJ_WITH_DEFAULT_DEVICE_OBJ
127
128# ifdef __cplusplus
129}
130# endif
131
132#endif // ANJ_DM_DEVICE_OBJECT_H
struct anj_struct anj_t
Definition defs.h:133
void anj_dm_reboot_callback_t(void *arg, anj_t *anj)
Definition device_object.h:45
int anj_dm_device_obj_install(anj_t *anj, anj_dm_device_obj_t *device_obj, anj_dm_device_object_init_t *obj_init)
Definition device_object.h:82
void * reboot_handler_arg
Definition device_object.h:86
const char * firmware_version
Definition device_object.h:90
const char * serial_number
Definition device_object.h:89
anj_dm_obj_inst_t inst
Definition device_object.h:84
anj_dm_obj_t obj
Definition device_object.h:83
const char * binding_modes
Definition device_object.h:91
const char * manufacturer
Definition device_object.h:87
anj_dm_reboot_callback_t * reboot_cb
Definition device_object.h:85
const char * model_number
Definition device_object.h:88
Definition device_object.h:59
void * reboot_handler_arg
Definition device_object.h:72
const char * firmware_version
Definition device_object.h:67
const char * serial_number
Definition device_object.h:65
const char * manufacturer
Definition device_object.h:61
anj_dm_reboot_callback_t * reboot_cb
Definition device_object.h:70
const char * model_number
Definition device_object.h:63
Definition defs.h:84
Definition defs.h:114