new returnvalues, RETURN_FAILED is 0xFFFF now #120
No reviewers
Labels
No Label
API Change
Breaking API Change
bug
build
cosmetics
Documentation
duplicate
feature
help wanted
hotfix
invalid
question
Refactor
Tests
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#120
Loading…
Reference in New Issue
No description provided.
Delete Branch "KSat/fsfw:mueller_returnvalues"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Include guard updated
I am not sure if you went for 0xffff exactly or for an integer of all ones. If the latter, I suggest using -1 as the initializer, which will produce all ones, regardless of the size of the datatype. That would make the definition more robust against redefinition of
ReturnValue_t
. The point of typedef'ingReturnValue_t
instead of usinguint16_t
directly is to be able to change the underlying datatype later on.Will implement that.
And two more thoughts:
The
MAKE_RETURN_CODE
macro defines the upper Byte to be the interface ID. HavingRETURN_FAILED
be -1 moves into the -1 interface ID whileRETURN_OK
is still in the default 0 interface ID.Why do we need to change the numeric value of
RETURN_FAILED
? As far as I am concerned, the actual value is used only at this one point, where it is defined. When parsing the TM on ground, the same approach should be used having it defined once and then never use the numeric value again.When defining the current values,
RETURN_OK
was decided to be 0, so one can easier spot if something is wrong (ie != 0x0000) in raw TM, but that is about as far as I would go in tailoring the numeric values.This is something I found in the ISIS drivers:
They used the all-one value for true though..
I added a static makeReturnCode function inside the interface as well, similar to the makeEvent function for events.
RETURN_FAILED remains 1. That change was rather esoteric.