1
0
forked from fsfw/fsfw

stack size is bytes now

This commit is contained in:
2020-08-08 12:46:06 +02:00
parent 3905b72b08
commit a0f41d3238
6 changed files with 45 additions and 19 deletions

View File

@ -1,10 +1,12 @@
#ifndef FRAMEWORK_OSAL_FREERTOS_PERIODICTASK_H_
#define FRAMEWORK_OSAL_FREERTOS_PERIODICTASK_H_
#include <framework/osal/FreeRTOS/FreeRTOSTaskIF.h>
#include <framework/objectmanager/ObjectManagerIF.h>
#include <framework/tasks/PeriodicTaskIF.h>
#include <framework/tasks/Typedef.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
@ -17,7 +19,7 @@ class ExecutableObjectIF;
* periodic activities of multiple objects.
* @ingroup task_handling
*/
class PeriodicTask: public PeriodicTaskIF {
class PeriodicTask: public PeriodicTaskIF, public FreeRTOSTaskIF {
public:
/**
* Keep in Mind that you need to call before this vTaskStartScheduler()!
@ -38,9 +40,9 @@ public:
* The function pointer to the deadline missed function that shall
* be assigned.
*/
PeriodicTask(const char *name, TaskPriority setPriority,
PeriodicTask(TaskName name, TaskPriority setPriority,
TaskStackSize setStack, TaskPeriod setPeriod,
void (*setDeadlineMissedFunc)());
TaskDeadlineMissedFunction deadlineMissedFunc);
/**
* @brief Currently, the executed object's lifetime is not coupled with
* the task object's lifetime, so the destructor is empty.
@ -63,12 +65,13 @@ public:
* -@c RETURN_OK on success
* -@c RETURN_FAILED if the object could not be added.
*/
ReturnValue_t addComponent(object_id_t object,
bool setTaskIF = true) override;
ReturnValue_t addComponent(object_id_t object) override;
uint32_t getPeriodMs() const override;
ReturnValue_t sleepFor(uint32_t ms) override;
TaskHandle_t getTaskHandle() override;
protected:
bool started;
TaskHandle_t handle;