WIP: refactor periodic HK helpers #37

Closed
muellerr wants to merge 1 commits from refactor-periodic-hk-helpers into main
Owner

Little helpers is what we need, not over-engineered managers..

Little helpers is what we need, not over-engineered managers..
muellerr added 1 commit 2024-11-04 17:34:04 +01:00
muellerr added 1 commit 2024-11-05 17:03:18 +01:00
muellerr added 2 commits 2024-11-05 17:34:17 +01:00
muellerr added 1 commit 2024-11-05 17:40:51 +01:00
muellerr added 1 commit 2024-11-06 14:19:01 +01:00
muellerr added 1 commit 2024-11-06 16:55:15 +01:00
muellerr added 1 commit 2024-11-07 12:26:26 +01:00
muellerr added 1 commit 2024-11-07 13:18:54 +01:00
muellerr added 1 commit 2024-11-07 13:32:16 +01:00
muellerr added 1 commit 2024-11-07 15:45:40 +01:00
muellerr added 1 commit 2024-11-07 15:53:07 +01:00
muellerr added 1 commit 2024-11-08 18:41:36 +01:00
muellerr added 1 commit 2024-11-11 12:13:10 +01:00
muellerr added 2 commits 2024-11-12 15:06:13 +01:00
muellerr added 1 commit 2024-11-13 11:45:58 +01:00
muellerr added 1 commit 2024-11-13 14:12:45 +01:00
muellerr added 1 commit 2024-11-13 14:31:16 +01:00
muellerr added 1 commit 2024-11-13 17:30:44 +01:00
muellerr force-pushed refactor-periodic-hk-helpers from 66555301fa to d2271e8185 2024-11-13 17:42:45 +01:00 Compare
muellerr force-pushed refactor-periodic-hk-helpers from d2271e8185 to f68653ba28 2024-11-13 17:43:16 +01:00 Compare
muellerr added 1 commit 2024-11-13 17:59:42 +01:00
muellerr force-pushed refactor-periodic-hk-helpers from 40cf39721f to 97e92c0dd2 2024-11-13 17:59:55 +01:00 Compare
muellerr added 1 commit 2024-11-14 17:23:38 +01:00
muellerr added 1 commit 2024-11-15 10:50:29 +01:00
muellerr force-pushed refactor-periodic-hk-helpers from 55e1e0b05c to bb95797073 2024-11-15 10:57:00 +01:00 Compare
muellerr added 1 commit 2024-11-15 16:28:35 +01:00
muellerr force-pushed refactor-periodic-hk-helpers from e660cfad72 to fd89c33aae 2024-11-15 16:28:52 +01:00 Compare
muellerr added 1 commit 2024-12-03 15:23:20 +01:00
First-time contributor

removing valid flags is a straight up terrible idea. This PR breaks how operations works. Having to implement valid flags yourself makes it even worse, as OPS cannot be sure whether there is a vaild flag for TM or not, because it was left up to the developer. I don't even see the advantage, as this looks like you need more code now than before.
This PR should not be merged!

removing valid flags is a straight up terrible idea. This PR breaks how operations works. Having to implement valid flags yourself makes it even worse, as OPS cannot be sure whether there is a vaild flag for TM or not, because it was left up to the developer. I don't even see the advantage, as this looks like you need more code now than before. This PR should not be merged!
Author
Owner

I could add back the valid flag for the whole set, as this is the one that is required the majority of times. I am not going to add back the valid flag for individual pool entries. It breaks the simplest case where someone just wants to download some arbitrary blob of data as downlink HK. If someone requires en explicit valid flag on an individual field, that is an explicit requirement which should be explicitly encoded, and I don't see a problem of doing that via an additional field. If someone does not know that set.valid = true is a thing that should be done, they'll probably not write set.setValid() as well.

If the validity of the whole set is added back, it should be serialized somewhere, and that probably would be some u8 field before the data blob. There is the additional detail of whether the HK helper does this, because the HK helper does not have a concept of validities anymore. It does the one thing that it is supposed to do, and nothing more: Track and execute periodic generation of arbitrary data blobs specified by the user. It transfers the serialization task itself to the user, but it does not currently know how the data looks and whether it is valid. Adding an explicit u8 valid field in the set itself solves this as well, because the serialization call will automatically serialize the valid field as well.

I disagree with more code being a problem. It's one small line of code (the additonal valid field). This does not break OPS either. Whats the difference between a set of all false valid flags ignored by the developer, or a set where the valid field is still missing? Both require a SW update / patch. This is something that can be solved via documentation and/or teaching basic OPS aspects to the developers..

If you think this is something that should not be merged, I'd also like to hear improvement suggestions, because I still think this PR removes unused and over-engineered cruft. Furthermore, the incraesed flexbility / lower requirements to the data format enables moving to serialization formats like protobuf. The removal of the valid flags is controversial, but I was never happy about those weird bitfields at then end of the HK data blob either. Oftentimes, we either forgot deserializing them, and even if we deserialize them, the valid bits still need to be mapped to the set values, which is not explicit either, it needs to be implicitely known how many values the set has.

