-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add new Svc::ComRetry component #4367
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
base: devel
Are you sure you want to change the base?
Conversation
Add new component that can be used by other components to resend a message on failure.
|
Hi. Apologies, it took much longer to draft this change. A lot has to be refined and the tests have not been added. I had a few questions and I thought I would get them clarified before continuing.
this->m_buffer = bufferI was initially thinking of using Should
else {
this->dataReturnOut_out(0, this->m_buffer, this->m_context);
this->m_retry_count = 0;
Fw::Success condition = Fw::Success::FAILURE;
this->comStatusOut_out(0, condition);
}Based on this comment:
|
LeStarch
left a comment
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.
Minor changes, but this is what I was expecting.
| void ComRetry ::comStatusIn_handler(FwIndexType portNum, Fw::Success& condition) { | ||
| // TODO: Check if m_buffer is valid before attempting delivery | ||
| if (condition == Fw::Success::SUCCESS) { | ||
| this->dataReturnOut_out(0, this->m_buffer, this->m_context); |
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.
Should reset retry_count in the success case too.
| @@ -0,0 +1,14 @@ | |||
| module Svc { | |||
| @ A component for retrying message delivery on failure | |||
| active component ComRetry { | |||
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.
This need not be active. Make it passive
| active component ComRetry { | ||
| import Svc.Framer | ||
|
|
||
| # One async command/port is required for active components |
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.
Remove the comments and below.
|
First, you are storing things as I would expect. No need to do more. Second, your validity check isn't necessary either, as this component doesn't alter the validity. To answer your enumerated questions:
|
Hi. Thank you for the answers. Regarding the validity check, I was thinking that would take care of the case when |
Add new component that can be used by other components to resend a message on failure.
Change Description
Add a new component -
ComRetry.Rationale
Other components such as
ComQueuecan be connected toComRetryto resend a message on failure.Testing/Review Recommendations
Future Work
[ ] Add tests
[ ] Add CMakeLists.txt
[ ] Add docs
AI Usage (see policy)
NA