Allow creating regular threads #140
@ -20,16 +20,18 @@ TaskFactory::~TaskFactory() = default;
|
|||||||
|
|
||||||
TaskFactory* TaskFactory::instance() { return TaskFactory::factoryInstance; }
|
TaskFactory* TaskFactory::instance() { return TaskFactory::factoryInstance; }
|
||||||
|
|
||||||
PeriodicTaskIF* TaskFactory::createPeriodicTask(
|
PeriodicTaskIF* TaskFactory::createPeriodicTask(TaskName name_, TaskPriority taskPriority_,
|
||||||
TaskName name_, TaskPriority taskPriority_, TaskStackSize stackSize_,
|
TaskStackSize stackSize_,
|
||||||
TaskPeriod periodInSeconds_, TaskDeadlineMissedFunction deadLineMissedFunction_) {
|
TaskPeriod periodInSeconds_,
|
||||||
|
TaskDeadlineMissedFunction deadLineMissedFunction_,
|
||||||
|
void* args) {
|
||||||
return new PeriodicTask(name_, taskPriority_, stackSize_, periodInSeconds_,
|
return new PeriodicTask(name_, taskPriority_, stackSize_, periodInSeconds_,
|
||||||
deadLineMissedFunction_);
|
deadLineMissedFunction_);
|
||||||
}
|
}
|
||||||
|
|
||||||
FixedTimeslotTaskIF* TaskFactory::createFixedTimeslotTask(
|
FixedTimeslotTaskIF* TaskFactory::createFixedTimeslotTask(
|
||||||
TaskName name_, TaskPriority taskPriority_, TaskStackSize stackSize_,
|
TaskName name_, TaskPriority taskPriority_, TaskStackSize stackSize_,
|
||||||
TaskPeriod periodInSeconds_, TaskDeadlineMissedFunction deadLineMissedFunction_) {
|
TaskPeriod periodInSeconds_, TaskDeadlineMissedFunction deadLineMissedFunction_, void* args) {
|
||||||
return new FixedTimeslotTask(name_, taskPriority_, stackSize_, periodInSeconds_,
|
return new FixedTimeslotTask(name_, taskPriority_, stackSize_, periodInSeconds_,
|
||||||
deadLineMissedFunction_);
|
deadLineMissedFunction_);
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ class TaskFactory {
|
|||||||
PeriodicTaskIF* createPeriodicTask(TaskName name_, TaskPriority taskPriority_,
|
PeriodicTaskIF* createPeriodicTask(TaskName name_, TaskPriority taskPriority_,
|
||||||
TaskStackSize stackSize_, TaskPeriod periodInSeconds_,
|
TaskStackSize stackSize_, TaskPeriod periodInSeconds_,
|
||||||
TaskDeadlineMissedFunction deadLineMissedFunction_,
|
TaskDeadlineMissedFunction deadLineMissedFunction_,
|
||||||
void* args);
|
void* args = nullptr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The meaning for the variables for fixed timeslot tasks is the same as for periodic tasks.
|
* The meaning for the variables for fixed timeslot tasks is the same as for periodic tasks.
|
||||||
@ -64,7 +64,7 @@ class TaskFactory {
|
|||||||
TaskStackSize stackSize_,
|
TaskStackSize stackSize_,
|
||||||
TaskPeriod periodInSeconds_,
|
TaskPeriod periodInSeconds_,
|
||||||
TaskDeadlineMissedFunction deadLineMissedFunction_,
|
TaskDeadlineMissedFunction deadLineMissedFunction_,
|
||||||
void* args);
|
void* args = nullptr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to be called to delete a task
|
* Function to be called to delete a task
|
||||||
|
Loading…
Reference in New Issue
Block a user