anjay
Loading...
Searching...
No Matches
lwm2m_send.h
Go to the documentation of this file.
1/*
2 * Copyright 2017-2024 AVSystem <avsystem@avsystem.com>
3 * AVSystem Anjay LwM2M SDK
4 * All rights reserved.
5 *
6 * Licensed under the AVSystem-5-clause License.
7 * See the attached LICENSE file for details.
8 */
9
10#ifndef ANJAY_INCLUDE_ANJAY_LWM2M_SEND_H
11#define ANJAY_INCLUDE_ANJAY_LWM2M_SEND_H
12
13#include <anjay/anjay.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#ifdef ANJAY_WITH_SEND
20
21typedef struct anjay_send_batch_builder_struct anjay_send_batch_builder_t;
22
23typedef struct anjay_send_batch_struct anjay_send_batch_t;
24
36
50# define ANJAY_SEND_DEFERRED_ERROR (-3)
51
58# define ANJAY_SEND_ABORT (-2)
59
66# define ANJAY_SEND_TIMEOUT (-1)
67
72# define ANJAY_SEND_SUCCESS 0
73
97 anjay_ssid_t ssid,
98 const anjay_send_batch_t *batch,
99 int result,
100 void *data);
101
145
153
177 anjay_oid_t oid,
178 anjay_iid_t iid,
179 anjay_rid_t rid,
180 anjay_riid_t riid,
181 avs_time_real_t timestamp,
182 int64_t value);
183
188 anjay_oid_t oid,
189 anjay_iid_t iid,
190 anjay_rid_t rid,
191 anjay_riid_t riid,
192 avs_time_real_t timestamp,
193 uint64_t value);
194
199 anjay_oid_t oid,
200 anjay_iid_t iid,
201 anjay_rid_t rid,
202 anjay_riid_t riid,
203 avs_time_real_t timestamp,
204 double value);
205
210 anjay_oid_t oid,
211 anjay_iid_t iid,
212 anjay_rid_t rid,
213 anjay_riid_t riid,
214 avs_time_real_t timestamp,
215 bool value);
216
242 anjay_oid_t oid,
243 anjay_iid_t iid,
244 anjay_rid_t rid,
245 anjay_riid_t riid,
246 avs_time_real_t timestamp,
247 const char *str);
248
275 anjay_oid_t oid,
276 anjay_iid_t iid,
277 anjay_rid_t rid,
278 anjay_riid_t riid,
279 avs_time_real_t timestamp,
280 const void *data,
281 size_t length);
282
308 anjay_oid_t oid,
309 anjay_iid_t iid,
310 anjay_rid_t rid,
311 anjay_riid_t riid,
312 avs_time_real_t timestamp,
313 anjay_oid_t objlnk_oid,
314 anjay_iid_t objlnk_iid);
315
334 anjay_t *anjay,
335 anjay_oid_t oid,
336 anjay_iid_t iid,
337 anjay_rid_t rid);
338
354 anjay_t *anjay,
355 const anjay_send_resource_path_t *paths,
356 size_t paths_length);
357
376 anjay_t *anjay,
377 const anjay_send_resource_path_t *paths,
378 size_t paths_length);
379
395
407
415
468
510 anjay_ssid_t ssid,
511 const anjay_send_batch_t *data,
512 anjay_send_finished_handler_t *finished_handler,
513 void *finished_handler_data);
514
544 anjay_ssid_t ssid,
545 const anjay_send_batch_t *data,
546 anjay_send_finished_handler_t *finished_handler,
547 void *finished_handler_data);
548
549#endif // ANJAY_WITH_SEND
550
551#ifdef __cplusplus
552}
553#endif
554
555#endif // ANJAY_INCLUDE_ANJAY_LWM2M_SEND_H
uint16_t anjay_oid_t
Definition core.h:1182
uint16_t anjay_rid_t
Definition core.h:1188
uint16_t anjay_iid_t
Definition core.h:1185
struct anjay_struct anjay_t
Definition core.h:45
uint16_t anjay_ssid_t
Definition core.h:31
uint16_t anjay_riid_t
Definition core.h:1191
int anjay_send_batch_add_bool(anjay_send_batch_builder_t *builder, anjay_oid_t oid, anjay_iid_t iid, anjay_rid_t rid, anjay_riid_t riid, avs_time_real_t timestamp, bool value)
struct anjay_send_batch_builder_struct anjay_send_batch_builder_t
Definition lwm2m_send.h:21
anjay_send_batch_t * anjay_send_batch_builder_compile(anjay_send_batch_builder_t **builder)
int anjay_send_batch_data_add_current_multiple_ignore_not_found(anjay_send_batch_builder_t *builder, anjay_t *anjay, const anjay_send_resource_path_t *paths, size_t paths_length)
int anjay_send_batch_data_add_current(anjay_send_batch_builder_t *builder, anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid, anjay_rid_t rid)
int anjay_send_batch_add_int(anjay_send_batch_builder_t *builder, anjay_oid_t oid, anjay_iid_t iid, anjay_rid_t rid, anjay_riid_t riid, avs_time_real_t timestamp, int64_t value)
int anjay_send_batch_data_add_current_multiple(anjay_send_batch_builder_t *builder, anjay_t *anjay, const anjay_send_resource_path_t *paths, size_t paths_length)
struct anjay_send_batch_struct anjay_send_batch_t
Definition lwm2m_send.h:23
anjay_send_result_t
Definition lwm2m_send.h:419
@ ANJAY_SEND_ERR_PROTOCOL
Definition lwm2m_send.h:460
@ ANJAY_SEND_ERR_MUTED
Definition lwm2m_send.h:434
@ ANJAY_SEND_ERR_UNSUPPORTED
Definition lwm2m_send.h:425
@ ANJAY_SEND_ERR_BOOTSTRAP
Definition lwm2m_send.h:447
@ ANJAY_SEND_ERR_OFFLINE
Definition lwm2m_send.h:441
@ ANJAY_SEND_ERR_INTERNAL
Definition lwm2m_send.h:466
@ ANJAY_SEND_OK
Definition lwm2m_send.h:420
@ ANJAY_SEND_ERR_SSID
Definition lwm2m_send.h:454
void anjay_send_finished_handler_t(anjay_t *anjay, anjay_ssid_t ssid, const anjay_send_batch_t *batch, int result, void *data)
Definition lwm2m_send.h:96
int anjay_send_batch_add_uint(anjay_send_batch_builder_t *builder, anjay_oid_t oid, anjay_iid_t iid, anjay_rid_t rid, anjay_riid_t riid, avs_time_real_t timestamp, uint64_t value)
anjay_send_batch_t * anjay_send_batch_acquire(const anjay_send_batch_t *batch)
void anjay_send_batch_release(anjay_send_batch_t **batch)
anjay_send_batch_builder_t * anjay_send_batch_builder_new(void)
void anjay_send_batch_builder_cleanup(anjay_send_batch_builder_t **builder)
anjay_send_result_t anjay_send(anjay_t *anjay, anjay_ssid_t ssid, const anjay_send_batch_t *data, anjay_send_finished_handler_t *finished_handler, void *finished_handler_data)
int anjay_send_batch_add_double(anjay_send_batch_builder_t *builder, anjay_oid_t oid, anjay_iid_t iid, anjay_rid_t rid, anjay_riid_t riid, avs_time_real_t timestamp, double value)
int anjay_send_batch_add_bytes(anjay_send_batch_builder_t *builder, anjay_oid_t oid, anjay_iid_t iid, anjay_rid_t rid, anjay_riid_t riid, avs_time_real_t timestamp, const void *data, size_t length)
anjay_send_result_t anjay_send_deferrable(anjay_t *anjay, anjay_ssid_t ssid, const anjay_send_batch_t *data, anjay_send_finished_handler_t *finished_handler, void *finished_handler_data)
int anjay_send_batch_add_string(anjay_send_batch_builder_t *builder, anjay_oid_t oid, anjay_iid_t iid, anjay_rid_t rid, anjay_riid_t riid, avs_time_real_t timestamp, const char *str)
int anjay_send_batch_add_objlnk(anjay_send_batch_builder_t *builder, anjay_oid_t oid, anjay_iid_t iid, anjay_rid_t rid, anjay_riid_t riid, avs_time_real_t timestamp, anjay_oid_t objlnk_oid, anjay_iid_t objlnk_iid)
Definition lwm2m_send.h:31
anjay_iid_t iid
Definition lwm2m_send.h:33
anjay_oid_t oid
Definition lwm2m_send.h:32
anjay_rid_t rid
Definition lwm2m_send.h:34