some tweaks
This commit is contained in:
@ -13,32 +13,30 @@ TaskFactory::~TaskFactory() {
|
||||
TaskFactory* TaskFactory::instance() {
|
||||
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_,
|
||||
TaskPriority taskPriority_, TaskStackSize stackSize_,
|
||||
TaskPeriod period_,
|
||||
TaskDeadlineMissedFunction deadLineMissedFunction_) {
|
||||
return (PeriodicTaskIF*) (new PeriodicTask(name_, taskPriority_, stackSize_,
|
||||
period_, deadLineMissedFunction_));
|
||||
return dynamic_cast<PeriodicTaskIF*>(new PeriodicTask(name_, taskPriority_,
|
||||
stackSize_, period_, deadLineMissedFunction_));
|
||||
}
|
||||
/***
|
||||
|
||||
/**
|
||||
* Keep in Mind that you need to call before this vTaskStartScheduler()!
|
||||
*/
|
||||
FixedTimeslotTaskIF* TaskFactory::createFixedTimeslotTask(TaskName name_,
|
||||
TaskPriority taskPriority_, TaskStackSize stackSize_,
|
||||
TaskPeriod period_,
|
||||
TaskDeadlineMissedFunction deadLineMissedFunction_) {
|
||||
return (FixedTimeslotTaskIF*) (new FixedTimeslotTask(name_, taskPriority_,
|
||||
stackSize_, period_, deadLineMissedFunction_));
|
||||
return dynamic_cast<FixedTimeslotTaskIF*>(new FixedTimeslotTask(name_,
|
||||
taskPriority_,stackSize_, period_, deadLineMissedFunction_));
|
||||
}
|
||||
|
||||
ReturnValue_t TaskFactory::deleteTask(PeriodicTaskIF* task) {
|
||||
if (task == NULL) {
|
||||
if (task == nullptr) {
|
||||
//delete self
|
||||
vTaskDelete(NULL);
|
||||
vTaskDelete(nullptr);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
} else {
|
||||
//TODO not implemented
|
||||
|
Reference in New Issue
Block a user