Version Getter Function #575
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#575
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "eive/fsfw:mueller/version-getter-upstream"
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?
@ -0,0 +8,4 @@
struct Version {
uint32_t major = 0;
uint32_t minor = 0;
uint32_t revision = 0;
Can you changed that to the next milestone 5.0.0?
AH, you want the struct default value to be the current version? Then it might sense to initialize these values to the preprocessor define values right aways.. which would make the geztter function kind of obsolete..
Good point :)
Still I am with Steffen on this one. How about making the
Version
members evenstatic const
. I think the basic task was to make the Version accessible in a native C way, whichfsfw::Version:major
in my view is.Instead of a getter, I would propose to add operators
>
==
<
<=
>=
for Version, to allow doing something with the information, likeNB My example would need a non static const Variant of the class, maybe someone finds a more clever version.
Implemented extended
Version
class and constFSFW_VERSION
class.WIP, TODO:
<<
operator to print<Major>.<Minor>.<Revision>.
Version Getter Functionto WIP: Version Getter Function@ -0,0 +28,4 @@
friend bool operator<=(const Version& v1, const Version& v2) { return ((v1 == v2) or (v1 < v2)); }
friend bool operator>=(const Version& v1, const Version& v2) { return ((v1 == v2) or (v1 > v2)); }
};
If I am not mistaken,
>=
equalsnot <
and>
equalsnot(==) and not(<)
Also, +1 for the
<<
operatorDone. Added C-style
getVersion
as well.WIP: Version Getter Functionto Version Getter FunctionVersion Getter Functionto WIP: Version Getter FunctionWIP: Version Getter Functionto Version Getter FunctionVersion Getter Functionto WIP: Version Getter FunctionWIP: Version Getter Functionto Version Getter FunctionLGTM