WIP: somethings wrong.. #19
@ -157,3 +157,6 @@ ReturnValue_t FixedTimeslotTask::sleepFor(uint32_t ms) {
|
|||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TaskHandle_t FixedTimeslotTask::getTaskHandle() const {
|
||||||
|
return handle;
|
||||||
|
}
|
||||||
|
@ -57,6 +57,8 @@ public:
|
|||||||
|
|
||||||
ReturnValue_t sleepFor(uint32_t ms) override;
|
ReturnValue_t sleepFor(uint32_t ms) override;
|
||||||
|
|
||||||
|
TaskHandle_t getTaskHandle() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool started;
|
bool started;
|
||||||
TaskHandle_t handle;
|
TaskHandle_t handle;
|
||||||
|
@ -126,6 +126,10 @@ void PeriodicTask::checkMissedDeadline(const TickType_t xLastWakeTime,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TaskHandle_t PeriodicTask::getTaskHandle() const {
|
||||||
|
return handle;
|
||||||
|
}
|
||||||
|
|
||||||
void PeriodicTask::handleMissedDeadline() {
|
void PeriodicTask::handleMissedDeadline() {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
sif::warning << "PeriodicTask: " << pcTaskGetName(NULL) <<
|
sif::warning << "PeriodicTask: " << pcTaskGetName(NULL) <<
|
||||||
|
@ -69,6 +69,8 @@ public:
|
|||||||
uint32_t getPeriodMs() const override;
|
uint32_t getPeriodMs() const override;
|
||||||
|
|
||||||
ReturnValue_t sleepFor(uint32_t ms) override;
|
ReturnValue_t sleepFor(uint32_t ms) override;
|
||||||
|
|
||||||
|
TaskHandle_t getTaskHandle() const;
|
||||||
protected:
|
protected:
|
||||||
bool started;
|
bool started;
|
||||||
TaskHandle_t handle;
|
TaskHandle_t handle;
|
||||||
|
@ -18,6 +18,7 @@ TaskHandle_t TaskManagement::getCurrentTaskHandle() {
|
|||||||
return xTaskGetCurrentTaskHandle();
|
return xTaskGetCurrentTaskHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
configSTACK_DEPTH_TYPE TaskManagement::getTaskStackHighWatermark() {
|
configSTACK_DEPTH_TYPE TaskManagement::getTaskStackHighWatermark(
|
||||||
return uxTaskGetStackHighWaterMark(TaskManagement::getCurrentTaskHandle());
|
TaskHandle_t task) {
|
||||||
|
return uxTaskGetStackHighWaterMark(task);
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,8 @@ public:
|
|||||||
* @return Smallest value of stack remaining since the task was started in
|
* @return Smallest value of stack remaining since the task was started in
|
||||||
* words.
|
* words.
|
||||||
*/
|
*/
|
||||||
static configSTACK_DEPTH_TYPE getTaskStackHighWatermark();
|
static configSTACK_DEPTH_TYPE getTaskStackHighWatermark(
|
||||||
|
TaskHandle_t task = nullptr);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FRAMEWORK_OSAL_FREERTOS_TASKMANAGEMENT_H_ */
|
#endif /* FRAMEWORK_OSAL_FREERTOS_TASKMANAGEMENT_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user