WIP: somethings wrong.. #19
@ -13,10 +13,7 @@ TaskFactory::~TaskFactory() {
|
|||||||
TaskFactory* TaskFactory::instance() {
|
TaskFactory* TaskFactory::instance() {
|
||||||
return TaskFactory::factoryInstance;
|
return TaskFactory::factoryInstance;
|
||||||
}
|
}
|
||||||
/***
|
|
||||||
* Keep in Mind that you need to call before this vTaskStartScheduler()!
|
|
||||||
* High taskPriority_ number means high priority.
|
|
||||||
*/
|
|
||||||
PeriodicTaskIF* TaskFactory::createPeriodicTask(TaskName name_,
|
PeriodicTaskIF* TaskFactory::createPeriodicTask(TaskName name_,
|
||||||
TaskPriority taskPriority_, TaskStackSize stackSize_,
|
TaskPriority taskPriority_, TaskStackSize stackSize_,
|
||||||
TaskPeriod period_,
|
TaskPeriod period_,
|
||||||
@ -24,7 +21,8 @@ PeriodicTaskIF* TaskFactory::createPeriodicTask(TaskName name_,
|
|||||||
return (PeriodicTaskIF*) (new PeriodicTask(name_, taskPriority_, stackSize_,
|
return (PeriodicTaskIF*) (new PeriodicTask(name_, taskPriority_, stackSize_,
|
||||||
period_, deadLineMissedFunction_));
|
period_, deadLineMissedFunction_));
|
||||||
}
|
}
|
||||||
/***
|
|
||||||
|
/**
|
||||||
* Keep in Mind that you need to call before this vTaskStartScheduler()!
|
* Keep in Mind that you need to call before this vTaskStartScheduler()!
|
||||||
*/
|
*/
|
||||||
FixedTimeslotTaskIF* TaskFactory::createFixedTimeslotTask(TaskName name_,
|
FixedTimeslotTaskIF* TaskFactory::createFixedTimeslotTask(TaskName name_,
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
/**
|
|
||||||
* @file TaskManagement.cpp
|
|
||||||
*
|
|
||||||
* @date 26.02.2020
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#include <framework/osal/FreeRTOS/TaskManagement.h>
|
#include <framework/osal/FreeRTOS/TaskManagement.h>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
/**
|
|
||||||
* @file TaskManagement.h
|
|
||||||
*
|
|
||||||
* @date 26.02.2020
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef FRAMEWORK_OSAL_FREERTOS_TASKMANAGEMENT_H_
|
#ifndef FRAMEWORK_OSAL_FREERTOS_TASKMANAGEMENT_H_
|
||||||
#define FRAMEWORK_OSAL_FREERTOS_TASKMANAGEMENT_H_
|
#define FRAMEWORK_OSAL_FREERTOS_TASKMANAGEMENT_H_
|
||||||
|
|
||||||
|
// maybe this can be part of the TaskFactory.cpp
|
||||||
/**
|
/**
|
||||||
* Architecture dependant portmacro.h function call.
|
* Architecture dependant portmacro.h function call.
|
||||||
* Should be implemented in bsp.
|
* Should be implemented in bsp.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef FRAMEWORK_TASKS_TASKFACTORY_H_
|
#ifndef FRAMEWORK_TASKS_TASKFACTORY_H_
|
||||||
#define FRAMEWORK_TASKS_TASKFACTORY_H_
|
#define FRAMEWORK_TASKS_TASKFACTORY_H_
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
#include <framework/tasks/FixedTimeslotTaskIF.h>
|
#include <framework/tasks/FixedTimeslotTaskIF.h>
|
||||||
#include <framework/tasks/Typedef.h>
|
#include <framework/tasks/Typedef.h>
|
||||||
|
|
||||||
@ -19,13 +19,16 @@ public:
|
|||||||
static TaskFactory* instance();
|
static TaskFactory* instance();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new periodic task and returns the interface pointer.
|
* Keep in Mind that you need to call before this vTaskStartScheduler()!
|
||||||
* @param name_ Name of the task
|
* A lot of task parameters are set in "FreeRTOSConfig.h".
|
||||||
* @param taskPriority_ Priority of the task
|
* @param name_ Name of the task, lenght limited by configMAX_TASK_NAME_LEN
|
||||||
* @param stackSize_ Stack Size of the task
|
* @param taskPriority_ Number of priorities specified by
|
||||||
* @param period_ Period of the task
|
* configMAX_PRIORITIES. High taskPriority_ number means high priority.
|
||||||
* @param deadLineMissedFunction_ Function to be called if a deadline was missed
|
* @param stackSize_ Stack size in words (not bytes!).
|
||||||
* @return PeriodicTaskIF* Pointer to the newly created Task
|
* Lower limit specified by configMINIMAL_STACK_SIZE
|
||||||
|
* @param period_ Period in seconds.
|
||||||
|
* @param deadLineMissedFunction_ Callback if a deadline was missed.
|
||||||
|
* @return Pointer to the newly created task.
|
||||||
*/
|
*/
|
||||||
PeriodicTaskIF* createPeriodicTask(TaskName name_,
|
PeriodicTaskIF* createPeriodicTask(TaskName name_,
|
||||||
TaskPriority taskPriority_, TaskStackSize stackSize_,
|
TaskPriority taskPriority_, TaskStackSize stackSize_,
|
||||||
@ -33,13 +36,16 @@ public:
|
|||||||
TaskDeadlineMissedFunction deadLineMissedFunction_);
|
TaskDeadlineMissedFunction deadLineMissedFunction_);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Keep in Mind that you need to call before this vTaskStartScheduler()!
|
||||||
* @param name_ Name of the task
|
* A lot of task parameters are set in "FreeRTOSConfig.h".
|
||||||
* @param taskPriority_ Priority of the task
|
* @param name_ Name of the task, lenght limited by configMAX_TASK_NAME_LEN
|
||||||
* @param stackSize_ Stack Size of the task
|
* @param taskPriority_ Number of priorities specified by
|
||||||
* @param period_ Period of the task
|
* configMAX_PRIORITIES. High taskPriority_ number means high priority.
|
||||||
* @param deadLineMissedFunction_ Function to be called if a deadline was missed
|
* @param stackSize_ Stack size in words (not bytes!).
|
||||||
* @return FixedTimeslotTaskIF* Pointer to the newly created Task
|
* Lower limit specified by configMINIMAL_STACK_SIZE
|
||||||
|
* @param period_ Period in seconds.
|
||||||
|
* @param deadLineMissedFunction_ Callback if a deadline was missed.
|
||||||
|
* @return Pointer to the newly created task.
|
||||||
*/
|
*/
|
||||||
FixedTimeslotTaskIF* createFixedTimeslotTask(TaskName name_,
|
FixedTimeslotTaskIF* createFixedTimeslotTask(TaskName name_,
|
||||||
TaskPriority taskPriority_, TaskStackSize stackSize_,
|
TaskPriority taskPriority_, TaskStackSize stackSize_,
|
||||||
@ -48,7 +54,8 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to be called to delete a task
|
* Function to be called to delete a task
|
||||||
* @param task The pointer to the task that shall be deleted, NULL specifies current Task
|
* @param task The pointer to the task that shall be deleted,
|
||||||
|
* NULL specifies current Task
|
||||||
* @return Success of deletion
|
* @return Success of deletion
|
||||||
*/
|
*/
|
||||||
static ReturnValue_t deleteTask(PeriodicTaskIF* task = NULL);
|
static ReturnValue_t deleteTask(PeriodicTaskIF* task = NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user