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
fsfw/fsfw/pipeline/pr-development This commit looks good Details
bfa77cf810
Add TC scheduler service
- 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
fsfw/fsfw/pipeline/pr-development This commit looks good Details
82fc7f33a8
update afmt scripts to format *.tpp files
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
fsfw/fsfw/pipeline/pr-development This commit looks good Details
4dee913d51
Merge branch 'development' into mueller/add-tc-scheduler-pus-11
muellerr added 2 commits 2022-04-11 16:17:09 +02:00
muellerr added 1 commit 2022-04-12 17:11:12 +02:00
fsfw/fsfw/pipeline/pr-development There was a failure building this commit Details
35f257800e
Merge remote-tracking branch 'upstream/development' into mueller/add-tc-scheduler-pus-11
muellerr added 1 commit 2022-04-25 15:14:18 +02:00
muellerr added 1 commit 2022-04-25 15:23:24 +02:00
muellerr added 1 commit 2022-04-27 08:45:54 +02:00
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
fsfw/fsfw/pipeline/pr-development This commit looks good Details
c4c340fde1
lot of refactoring
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
fsfw/fsfw/pipeline/pr-development There was a failure building this commit Details
861335212e
Merge remote-tracking branch 'upstream/development' into mueller/add-tc-scheduler-pus-11
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
muellerr added 1 commit 2022-05-16 14:29:06 +02:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
878e32cbe8
Merge branch 'development' into mueller/add-tc-scheduler-pus-11
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.