Add PUS TC scheduler service #594

Merged
muellerr merged 20 commits from KSat/fsfw:mueller/add-tc-scheduler-pus-11 into development 2022-05-16 14:32:20 +02:00
Owner
  • Written by David Woodward (@dwoodward) as part of the SOURCE project
  • Adaptions to make it more generic and compatible to FSFW
  • The size of the TC map is a template argument and therefore needs to either be a template argument or a configuration define. I decided to use a template argument for now. This requires the whole class to be implemented as a template
  • Requires ETL support in the FSFW, provided by #592
  • Update auto-formatter script to also auto-format *.tpp files and re-run script
- Written by David Woodward (@dwoodward) as part of the SOURCE project - Adaptions to make it more generic and compatible to FSFW - The size of the TC map is a template argument and therefore needs to either be a template argument or a configuration define. I decided to use a template argument for now. This requires the whole class to be implemented as a template - Requires ETL support in the FSFW, provided by https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/592 - Update auto-formatter script to also auto-format `*.tpp` files and re-run script
muellerr added this to the v5.0.0 milestone 2022-03-29 15:09:25 +02:00
muellerr added 1 commit 2022-03-29 15:09:32 +02:00
Add TC scheduler service
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
bfa77cf810
- Written by David Woodward as part of the SOURCE project
- Adaptions to make it more generic and compatible to FSFW
muellerr added 1 commit 2022-03-29 15:11:59 +02:00
update afmt scripts to format *.tpp files
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
82fc7f33a8
muellerr added a new dependency 2022-03-29 15:13:35 +02:00
muellerr changed title from Add TC scheduler service to Add PUS TC scheduler service 2022-03-29 15:14:26 +02:00
muellerr requested review from dwoodward 2022-03-29 15:18:08 +02:00
muellerr requested review from mohr 2022-03-29 15:18:39 +02:00
muellerr added 1 commit 2022-04-04 14:19:32 +02:00
Merge branch 'development' into mueller/add-tc-scheduler-pus-11
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
4dee913d51
muellerr added 2 commits 2022-04-11 16:17:09 +02:00
muellerr added 1 commit 2022-04-12 17:11:12 +02:00
Merge remote-tracking branch 'upstream/development' into mueller/add-tc-scheduler-pus-11
Some checks failed
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
35f257800e
muellerr added 1 commit 2022-04-25 15:14:18 +02:00
Merge remote-tracking branch 'upstream/development' into mueller/add-tc-scheduler-pus-11
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
68302e7c5e
muellerr added 1 commit 2022-04-25 15:23:24 +02:00
Merge remote-tracking branch 'upstream/development' into mueller/add-tc-scheduler-pus-11
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
91ef4ff30b
muellerr added 1 commit 2022-04-27 08:45:54 +02:00
Merge remote-tracking branch 'upstream/development' into mueller/add-tc-scheduler-pus-11
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
496bc665d6
gaisser requested changes 2022-05-02 13:11:56 +02:00
gaisser left a comment
Owner

Returncode handling does look a bit weak at the moment. We should think about adding the ability to disable the release of TCs in case of some failures like FLP does.

Returncode handling does look a bit weak at the moment. We should think about adding the ability to disable the release of TCs in case of some failures like FLP does.
@ -0,0 +29,4 @@
* TC[11,8] filter-based activity time-shift
*
* Groups are not supported.
* This service remains always enabled. Sending a disable-request has no effect.
Owner

Disabling the service might be necessary onboard in case of failures.

Disabling the service might be necessary onboard in case of failures.
Author
Owner

Hmm.. I don't have the time to do this right now.. Would it be okay to add that in a second PR, maybe add an issue for it?

Hmm.. I don't have the time to do this right now.. Would it be okay to add that in a second PR, maybe add an issue for it?
Owner

I'm ok with that. Can you add an issue?

I'm ok with that. Can you add an issue?
Author
Owner

Yes

Yes
Author
Owner

issue added: #624

issue added: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/issues/624
Owner

Great thank you!

