refactored throttle handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
2023-10-13 10:57:58 +02:00
parent 031be000d4
commit 9f600a24ff
6 changed files with 37 additions and 21 deletions

View File

@ -39,6 +39,10 @@ class LiveTmTask : public SystemObject,
CfdpTmFunnel& cfdpFunnel;
VirtualChannel& channel;
const std::atomic_bool& ptmeLocked;
// This countdown ensures that the CFDP is always throttled with a minimum period. Only after
// this period, the CFDP can be released if the channel is not busy.
Countdown minimumPeriodThrottleCd = Countdown(40);
bool throttlePeriodOngoing = false;
void readCommandQueue(void);
@ -56,6 +60,8 @@ class LiveTmTask : public SystemObject,
void startTransition(Mode_t mode, Submode_t submode) override;
void announceMode(bool recursive) override;
void throttleCfdp();
void releaseCfdp();
object_id_t getObjectId() const override;
const HasHealthIF* getOptHealthIF() const override;