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
20#ifndef ANJ_CORE_H
21# define ANJ_CORE_H
22
24# include <anj/defs.h>
25# include <anj/dm/core.h>
26
28# define ANJ_INTERNAL_INCLUDE_EXCHANGE
29# include <anj_internal/exchange.h> // IWYU pragma: export
30# undef ANJ_INTERNAL_INCLUDE_EXCHANGE
34# ifdef ANJ_WITH_BOOTSTRAP
35# define ANJ_INTERNAL_INCLUDE_BOOTSTRAP
36# include <anj_internal/bootstrap.h> // IWYU pragma: export
37# undef ANJ_INTERNAL_INCLUDE_BOOTSTRAP
38# endif // ANJ_WITH_BOOTSTRAP
41# ifdef ANJ_WITH_LWM2M_SEND
42# include <anj/lwm2m_send.h>
43# endif // ANJ_WITH_LWM2M_SEND
44
45# ifdef __cplusplus
46extern "C" {
47# endif
48
49# if defined(ANJ_COAP_WITH_TCP) && defined(ANJ_COAP_WITH_UDP)
50# define ANJ_SUPPORTED_BINDING_MODES "UT"
51# elif defined(ANJ_COAP_WITH_TCP)
52# define ANJ_SUPPORTED_BINDING_MODES "T"
53# else
54# define ANJ_SUPPORTED_BINDING_MODES "U"
55# endif
56
131
146
162typedef void anj_connection_status_callback_t(void *arg,
163 anj_t *anj,
164 anj_conn_status_t conn_status);
165
269
285int anj_core_init(anj_t *anj, const anj_configuration_t *config);
286
301
341
360void anj_core_server_obj_disable_executed(anj_t *anj, uint32_t timeout);
361
372
386
418 const anj_uri_path_t *path,
419 anj_core_change_type_t change_type);
420
437
456
479
489
543
545# define ANJ_INTERNAL_INCLUDE_CORE
546# include <anj_internal/core.h> // IWYU pragma: export
547# undef ANJ_INTERNAL_INCLUDE_CORE
550# ifdef __cplusplus
551}
552# endif
553
554#endif // ANJ_CORE_H
Platform hooks for network transport integration.
void anj_connection_status_callback_t(void *arg, anj_t *anj, anj_conn_status_t conn_status)
Definition core.h:162
struct anj_configuration_struct anj_configuration_t
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)
void anj_core_disable_server(anj_t *anj, anj_time_duration_t timeout)
anj_core_change_type_t
Definition core.h:136
@ ANJ_CORE_CHANGE_TYPE_DELETED
Definition core.h:144
@ ANJ_CORE_CHANGE_TYPE_VALUE_CHANGED
Definition core.h:138
@ ANJ_CORE_CHANGE_TYPE_ADDED
Definition core.h:141
void anj_core_step(anj_t *anj)
anj_conn_status_t
Definition core.h:60
@ ANJ_CONN_STATUS_ENTERING_QUEUE_MODE
Definition core.h:123
@ ANJ_CONN_STATUS_REGISTERING
Definition core.h:104
@ ANJ_CONN_STATUS_QUEUE_MODE
Definition core.h:129
@ ANJ_CONN_STATUS_INITIAL
Definition core.h:71
@ ANJ_CONN_STATUS_REGISTERED
Definition core.h:109
@ ANJ_CONN_STATUS_INVALID
Definition core.h:79
@ ANJ_CONN_STATUS_SUSPENDED
Definition core.h:118
@ ANJ_CONN_STATUS_FAILURE
Definition core.h:89
@ ANJ_CONN_STATUS_BOOTSTRAPPING
Definition core.h:94
@ ANJ_CONN_STATUS_BOOTSTRAPPED
Definition core.h:99
void anj_core_data_model_changed(anj_t *anj, const anj_uri_path_t *path, anj_core_change_type_t change_type)
anj_time_duration_t anj_core_next_step_time(anj_t *anj)
void anj_core_server_obj_disable_executed(anj_t *anj, uint32_t timeout)
void anj_core_request_bootstrap(anj_t *anj)
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)
Core type and constant definitions for Anjay Lite.
struct anj_struct anj_t
Definition defs.h:136
Core data model API: object management, read/write helpers, bootstrap.
Global configuration validation header for Anjay Lite.
Public API for composing and queuing LwM2M Send messages.
Definition core.h:169
anj_time_duration_t bootstrap_retry_timeout
Definition core.h:253
const anj_net_socket_configuration_t * net_socket_cfg
Definition core.h:226
anj_connection_status_callback_t * connection_status_cb
Definition core.h:187
anj_time_duration_t queue_mode_timeout
Definition core.h:221
anj_time_duration_t bootstrap_timeout
Definition core.h:266
bool queue_mode_enabled
Definition core.h:212
uint16_t bootstrap_retry_count
Definition core.h:245
anj_time_duration_t exchange_request_timeout
Definition core.h:238
const anj_exchange_udp_tx_params_t * udp_tx_params
Definition core.h:232
const char * endpoint_name
Definition core.h:177
void * connection_status_cb_arg
Definition core.h:195
Definition defs.h:215
Definition anj_net_api.h:156
Relative duration of time.
Definition time.h:106
Definition defs.h:260