Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: zbus: update documentation with changes for 3.5 #63674

Merged
merged 2 commits into from
Oct 11, 2023

Conversation

rodrigopex
Copy link
Contributor

@rodrigopex rodrigopex commented Oct 9, 2023

Add documentation for the new way to allocate observers, the message subscribers, and the confirmed message sample. And
add the breaking changes to the migration guide.

Structural changes:

  • Replace Zbus with ZBus;
  • Remove the message from the slogan. Zephyr Bus instead of Zephyr Message Bus;
  • Change the images.

@rodrigopex rodrigopex added this to the v3.5.0 milestone Oct 9, 2023
@rodrigopex rodrigopex marked this pull request as ready for review October 9, 2023 02:19
@rodrigopex rodrigopex requested review from kartben and gmarull and removed request for nashif and carlescufi October 9, 2023 02:19
@rodrigopex
Copy link
Contributor Author

rodrigopex commented Oct 9, 2023

@kartben, I would like to share the Figma file I used to draw the bus diagrams with people. The files are here: https://www.figma.com/community/file/1292866458780627559/zbus-diagram-assets. What do you think is the best way to do that?

Copy link
Collaborator

@kartben kartben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a few comments. Anything you could do to make the diff easier to review would be appreciated!

doc/services/zbus/index.rst Outdated Show resolved Hide resolved
doc/services/zbus/index.rst Outdated Show resolved Hide resolved
doc/services/zbus/index.rst Outdated Show resolved Hide resolved
@kartben
Copy link
Collaborator

kartben commented Oct 9, 2023

@kartben, I would like to share the Figma file I used to draw the bus diagrams with people. The files are here: https://www.figma.com/community/file/1292866458780627559. What do you think is the best way to do that?

I would add a comment at the top of the index.rst

..
   Note to documentation authors: the diagrams included in this documentation page were designed
   using the following Figma library: xxx. 

@rodrigopex rodrigopex force-pushed the zbus_doc_3version5 branch 5 times, most recently from 0bb2c7f to c6e08bc Compare October 9, 2023 21:45
@rodrigopex rodrigopex requested a review from kartben October 9, 2023 21:58
Copy link
Contributor Author

@rodrigopex rodrigopex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migration guide entries added.

jhedberg
jhedberg previously approved these changes Oct 11, 2023
@rodrigopex rodrigopex requested a review from jukkar October 11, 2023 10:46
Copy link
Contributor Author

@rodrigopex rodrigopex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improve migration guide sentence regarding runtime observers.

@rodrigopex rodrigopex closed this Oct 11, 2023
@rodrigopex rodrigopex reopened this Oct 11, 2023
@rodrigopex rodrigopex force-pushed the zbus_doc_3version5 branch 2 times, most recently from 06ea6a5 to 9a8f009 Compare October 11, 2023 12:16
@rodrigopex
Copy link
Contributor Author

@jukkar and @jhedberg, could you please take a look at that again? There was some conflict, and I needed to submit that again after accidentally accepting a merge offered by GitHub.

jhedberg
jhedberg previously approved these changes Oct 11, 2023
Copy link
Collaborator

@kartben kartben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff @rodrigopex! I based my review mostly on the looks of the final rendered page rather than looking specifically at the diff -- spotted a few formatting style issues.

doc/releases/migration-guide-3.5.rst Outdated Show resolved Hide resolved
doc/services/zbus/index.rst Outdated Show resolved Hide resolved
doc/services/zbus/index.rst Outdated Show resolved Hide resolved
doc/services/zbus/index.rst Outdated Show resolved Hide resolved
Comment on lines 771 to 787
* :zephyr:code-sample:`zbus-hello-world` illustrates the code used above in action;
* :zephyr:code-sample:`zbus-work-queue` shows how to define and use different kinds of observers. Note there is an example of using a work queue instead of executing the listener as an execution option;
* :zephyr:code-sample:`zbus-dyn-channel` demonstrates how to use dynamically allocated exchanging data in zbus;
* :zephyr:code-sample:`zbus-uart-bridge` shows an example of sending the operation of the channel to a host via serial;
* :zephyr:code-sample:`zbus-remote-mock` illustrates how to implement an external mock (on the host) to send and receive messages to and from the bus.
* :zephyr:code-sample:`zbus-runtime-obs-registration` illustrates a way of using the runtime observer registration feature;
* :zephyr:code-sample:`zbus-work-queue` shows how to define and use different kinds of observers.
Note there is an example of using a work queue instead of executing the listener as an execution
option;
* :zephyr:code-sample:`zbus-msg-subscriber` illustrates how to use message subscribers.
* :zephyr:code-sample:`zbus-dyn-channel` demonstrates how to use dynamically allocated exchanging
data in zbus;
* :zephyr:code-sample:`zbus-uart-bridge` shows an example of sending the operation of the channel to
a host via serial;
* :zephyr:code-sample:`zbus-remote-mock` illustrates how to implement an external mock (on the host)
to send and receive messages to and from the bus.
* :zephyr:code-sample:`zbus-runtime-obs-registration` illustrates a way of using the runtime
observer registration feature;
* :zephyr:code-sample:`zbus-confirmed-channel` implements a way of implement confirmed channel only
with subscribers.
* :zephyr:code-sample:`zbus-benchmark` implements a benchmark with different combinations of inputs.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw it makes me realize that it would maybe make sense to provide a Sphinx directive that outputs the equivalent of what shows up in the API reference, as this could be useful to list samples anywhere.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kartben, how could you change the title of the note?

image

Should I remove the Samples sections?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I should have been clearer, and I think it's fine if you live it as-is for now. I was mostly talking to myself and thinking that I should add to the code-sample sphinx extension a way to easily output the list of samples related to a specific set of doxygengroups, as it might be useful in situations like yours.

That being said, this section pretty much "paraphrases" the list of samples that also already show up automatically in the API reference, mere lines below, so if you think that list is enough and easy enough to not miss for folks, then maybe just drop your Samples section altogether (but again, also 100% fine with me if you'd like to keep it!)

doc/services/zbus/index.rst Outdated Show resolved Hide resolved
Copy link
Contributor Author

@rodrigopex rodrigopex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kartben, I changed most of your requests. The only thing I still need to change is the samples. I'm just waiting for your feedback to remove that or not. But the rest is ok.

Add documentation for the new way to storage observers, the message
subscribers, and the confirmed message sample.

Signed-off-by: Rodrigo Peixoto <[email protected]>
ZBus had one break change related to the runtime observers'
configuration, and the VDED delivery sequence has changed. This commit
adds entries on the migration guide about the mentioned changes.

Signed-off-by: Rodrigo Peixoto <[email protected]>
@jhedberg jhedberg merged commit 28eb479 into zephyrproject-rtos:main Oct 11, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants