Add PUS TC scheduler service #594
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.
Depends on
#592 Add ETL dependency
fsfw/fsfw
Reference: fsfw/fsfw#594
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "KSat/fsfw:mueller/add-tc-scheduler-pus-11"
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?
*.tpp
files and re-run scriptAdd TC scheduler serviceto Add PUS TC scheduler serviceReturncode 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.
Disabling the service might be necessary onboard in case of failures.
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?
I'm ok with that. Can you add an issue?
Yes
issue added: #624
Great thank you!
@ -0,0 +112,4 @@
uint32_t timestamp = 0;
if (deserializeViaFsfwInterface<uint32_t>(timestamp, data, dataSize) != RETURN_OK) {
return RETURN_FAILED;
Return the returncode of deSerialize instead of a generic Failed
@ -0,0 +179,4 @@
// Get request ID
uint64_t requestId;
if (getRequestIdFromData(data, dataSize, requestId) != RETURN_OK) {
return RETURN_FAILED;
Return returncode from getRequestId
@ -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;
Return returncode from getMapFilter...
@ -0,0 +297,4 @@
// Get relative time
uint32_t relativeTime = 0;
if (deserializeViaFsfwInterface<uint32_t>(relativeTime, data, dataSize) != RETURN_OK) {
return RETURN_FAILED;
Return the returncode of deSerialize instead of a generic Failed
done
@ -0,0 +300,4 @@
return RETURN_FAILED;
}
if (relativeTime == 0) {
return RETURN_FAILED;
Returncode
added
@ -0,0 +310,4 @@
// Get request ID
uint64_t requestId;
if (getRequestIdFromData(data, dataSize, requestId) != RETURN_OK) {
return RETURN_FAILED;
Return of returncode from getRequestIdFromData would be better
@ -0,0 +345,4 @@
"Service11TelecommandScheduling::doTimeshiftActivity: Either 0 or more than 1 TCs found. "
"No explicit timeshifting possible\n");
#endif
return RETURN_FAILED;
Better failure Code
added
@ -0,0 +378,4 @@
// Get relative time
uint32_t relativeTime = 0;
if (deserializeViaFsfwInterface<uint32_t>(relativeTime, data, dataSize) != RETURN_OK) {
return RETURN_FAILED;
Return the returncode of deSerialize instead of a generic Failed
@ -0,0 +390,4 @@
TcMapIter itBegin;
TcMapIter itEnd;
if (getMapFilterFromData(data, dataSize, itBegin, itEnd) != RETURN_OK) {
return RETURN_FAILED;
Return the returncode of getMapFilterFromData instead of a generic Failed
@ -0,0 +444,4 @@
uint16_t ssc = 0;
if (deserializeViaFsfwInterface<uint32_t>(srcId, data, dataSize) != RETURN_OK) {
return RETURN_FAILED;
Return the returncode of deSerialize instead of a generic Failed
@ -0,0 +450,4 @@
data += sizeof(uint32_t);
dataSize -= sizeof(uint32_t);
if (deserializeViaFsfwInterface<uint16_t>(apid, data, dataSize) != RETURN_OK) {
return RETURN_FAILED;
Return the returncode of deSerialize instead of a generic Failed
@ -0,0 +456,4 @@
data += sizeof(uint32_t);
dataSize -= sizeof(uint32_t);
if (deserializeViaFsfwInterface<uint16_t>(ssc, data, dataSize) != RETURN_OK) {
return RETURN_FAILED;
Return the returncode of deSerialize instead of a generic Failed
@ -0,0 +569,4 @@
template <size_t MAX_NUM_TCS>
template <typename T>
inline ReturnValue_t Service11TelecommandScheduling<MAX_NUM_TCS>::deserializeViaFsfwInterface(
Is this extra Wrapper even necessary?
wrapper removed, nullptr checked moved up top and
SerializeAdapter::deSerialize
called directly 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..
LGTM