From 4c3c93c106c56f0330dcbec88251971816116f67 Mon Sep 17 00:00:00 2001 From: Tobias Baumgartl Date: Thu, 8 Jan 2026 19:42:53 +0100 Subject: [PATCH] Expose health table mutex publically --- CHANGELOG.md | 2 +- src/fsfw/health/HealthTable.cpp | 4 ++++ src/fsfw/health/HealthTable.h | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e512aa21..9e9f9c09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,7 +71,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Switched to vendored versions for both the Embedded Template Library (ETL) and the Catch2 unittesting library. - Increased maximum number of mode tables from 70 to 100 - +- Exposed health table mutex via getter function ## Added - `EventManager`: Add function to print all listeners. diff --git a/src/fsfw/health/HealthTable.cpp b/src/fsfw/health/HealthTable.cpp index ec3f4e8d..46544c4a 100644 --- a/src/fsfw/health/HealthTable.cpp +++ b/src/fsfw/health/HealthTable.cpp @@ -112,3 +112,7 @@ ReturnValue_t HealthTable::iterate(HealthEntry* value, bool reset) { mapIterator++; return result; } + +MutexIF* HealthTable::getMutex() { + return mutex; +} diff --git a/src/fsfw/health/HealthTable.h b/src/fsfw/health/HealthTable.h index 48b9bd5f..b4c1cb6a 100644 --- a/src/fsfw/health/HealthTable.h +++ b/src/fsfw/health/HealthTable.h @@ -28,6 +28,8 @@ class HealthTable : public HealthTableIF, public SystemObject { virtual void setHealth(object_id_t object, HasHealthIF::HealthState newState) override; virtual HasHealthIF::HealthState getHealth(object_id_t) override; + MutexIF* getMutex(); + protected: using HealthMap = std::map; using HealthEntry = std::pair; -- 2.43.0