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_CORE_H
13# define ANJ_CORE_H
14
16# include <anj/defs.h>
17# include <anj/dm/core.h>
18
19# define ANJ_INTERNAL_INCLUDE_EXCHANGE
20# include <anj_internal/exchange.h> // IWYU pragma: export
21# undef ANJ_INTERNAL_INCLUDE_EXCHANGE
22
23# ifdef ANJ_WITH_BOOTSTRAP
24# define ANJ_INTERNAL_INCLUDE_BOOTSTRAP
25# include <anj_internal/bootstrap.h> // IWYU pragma: export
26# undef ANJ_INTERNAL_INCLUDE_BOOTSTRAP
27# endif // ANJ_WITH_BOOTSTRAP
28
29# ifdef ANJ_WITH_LWM2M_SEND
30# include <anj/lwm2m_send.h>
31# endif // ANJ_WITH_LWM2M_SEND
32
33# ifdef __cplusplus
34extern "C" {
35# endif
36
37# if defined(ANJ_COAP_WITH_TCP) && defined(ANJ_COAP_WITH_UDP)
38# define ANJ_SUPPORTED_BINDING_MODES "UT"
39# elif defined(ANJ_COAP_WITH_TCP)
40# define ANJ_SUPPORTED_BINDING_MODES "T"
41# else
42# define ANJ_SUPPORTED_BINDING_MODES "U"
43# endif
44
109
122
137typedef void anj_connection_status_callback_t(void *arg,
138 anj_t *anj,
139 anj_conn_status_t conn_status);
140
242
260int anj_core_init(anj_t *anj, const anj_configuration_t *config);
261
276
311
322
338void anj_core_server_obj_disable_executed(anj_t *anj, uint32_t timeout);
339
350
364
391 const anj_uri_path_t *path,
392 anj_core_change_type_t change_type);
393
410void anj_core_disable_server(anj_t *anj, uint64_t timeout_ms);
411
424
450
460
514
515# define ANJ_INTERNAL_INCLUDE_CORE
516# include <anj_internal/core.h> // IWYU pragma: export
517# undef ANJ_INTERNAL_INCLUDE_CORE
518
519# ifdef __cplusplus
520}
521# endif
522
523#endif // ANJ_CORE_H
bool anj_core_ongoing_operation(anj_t *anj)
void anj_connection_status_callback_t(void *arg, anj_t *anj, anj_conn_status_t conn_status)
Definition core.h:137
int anj_core_init(anj_t *anj, const anj_configuration_t *config)
int anj_core_shutdown(anj_t *anj)
void anj_core_server_obj_bootstrap_request_trigger_executed(anj_t *anj)
anj_core_change_type_t
Definition core.h:114
@ ANJ_CORE_CHANGE_TYPE_DELETED
Definition core.h:120
@ ANJ_CORE_CHANGE_TYPE_VALUE_CHANGED
Definition core.h:116
@ ANJ_CORE_CHANGE_TYPE_ADDED
Definition core.h:118
void anj_core_step(anj_t *anj)
anj_conn_status_t
Definition core.h:48
@ ANJ_CONN_STATUS_ENTERING_QUEUE_MODE
Definition core.h:102
@ ANJ_CONN_STATUS_REGISTERING
Definition core.h:87
@ ANJ_CONN_STATUS_QUEUE_MODE
Definition core.h:107
@ ANJ_CONN_STATUS_INITIAL
Definition core.h:59
@ ANJ_CONN_STATUS_REGISTERED
Definition core.h:91
@ ANJ_CONN_STATUS_INVALID
Definition core.h:66
@ ANJ_CONN_STATUS_SUSPENDED
Definition core.h:98
@ ANJ_CONN_STATUS_FAILURE
Definition core.h:75
@ ANJ_CONN_STATUS_BOOTSTRAPPING
Definition core.h:79
@ ANJ_CONN_STATUS_BOOTSTRAPPED
Definition core.h:83
void anj_core_data_model_changed(anj_t *anj, const anj_uri_path_t *path, anj_core_change_type_t change_type)
struct anjay_configuration_struct anj_configuration_t
void anj_core_server_obj_disable_executed(anj_t *anj, uint32_t timeout)
void anj_core_request_bootstrap(anj_t *anj)
uint64_t anj_core_next_step_time(anj_t *anj)
void anj_core_disable_server(anj_t *anj, uint64_t timeout_ms)
void anj_core_restart(anj_t *anj)
void anj_core_request_update(anj_t *anj)
void anj_core_server_obj_registration_update_trigger_executed(anj_t *anj)
struct anj_struct anj_t
Definition defs.h:133
Definition defs.h:184
Definition anj_net_api.h:378
Definition defs.h:213
Definition core.h:144
anj_connection_status_callback_t * connection_status_cb
Definition core.h:159
uint32_t bootstrap_timeout
Definition core.h:239
uint32_t bootstrap_retry_timeout
Definition core.h:227
bool queue_mode_enabled
Definition core.h:184
uint16_t bootstrap_retry_count
Definition core.h:219
uint64_t exchange_request_timeout_ms
Definition core.h:212
const anj_exchange_udp_tx_params_t * udp_tx_params
Definition core.h:205
const char * endpoint_name
Definition core.h:150
void * connection_status_cb_arg
Definition core.h:167
const anj_net_config_t * net_socket_cfg
Definition core.h:199
uint64_t queue_mode_timeout_ms
Definition core.h:194