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
New service: allow retrieving information about active alarms and/or errors #182
base: main
Are you sure you want to change the base?
New service: allow retrieving information about active alarms and/or errors #182
Changes from all commits
c81128d
7191c16
99e11c9
f2ad2d0
89515c5
8f307ac
3789197
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.
Where'd the 50 come from?
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.
Tbh I don't remember (it's been a while).
Easy to change of course, so if we can come up with a more appropriate max length, we'll use that.
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.
@ted-miller: any preference for a default/initial length of the
result_message
field?Longest
result_message
is 47 chars (here), so I suggest we set this to 64.Default value for max string capacity is 20, so that would not be sufficient.
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 have no preference. 64 is fine with me
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 think the
-1
is ok (maybe replace withERROR
), but I do think this string should be more descriptiveThere 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.
The
TODO
was mostly a reminder we need to come up with some nice(r) way to deal with return codes. Both here and in other cases.I could make them part of the
.srv
definition, but wasn't sure that was the best way to go about it.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.
And I'd probably like to define more meaningful error codes, to facilitate automated handling of errors (otherwise clients just see
-1
and would have to interpret theresult_message
).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've defined a couple of result codes and messages (here). Still need to test them.
I opted to make them part of the response message instead of creating a separate
.msg
file for them as they are completely tied to this service implementation.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.
coming back to this:
this is not a good idea, as it means the
.srv
definition would have to be updated to change or add result codes and strings. This changes the msg hash on Iron and later, which would cause compatibility issues even if none of the actual message fields change.I'll create a dedicated result codes
.msg
, similar to what we have for other services.