Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Draft the design document and prepare a rough mockup of the C++ API #1
Draft the design document and prepare a rough mockup of the C++ API #1
Changes from 9 commits
e451011
579c180
bfc347d
f8dd93a
32fc5c0
e1eef4c
c8d097a
4c97198
240a0c0
2bec503
39f3357
c4b03ef
963a8bf
ef6a782
aec45e6
d5007bc
b275694
e57d37f
12bff65
b464cec
6230df8
fc01f26
8a765a0
72fdfd8
96b34fb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
With fixed port-id approach, for me it looks like there can be potentially only one operation in progress. IMO more flexible approach would be if ExecuteCommand has a new field with desired port id (f.e. with
progressPortId
field name) where server should postuavcan.diagnostic.ProgressReport
-s for this operation we are executing. If thisprogressPortId
is set (>0) then it means that client wants progresses. With this approach...:Alternately, especially if a fixed port-ID is desired, we should at least add some unique operation id (int64?) into ExecuteCommand and into corresponding ProgressReport messages, so that it will be possible to distinguish to which operation this particular progress msg is related to. Again, we can use default 0 operation id as indication that client doesn't want progresses for this command.
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 was originally reluctant to agree to this because opening a new publisher on the updatee is a highly fallible operation that is better done at the initialization stage, but then I concluded that the advantages probably outweigh the disadvantages. You have already enumerated the advantages of this approach correctly. I might add that the fixed port-ID solution is too reminiscent of DroneCAN in its rigidity, and if one wants DroneCAN, one knows where to find it.
In the most basic case, each node sending ExecuteCommand requests would have a subscriber for the progress reports configured via a register; the same subject-ID will be sent to the clients when progress reports are desired.
In this case we don't need a new message type as we can just leverage
uavcan.primitive.scalar.Natural8.1
.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 believe how we currently handle this in our software install is that we query a register on the updatee. Would that be sufficient?
yakut register [NODE_ID] updater.download.status
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.
@lydia-at-amazon That would work, but: we considered a similar solution where we add a progress field to the response of
uavcan.protocol.ExecuteCommand
. Scott pointed out that an RPC-based solution is considered harmful, so we focused on pub/sub based alternatives. If RPC is acceptable, then I think your current register-based approach is probably the most obvious choice.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.
For maintenance operations, such as software update, we're already using lots of RPC services, so I think it should be ok to use the RPC-based solution.