Anjay Lite
Loading...
Searching...
No Matches
core.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
21#ifndef ANJ_DM_CORE_H
22# define ANJ_DM_CORE_H
23
24# include <anj/defs.h>
25# include <anj/dm/defs.h>
26
27# ifdef __cplusplus
28extern "C" {
29# endif
30
40# define ANJ_DM_ERR_BAD_REQUEST (-(int) ANJ_COAP_CODE_BAD_REQUEST)
41
46# define ANJ_DM_ERR_UNAUTHORIZED (-(int) ANJ_COAP_CODE_UNAUTHORIZED)
47
51# define ANJ_DM_ERR_NOT_FOUND (-(int) ANJ_COAP_CODE_NOT_FOUND)
52
57# define ANJ_DM_ERR_METHOD_NOT_ALLOWED \
58 (-(int) ANJ_COAP_CODE_METHOD_NOT_ALLOWED)
59
63# define ANJ_DM_ERR_INTERNAL (-(int) ANJ_COAP_CODE_INTERNAL_SERVER_ERROR)
64
68# define ANJ_DM_ERR_NOT_IMPLEMENTED (-(int) ANJ_COAP_CODE_NOT_IMPLEMENTED)
69
74# define ANJ_DM_ERR_SERVICE_UNAVAILABLE \
75 (-(int) ANJ_COAP_CODE_SERVICE_UNAVAILABLE)
76
98int anj_dm_add_obj(anj_t *anj, const anj_dm_obj_t *obj);
99
109
120 const anj_uri_path_t *path,
121 anj_res_value_t *out_value);
122
150 uint8_t *buffer,
151 size_t buffer_len,
152 size_t *out_bytes_len,
153 bool *out_is_last_chunk);
154
181 char *buffer,
182 size_t buffer_len,
183 bool *out_is_last_chunk);
184
186# define ANJ_INTERNAL_INCLUDE_DM_DEFS
187# include <anj_internal/dm/defs.h>
188# undef ANJ_INTERNAL_INCLUDE_DM_DEFS
191# ifdef __cplusplus
192}
193# endif
194
195#endif // ANJ_DM_CORE_H
Core type and constant definitions for Anjay Lite.
struct anj_struct anj_t
Definition defs.h:136
uint16_t anj_oid_t
Definition defs.h:125
int anj_dm_remove_obj(anj_t *anj, anj_oid_t oid)
int anj_dm_res_read(anj_t *anj, const anj_uri_path_t *path, anj_res_value_t *out_value)
int anj_dm_write_string_chunked(const anj_res_value_t *value, char *buffer, size_t buffer_len, bool *out_is_last_chunk)
int anj_dm_add_obj(anj_t *anj, const anj_dm_obj_t *obj)
int anj_dm_write_bytes_chunked(const anj_res_value_t *value, uint8_t *buffer, size_t buffer_len, size_t *out_bytes_len, bool *out_is_last_chunk)
Data model definitions: resources, instances, objects, and handlers.
Global configuration validation header for Anjay Lite.
Definition defs.h:157
Definition defs.h:260
Definition defs.h:539