remove static missed deadline

This commit is contained in:
Robin Müller 2022-06-13 14:23:56 +02:00
parent a0ee86ace8
commit a682bbe400
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
6 changed files with 1 additions and 66 deletions

View File

@ -2,8 +2,6 @@
#include "fsfw/serviceinterface.h"
uint32_t FixedTimeslotTask::MISSED_DEADLINE_COUNT = 0;
const size_t PeriodicTaskIF::MINIMUM_STACK_SIZE = configMINIMAL_STACK_SIZE;
FixedTimeslotTask::FixedTimeslotTask(TaskName name, TaskPriority setPriority,
@ -42,16 +40,6 @@ void FixedTimeslotTask::taskEntryPoint(void* argument) {
#endif
}
void FixedTimeslotTask::missedDeadlineCounter() {
FixedTimeslotTask::MISSED_DEADLINE_COUNT++;
if (FixedTimeslotTask::MISSED_DEADLINE_COUNT % 10 == 0) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PST missed " << FixedTimeslotTask::MISSED_DEADLINE_COUNT << " deadlines"
<< std::endl;
#endif
}
}
ReturnValue_t FixedTimeslotTask::startTask() {
started = true;

View File

@ -35,16 +35,6 @@ class FixedTimeslotTask : public FixedTimeslotTaskBase, public FreeRTOSTaskIF {
~FixedTimeslotTask() override;
ReturnValue_t startTask() override;
/**
* This static function can be used as #deadlineMissedFunc.
* It counts missedDeadlines and prints the number of missed deadlines
* every 10th time.
*/
static void missedDeadlineCounter();
/**
* A helper variable to count missed deadlines.
*/
static uint32_t MISSED_DEADLINE_COUNT;
ReturnValue_t sleepFor(uint32_t ms) override;

View File

@ -4,7 +4,6 @@
#include "fsfw/serviceinterface/ServiceInterface.h"
uint32_t FixedTimeslotTask::deadlineMissedCount = 0;
const size_t PeriodicTaskIF::MINIMUM_STACK_SIZE = PTHREAD_STACK_MIN;
FixedTimeslotTask::FixedTimeslotTask(const char* name_, TaskPriority priority_, size_t stackSize_,
@ -62,13 +61,3 @@ ReturnValue_t FixedTimeslotTask::sleepFor(uint32_t ms) {
pollingSeqTable.executeAndAdvance();
}
}
void FixedTimeslotTask::missedDeadlineCounter() {
FixedTimeslotTask::deadlineMissedCount++;
if (FixedTimeslotTask::deadlineMissedCount % 10 == 0) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PST missed " << FixedTimeslotTask::deadlineMissedCount << " deadlines."
<< std::endl;
#endif
}
}

View File

@ -30,17 +30,6 @@ class FixedTimeslotTask : public FixedTimeslotTaskBase {
ReturnValue_t sleepFor(uint32_t ms) override;
/**
* This static function can be used as #deadlineMissedFunc.
* It counts missedDeadlines and prints the number of missed deadlines every 10th time.
*/
static void missedDeadlineCounter();
/**
* A helper variable to count missed deadlines.
*/
static uint32_t deadlineMissedCount;
protected:
/**
* @brief This function holds the main functionality of the thread.

View File

@ -15,8 +15,6 @@
#include <cstddef>
uint32_t FixedTimeslotTask::deadlineMissedCount = 0;
FixedTimeslotTask::FixedTimeslotTask(const char *name, rtems_task_priority setPriority,
size_t setStack, TaskPeriod setOverallPeriod,
TaskDeadlineMissedFunction dlmFunc_)
@ -38,16 +36,6 @@ rtems_task FixedTimeslotTask::taskEntryPoint(rtems_task_argument argument) {
#endif
}
void FixedTimeslotTask::missedDeadlineCounter() {
FixedTimeslotTask::deadlineMissedCount++;
if (FixedTimeslotTask::deadlineMissedCount % 10 == 0) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PST missed " << FixedTimeslotTask::deadlineMissedCount << " deadlines."
<< std::endl;
#endif
}
}
ReturnValue_t FixedTimeslotTask::startTask() {
rtems_status_code status =
rtems_task_start(id, FixedTimeslotTask::taskEntryPoint, rtems_task_argument((void *)this));

View File

@ -27,16 +27,7 @@ class FixedTimeslotTask : public FixedTimeslotTaskBase, public RTEMSTaskBase {
*/
~FixedTimeslotTask() override;
ReturnValue_t startTask() override;
/**
* This static function can be used as #deadlineMissedFunc.
* It counts missedDeadlines and prints the number of missed deadlines every 10th time.
*/
static void missedDeadlineCounter();
/**
* A helper variable to count missed deadlines.
*/
static uint32_t deadlineMissedCount;
ReturnValue_t startTask(void);
ReturnValue_t sleepFor(uint32_t ms) override;