@ -848,29 +848,36 @@ The following code has the exact behavior of the code in :ref:`reading from a ch
@@ -848,29 +848,36 @@ The following code has the exact behavior of the code in :ref:`reading from a ch
Runtime observer registration
-----------------------------
It is possible to add observers to channels at runtime if
:kconfig:option:`CONFIG_ZBUS_RUNTIME_OBSERVERS` is enabled. In addition to the channel and observer
references, :c:func:`zbus_chan_add_obs` also requires a :c:struct:`zbus_observer_node` to link the two
together, which must remain valid in memory for the duration that the observer is attached to the
channel. The simplest way to achieve this is to make the structure ``static``.
It is possible to add observers to channels in runtime. Set the
:kconfig:option:`CONFIG_ZBUS_RUNTIME_OBSERVERS` to enable the feature. This feature uses the heap to
allocate the nodes dynamically, a memory slab to allocate the nodes statically, or user-provided
nodes. It depends on the :kconfig:option:`CONFIG_ZBUS_RUNTIME_OBSERVERS_NODE_ALLOC`, which can be