-
Notifications
You must be signed in to change notification settings - Fork 2k
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: add operational flow figure for netdev #5437
Conversation
* event==NETDEV_EVENT_RX_COMPLETE | ||
* 5. netdev2->event_callback() uses netdev2->driver.recv() to fetch packet | ||
* 1. packet arrives for device | ||
* 2. driver calls @ref netdev2_t::event_callback "netdev->event_callback()" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I your sequential diagram the ISR is calling netdev::event_cb()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the function is called the way it is called here. There is no room in the sequence diagram for the full name and people should IMHO know, that a model is a model and that names are only "Schall und Rauch" ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if I don't understand your answer or if my comment was misleading.
I wanted to point out that there are differences between the text and the diagram. You're writing:
- driver calls netdev->event_callback() ....
But in the diagram the ISR is calling the function (As far as I can see).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes this is indeed missleading (it's the ISR registered by the driver, but never the less you are right).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mh but reading the list item again in total it is mostly clear IMHO
driver calls netdev->event_callback() with
event
:= NETDEV2_EVENT_ISR _(from Interrupt Service Routine)_ and wakes up event handler
Any idea how to make it more clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I would refer to what I remember about basic principles of documentation.
- Try to avoid information that is not essential for understanding the specific topic.
- Use a figure only to provide additional structural overview. Don't repeat information which is already in your text. Instead try to use references to the explaining passages.
Have you considered just using the sequence numbers as message labels in the SD? That is space saving too. - Always remember that the reader is someone who needs your guide through the topic. And not someone who is capable to resolve inconsistencies on its own.
You claimed the different notations to be all correct. Indeed it is true.
But if I see different notaions, slightly different function names, etc. Then I try to figure out if the is some meaning in those different representations or I check if I'm the wrong part of the diagram. For that moment I'm completely distracted from the sequence of events you want to show me.
Phew, that turned into something like the "Wort zum Sonntag" :D
Not intended to offend you. I just want to make clear why I'm stressing those stupid questions so much.
driver calls netdev->event_callback() with
event
:= NETDEV2_EVENT_ISR _(from Interrupt Service Routine)_ and wakes up event handlerAny idea how to make it more clear?
Just try what you answered to my questions to get me on the track.
Before the start of the sequence, mention that the ISR has to be registered by the driver as a precondition.
And then e.g.:
- ISR calls netdev->event_callback(NETDEV2_EVENT_ISR) and wakes up event handler
Given that I understood what is going on...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never understood as offence, just frustrated with my own incompetence ;-). Will try to take your advice to heart and fix this... tomorrow ;-)
@A-Paul ping? |
Don't laugh: hand-crafted SVG in vim ;-) |
(how else did you think the XML came out that neat :P) |
Addressed comments. |
Regarding the font definition block this is outstanding. :D |
Well I used inkscape as a starting point for formatting (and if I remember correctly a UML editor to get a structural template), but I found that generated XML is much harder to version control than hand-edited, so I thought why not make it proper so that most changes are easier to review. |
Very close to what I imagined. :) Thanks. |
ce3562c
to
af2e169
Compare
Squashed. |
Sure? :) |
Yes. One commit for the introduction of the graphic, one for the netdev doc change. |
Somehow I thought that, in the end, there should be only one commit in a PR. |
I made this graphic for my thesis and I (and @OlegHahm) think it might be nice to have this in the doc.