diff --git a/modules/control/Firmware/src/FreeRTOS/Task.cpp b/modules/control/Firmware/src/FreeRTOS/Task.cpp index d823edf..acd1a89 100644 --- a/modules/control/Firmware/src/FreeRTOS/Task.cpp +++ b/modules/control/Firmware/src/FreeRTOS/Task.cpp @@ -8,7 +8,7 @@ freertos::Task::Task(TaskFunction_t taskFunction, const etl::string_view name, params, priority, &handle, coreID); } -freertos::Task::Task(Task &&other) +freertos::Task::Task(Task &&other) noexcept : name{etl::move(other.name)}, handle{etl::move(other.handle)}, stackDepth{etl::move(other.stackDepth)}, priority{etl::move(other.priority)}, coreID{etl::move(other.coreID)} {} @@ -19,7 +19,7 @@ freertos::Task::~Task() { } } -auto freertos::Task::operator=(const Task &&other) -> Task & { +auto freertos::Task::operator=(const Task &&other) noexcept -> Task & { name = etl::move(other.name); handle = etl::move(other.handle); stackDepth = etl::move(other.stackDepth); @@ -28,16 +28,16 @@ auto freertos::Task::operator=(const Task &&other) -> Task & { return *this; } -auto freertos::Task::getName() -> etl::string_view { return name; } +auto freertos::Task::getName() const -> etl::string_view { return name; } -auto freertos::Task::getStackDepth() -> uint32_t { return stackDepth; } +auto freertos::Task::getStackDepth() const -> uint32_t { return stackDepth; } -auto freertos::Task::getPriority() -> UBaseType_t { return priority; } +auto freertos::Task::getPriority() const -> UBaseType_t { return priority; } auto freertos::Task::setPriority(const UBaseType_t newPriority) -> void { vTaskPrioritySet(handle, newPriority); } -auto freertos::Task::getCoreID() -> BaseType_t { return coreID; } +auto freertos::Task::getCoreID() const -> BaseType_t { return coreID; } -auto freertos::Task::isValid() -> bool { return status == pdPASS; } \ No newline at end of file +auto freertos::Task::isValid() const -> bool { return status == pdPASS; } \ No newline at end of file diff --git a/modules/control/Firmware/src/FreeRTOS/Task.h b/modules/control/Firmware/src/FreeRTOS/Task.h index 46f3d47..fce288e 100644 --- a/modules/control/Firmware/src/FreeRTOS/Task.h +++ b/modules/control/Firmware/src/FreeRTOS/Task.h @@ -9,17 +9,17 @@ public: const uint32_t stackDepth, void *const params, UBaseType_t priority, const BaseType_t coreID); Task(const Task &other) = delete; - Task(Task &&other); + Task(Task &&other) noexcept; ~Task(); Task &operator=(const Task &other) = delete; - Task &operator=(const Task &&other); + Task &operator=(const Task &&other) noexcept; - etl::string_view getName(); - uint32_t getStackDepth(); - UBaseType_t getPriority(); + etl::string_view getName() const; + uint32_t getStackDepth() const; + UBaseType_t getPriority() const; void setPriority(const UBaseType_t newPriority); - BaseType_t getCoreID(); - bool isValid(); + BaseType_t getCoreID() const; + bool isValid() const; private: etl::string_view name;