zephyr/tests/net/lib
Seppo Takalo ec3ec8cd2a net: lwm2m: Add LWM2M_ON_INIT() macro
Add macro that allows registration of initialization functions that
are called when LwM2M engine starts.

On LwM2M engine starts up, it first executes all initialization
functions in following priority order:
1. LWM2M_PRIO_ENGINE
2. LWM2M_PRIO_CORE, this is where all LwM2M core objects are initialized
3. LWM2M_PRIO_OBJ, this is where all other objects are initialized
4. LwM2M_PRIO_APP, application initialization.

Now on the initialization phase, we could rely that certain objects have
already been registered.
For example custom objects can register callbacks to core objects.
On application phase, we can initialize sensor objects and register
their callbacks because objects have already been initialized.

This LWM2M_ON_INIT() should replace all use of SYS_INIT()
with the default CONFIG_KERNEL_INIT_PRIORITY_DEFAULT.

Priority order is actually just alphabetical order of names, so
the order is set on a linkin phase, and we don't need any
runtime checking for it.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-01-24 10:44:28 +01:00
..
coap tests: net: coap: Add test case for transmission parameters 2023-12-15 11:41:27 +00:00
coap_client net: lib: coap: Change coap_pending_init() 2023-12-15 11:41:27 +00:00
coap_server/common tests: net: lib: coap_server: Do not autostart service B with port 0 2023-12-01 10:56:47 +00:00
dns_addremove tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
dns_packet tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
dns_resolve tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
dns_sd tests: net: dns-sd: Fix IPv4 TTL and IPv6 hop limit checking 2023-12-04 15:07:43 +01:00
http_header_fields tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
http_server/common tests/net/lib/http_server: Switch from native_posix to native_sim 2023-11-20 09:21:13 +01:00
lwm2m net: lwm2m: Add LWM2M_ON_INIT() macro 2024-01-24 10:44:28 +01:00
mqtt_packet tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
mqtt_publisher tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
mqtt_pubsub tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
mqtt_sn_client tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
mqtt_sn_packet tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
mqtt_subscriber tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
tls_credentials tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00