Anjay Lite
Loading...
Searching...
No Matches
server_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_SERVER_OBJ_H
13# define ANJ_DM_SERVER_OBJ_H
14
15# include <stddef.h>
16# include <stdint.h>
17
18# include <anj/core.h>
19# include <anj/defs.h>
20# include <anj/dm/core.h>
21
22# ifdef __cplusplus
23extern "C" {
24# endif
25
26# ifdef ANJ_WITH_DEFAULT_SERVER_OBJ
27
28# ifdef ANJ_WITH_LWM2M12
29# define ANJ_DM_SERVER_OBJ_BINDINGS "UMHTSN"
30# else // ANJ_WITH_LWM2M12
31# define ANJ_DM_SERVER_OBJ_BINDINGS "UTSN"
32# endif // ANJ_WITH_LWM2M12
33
34/*
35 * Server Object Instance context, used to store Instance specific data, don't
36 * modify directly.
37 */
51
55typedef struct {
57 uint16_t ssid;
59 uint32_t lifetime;
69 const char *binding;
75 const anj_iid_t *iid;
78 /*
79 * Resource: Default Notification Mode.
80 * 0 = NonConfirmable, 1 = Confirmable.
81 */
84
85/*
86 * Complex structure of a whole Server Object entity context that holds the
87 * Object and its Instances that are linked to Static Data Model.
88 *
89 * User is expected to instantiate a structure of this type and not modify it
90 * directly throughout the LwM2M Client life.
91 */
100
108
119 anj_dm_server_obj_t *server_obj_ctx,
120 const anj_dm_server_instance_init_t *instance);
121
134
135# endif // ANJ_WITH_DEFAULT_SERVER_OBJ
136
137# ifdef __cplusplus
138}
139# endif
140
141#endif // ANJ_DM_SERVER_OBJ_H
struct anj_struct anj_t
Definition defs.h:133
uint16_t anj_iid_t
Definition defs.h:121
void anj_dm_server_obj_init(anj_dm_server_obj_t *server_obj_ctx)
int anj_dm_server_obj_install(anj_t *anj, anj_dm_server_obj_t *server_obj_ctx)
int anj_dm_server_obj_add_instance(anj_dm_server_obj_t *server_obj_ctx, const anj_dm_server_instance_init_t *instance)
Definition defs.h:166
Definition defs.h:84
Definition defs.h:114
Definition server_object.h:55
bool mute_send
Definition server_object.h:73
bool notification_storing
Definition server_object.h:67
uint8_t default_notification_mode
Definition server_object.h:82
uint16_t ssid
Definition server_object.h:57
const anj_iid_t * iid
Definition server_object.h:75
uint32_t lifetime
Definition server_object.h:59
uint32_t default_min_period
Definition server_object.h:61
const bool * bootstrap_on_registration_failure
Definition server_object.h:71
uint32_t default_max_period
Definition server_object.h:63
const char * binding
Definition server_object.h:69
anj_communication_retry_res_t * comm_retry_res
Definition server_object.h:77
uint32_t disable_timeout
Definition server_object.h:65
Definition server_object.h:92
anj_server_instance_t cache_server_instance
Definition server_object.h:97
anj_dm_obj_inst_t inst
Definition server_object.h:94
anj_dm_obj_t obj
Definition server_object.h:93
anj_dm_obj_inst_t cache_inst
Definition server_object.h:95
anj_server_instance_t server_instance
Definition server_object.h:96
bool installed
Definition server_object.h:98
Definition server_object.h:38
bool mute_send
Definition server_object.h:48
bool notification_storing
Definition server_object.h:49
uint8_t default_notification_mode
Definition server_object.h:44
uint16_t ssid
Definition server_object.h:39
uint32_t lifetime
Definition server_object.h:40
uint32_t default_min_period
Definition server_object.h:41
anj_communication_retry_res_t comm_retry_res
Definition server_object.h:45
uint32_t default_max_period
Definition server_object.h:42
bool bootstrap_on_registration_failure
Definition server_object.h:47
uint32_t disable_timeout
Definition server_object.h:43