Great thank you!
gaisser marked this conversation as resolved
@ -0,0 +112,4 @@
uint32_t timestamp = 0;
if (deserializeViaFsfwInterface<uint32_t>(timestamp, data, dataSize) != RETURN_OK) {
return RETURN_FAILED;
Owner

Return the returncode of deSerialize instead of a generic Failed

Return the returncode of deSerialize instead of a generic Failed
gaisser marked this conversation as resolved
@ -0,0 +179,4 @@
// Get request ID
uint64_t requestId;
if (getRequestIdFromData(data, dataSize, requestId) != RETURN_OK) {
return RETURN_FAILED;
Owner

Return returncode from getRequestId

Return returncode from getRequestId
gaisser marked this conversation as resolved
@ -0,0 +249,4 @@
// get the filter window as map range via dedicated method
if (getMapFilterFromData(data, dataSize, itBegin, itEnd) != RETURN_OK) {
return RETURN_FAILED;
Owner

Return returncode from getMapFilter...

Return returncode from getMapFilter...
gaisser marked this conversation as resolved
@ -0,0 +297,4 @@
// Get relative time
uint32_t relativeTime = 0;
if (deserializeViaFsfwInterface<uint32_t>(relativeTime, data, dataSize) != RETURN_OK) {
return RETURN_FAILED;
Owner

Return the returncode of deSerialize instead of a generic Failed

Return the returncode of deSerialize instead of a generic Failed
Author
Owner

done

done
gaisser marked this conversation as resolved
@ -0,0 +300,4 @@
return RETURN_FAILED;
}
if (relativeTime == 0) {
return RETURN_FAILED;
Owner

Returncode

Returncode
Author
Owner

added

added
gaisser marked this conversation as resolved
@ -0,0 +310,4 @@
// Get request ID
uint64_t requestId;
if (getRequestIdFromData(data, dataSize, requestId) != RETURN_OK) {
return RETURN_FAILED;
Owner

Return of returncode from getRequestIdFromData would be better

Return of returncode from getRequestIdFromData would be better
gaisser marked this conversation as resolved
@ -0,0 +345,4 @@
"Service11TelecommandScheduling::doTimeshiftActivity: Either 0 or more than 1 TCs found. "
"No explicit timeshifting possible\n");
#endif
return RETURN_FAILED;
Owner

Better failure Code

Better failure Code
Author
Owner

added

added
gaisser marked this conversation as resolved
@ -0,0 +378,4 @@
// Get relative time
uint32_t relativeTime = 0;
if (deserializeViaFsfwInterface<uint32_t>(relativeTime, data, dataSize) != RETURN_OK) {
return RETURN_FAILED;
Owner

Return the returncode of deSerialize instead of a generic Failed

Return the returncode of deSerialize instead of a generic Failed
gaisser marked this conversation as resolved
@ -0,0 +390,4 @@
TcMapIter itBegin;
TcMapIter itEnd;
if (getMapFilterFromData(data, dataSize, itBegin, itEnd) != RETURN_OK) {
return RETURN_FAILED;
Owner

Return the returncode of getMapFilterFromData instead of a generic Failed

Return the returncode of getMapFilterFromData instead of a generic Failed
gaisser marked this conversation as resolved
@ -0,0 +444,4 @@
uint16_t ssc = 0;
if (deserializeViaFsfwInterface<uint32_t>(srcId, data, dataSize) != RETURN_OK) {
return RETURN_FAILED;
Owner

Return the returncode of deSerialize instead of a generic Failed

Return the returncode of deSerialize instead of a generic Failed
gaisser marked this conversation as resolved
@ -0,0 +450,4 @@
data += sizeof(uint32_t);
dataSize -= sizeof(uint32_t);
if (deserializeViaFsfwInterface<uint16_t>(apid, data, dataSize) != RETURN_OK) {
return RETURN_FAILED;
Owner

Return the returncode of deSerialize instead of a generic Failed

Return the returncode of deSerialize instead of a generic Failed
gaisser marked this conversation as resolved
@ -0,0 +456,4 @@
data += sizeof(uint32_t);
dataSize -= sizeof(uint32_t);
if (deserializeViaFsfwInterface<uint16_t>(ssc, data, dataSize) != RETURN_OK) {
return RETURN_FAILED;
Owner

Return the returncode of deSerialize instead of a generic Failed

Return the returncode of deSerialize instead of a generic Failed
gaisser marked this conversation as resolved
@ -0,0 +569,4 @@
template <size_t MAX_NUM_TCS>
template <typename T>
inline ReturnValue_t Service11TelecommandScheduling<MAX_NUM_TCS>::deserializeViaFsfwInterface(
Owner

Is this extra Wrapper even necessary?

Is this extra Wrapper even necessary?
Author
Owner

wrapper removed, nullptr checked moved up top and SerializeAdapter::deSerialize called directly now.

wrapper removed, nullptr checked moved up top and `SerializeAdapter::deSerialize` called directly now.
gaisser marked this conversation as resolved
muellerr added 1 commit 2022-05-12 15:52:54 +02:00
muellerr added 1 commit 2022-05-12 16:56:14 +02:00
lot of refactoring
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
c4c340fde1
muellerr added 1 commit 2022-05-12 16:59:04 +02:00
Author
Owner

I refactored some things and also improved the returncode handling. I will add the disable subservice and some unittests in a separate PR because there is not a lot of time for this right now..

I refactored some things and also improved the returncode handling. I will add the disable subservice and some unittests in a separate PR because there is not a lot of time for this right now..
muellerr added 2 commits 2022-05-12 17:06:19 +02:00
muellerr added 1 commit 2022-05-13 00:30:10 +02:00
muellerr added 1 commit 2022-05-13 00:30:25 +02:00
Merge remote-tracking branch 'upstream/development' into mueller/add-tc-scheduler-pus-11
Some checks failed
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
861335212e
gaisser approved these changes 2022-05-13 11:40:52 +02:00
gaisser left a comment
Owner

LGTM

LGTM
muellerr added 2 commits 2022-05-13 11:58:54 +02:00
muellerr added 1 commit 2022-05-13 13:24:31 +02:00
Merge remote-tracking branch 'upstream/development' into mueller/add-tc-scheduler-pus-11
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
52310f7d32
muellerr added 1 commit 2022-05-16 14:29:06 +02:00
Merge branch 'development' into mueller/add-tc-scheduler-pus-11
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
878e32cbe8
muellerr merged commit b8fd2db434 into development 2022-05-16 14:32:20 +02:00
muellerr deleted branch mueller/add-tc-scheduler-pus-11 2022-05-16 14:32:20 +02:00
Sign in to join this conversation.
No description provided.