doc: zbus: improve sensor-based illustration example

The sensor-based illustration example did not consider the HLP feature
and used the work queue to publish to the Trigger channel. With the HLP,
that is not necessary anymore. The timer ISR can publish to the channel
directly. So, this commit improves the example description by
considering the HLP feature.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
This commit is contained in:
Rodrigo Peixoto 2024-02-03 09:17:00 -03:00 committed by Henrik Brix Andersen
parent 575eb123e9
commit 08f163cdf6
2 changed files with 55 additions and 59 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View file

@ -98,18 +98,17 @@ notifications from channels ``C3`` and ``C5`` to ``Subscriber 1``.
Suppose a usual sensor-based solution is in the figure below for illustration purposes. When
triggered, the timer pushes an action to a work queue that publishes to the ``Trigger`` channel. As
the sensor thread subscribed to the ``Trigger`` channel, it receives the sensor data. Notice the
VDED executes the ``Blink`` because it also listens to the ``Trigger`` channel. When the sensor data
is ready, the sensor thread publishes it to the ``Sensor data`` channel. The core thread receives
the message as a ``Sensor data`` channel message subscriber, processes the sensor data, and stores
it in an internal sample buffer. It repeats until the sample buffer is full; when it happens, the
core thread aggregates the sample buffer information, prepares a package, and publishes that to the
``Payload`` channel. The Lora thread receives that because it is a ``Payload`` channel message
subscriber and sends the payload to the cloud. When it completes the transmission, the Lora thread
publishes to the ``Transmission done`` channel. The VDED executes the ``Blink`` again since it
listens to the ``Transmission done`` channel.
triggered, the timer publishes to the ``Trigger`` channel. As the sensor thread subscribed to the
``Trigger`` channel, it receives the sensor data. Notice the VDED executes the ``Blink`` because it
also listens to the ``Trigger`` channel. When the sensor data is ready, the sensor thread publishes
it to the ``Sensor data`` channel. The core thread receives the message as a ``Sensor data`` channel
message subscriber, processes the sensor data, and stores it in an internal sample buffer. It
repeats until the sample buffer is full; when it happens, the core thread aggregates the sample
buffer information, prepares a package, and publishes that to the ``Payload`` channel. The Lora
thread receives that because it is a ``Payload`` channel message subscriber and sends the payload to
the cloud. When it completes the transmission, the Lora thread publishes to the ``Transmission
done`` channel. The VDED executes the ``Blink`` again since it listens to the ``Transmission done``
channel.
.. figure:: images/zbus_operations.svg
:alt: ZBus sensor-based application