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
12#ifndef ANJ_DM_CORE_H
13# define ANJ_DM_CORE_H
14
15# include <anj/defs.h>
16# include <anj/dm/defs.h>
17
18# ifdef __cplusplus
19extern "C" {
20# endif
21
27# define ANJ_DM_ERR_BAD_REQUEST (-(int) ANJ_COAP_CODE_BAD_REQUEST)
32# define ANJ_DM_ERR_UNAUTHORIZED (-(int) ANJ_COAP_CODE_UNAUTHORIZED)
34# define ANJ_DM_ERR_NOT_FOUND (-(int) ANJ_COAP_CODE_NOT_FOUND)
39# define ANJ_DM_ERR_METHOD_NOT_ALLOWED \
40 (-(int) ANJ_COAP_CODE_METHOD_NOT_ALLOWED)
42# define ANJ_DM_ERR_INTERNAL (-(int) ANJ_COAP_CODE_INTERNAL_SERVER_ERROR)
44# define ANJ_DM_ERR_NOT_IMPLEMENTED (-(int) ANJ_COAP_CODE_NOT_IMPLEMENTED)
49# define ANJ_DM_ERR_SERVICE_UNAVAILABLE \
50 (-(int) ANJ_COAP_CODE_SERVICE_UNAVAILABLE)
73int anj_dm_add_obj(anj_t *anj, const anj_dm_obj_t *obj);
74
84
95 const anj_uri_path_t *path,
96 anj_res_value_t *out_value);
97
138 uint8_t *buffer,
139 size_t buffer_len,
140 size_t *out_bytes_len,
141 bool *out_is_last_chunk);
142
182 char *buffer,
183 size_t buffer_len,
184 bool *out_is_last_chunk);
185
194
195# define ANJ_INTERNAL_INCLUDE_DM_DEFS
196# include <anj_internal/dm/defs.h>
197# undef ANJ_INTERNAL_INCLUDE_DM_DEFS
198
199# ifdef __cplusplus
200}
201# endif
202
203#endif // ANJ_DM_CORE_H
struct anj_struct anj_t
Definition defs.h:133
uint16_t anj_oid_t
Definition defs.h:118
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)
void anj_dm_bootstrap_cleanup(anj_t *anj)
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)
Definition defs.h:114
Definition defs.h:213
Definition defs.h:491