This PR is all about enforcing the KISS principle and getting rid of unnecessary complexity from the basic building blocks used. If the small price is adding a few fields (which I already have done for all SOURCE datasets), it's a price I am willing to pay.

I could add back the valid flag for the whole set, as this is the one that is required the majority of times. I am not going to add back the valid flag for individual pool entries. It breaks the simplest case where someone just wants to download some arbitrary blob of data as downlink HK. If someone requires en explicit valid flag on an individual field, that is an explicit requirement which should be explicitly encoded, and I don't see a problem of doing that via an additional field. If someone does not know that `set.valid = true` is a thing that should be done, they'll probably not write `set.setValid()` as well. If the validity of the whole set is added back, it should be serialized somewhere, and that probably would be some u8 field before the data blob. There is the additional detail of whether the HK helper does this, because the HK helper does not have a concept of validities anymore. It does the one thing that it is supposed to do, and nothing more: Track and execute periodic generation of arbitrary data blobs specified by the user. It transfers the serialization task itself to the user, but it does not currently know how the data looks and whether it is valid. Adding an explicit u8 valid field in the set itself solves this as well, because the serialization call will automatically serialize the valid field as well. I disagree with more code being a problem. It's one small line of code (the additonal valid field). This does not break OPS either. Whats the difference between a set of all false valid flags ignored by the developer, or a set where the valid field is still missing? Both require a SW update / patch. This is something that can be solved via documentation and/or teaching basic OPS aspects to the developers.. If you think this is something that should not be merged, I'd also like to hear improvement suggestions, because I still think this PR removes unused and over-engineered cruft. Furthermore, the incraesed flexbility / lower requirements to the data format enables moving to serialization formats like `protobuf`. The removal of the valid flags is controversial, but I was never happy about those weird bitfields at then end of the HK data blob either. Oftentimes, we either forgot deserializing them, and even if we deserialize them, the valid bits still need to be mapped to the set values, which is not explicit either, it needs to be implicitely known how many values the set has. This PR is all about enforcing the [KISS](https://en.wikipedia.org/wiki/KISS_principle) principle and getting rid of unnecessary complexity from the basic building blocks used. If the small price is adding a few fields (which I already have done for all SOURCE datasets), it's a price I am willing to pay.
muellerr added 1 commit 2024-12-09 15:29:36 +01:00
muellerr added 1 commit 2024-12-09 16:55:04 +01:00
muellerr added 1 commit 2024-12-09 17:05:02 +01:00
Author
Owner

The validity state and the validity blobs can now be used again by exposing additional appropriate API for the shared sets again, or by using new dedicated HK specific types and APIs for non-shared sets again.

The validity state and the validity blobs can now be used again by exposing additional appropriate API for the shared sets again, or by using new dedicated HK specific types and APIs for non-shared sets again.
muellerr added 1 commit 2024-12-09 17:17:47 +01:00
muellerr added 1 commit 2024-12-09 17:23:28 +01:00
muellerr force-pushed refactor-periodic-hk-helpers from cef9291737 to c3898b3928 2024-12-09 17:24:23 +01:00 Compare
muellerr added 1 commit 2024-12-10 10:33:23 +01:00
Author
Owner

Summary of the most important changes:

  • The local HK manager was replaced by a periodic HK helper which has reduced responsibilities. It takes care of tracking the HK generation using a set specification provided by the user. However, it leaves serialization of the HK data completely to the developer. This removes a major constraint on the format of the HK data, which was previously constrained to implementors of a certain base class.
  • The former set classes and pool objects are still available for HK set specification and generation. The API has changed, but the general usage and their architecture has not.
  • A new set of set classes and helper objects to specify HK sets and data which does not need to be shared was added as well. The majority of datasets do not need to be shared anyway.
  • The non-shared API retain the capability of appending of a validity blob for each piece of set data at the end of the HK data. For both non-shared and shared data, this capability is specified in the constructor.
Summary of the most important changes: - The local HK manager was replaced by a periodic HK helper which has reduced responsibilities. It takes care of tracking the HK generation using a set specification provided by the user. However, it leaves serialization of the HK data completely to the developer. This removes a major constraint on the format of the HK data, which was previously constrained to implementors of a certain base class. - The former set classes and pool objects are still available for HK set specification and generation. The API has changed, but the general usage and their architecture has not. - A new set of set classes and helper objects to specify HK sets and data which does not need to be shared was added as well. The majority of datasets do not need to be shared anyway. - The non-shared API retain the capability of appending of a validity blob for each piece of set data at the end of the HK data. For both non-shared and shared data, this capability is specified in the constructor.
muellerr added 1 commit 2024-12-12 16:00:28 +01:00
muellerr force-pushed refactor-periodic-hk-helpers from 6bafafddd6 to a46a66c35a 2024-12-12 16:15:52 +01:00 Compare
Author
Owner

replaced by #45

replaced by https://egit.irs.uni-stuttgart.de/KSat/fsfw/pulls/45
muellerr closed this pull request 2024-12-12 16:22:43 +01:00

Pull request closed

Sign in to join this conversation.
No description provided.