From 8ff5cf604f18965831076bd9d32331181302a76c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 12 Nov 2024 15:05:51 +0100 Subject: [PATCH] continue refactoring --- src/fsfw/serialize.h | 2 ++ src/fsfw/serialize/SerializableListElement.h | 28 +++++++++++++++++++ .../integration/devices/TestDeviceHandler.cpp | 12 ++++---- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/src/fsfw/serialize.h b/src/fsfw/serialize.h index b74c3c32..8292616a 100644 --- a/src/fsfw/serialize.h +++ b/src/fsfw/serialize.h @@ -5,6 +5,8 @@ #include "serialize/SerialArrayListAdapter.h" #include "serialize/SerialBufferAdapter.h" #include "serialize/SerialLinkedListAdapter.h" +#include "serialize/SerializableList.h" +#include "serialize/SerializableListElement.h" #include "serialize/SerializeElement.h" #endif /* FSFW_SERIALIZE_H_ */ diff --git a/src/fsfw/serialize/SerializableListElement.h b/src/fsfw/serialize/SerializableListElement.h index 3a490515..7bbc6051 100644 --- a/src/fsfw/serialize/SerializableListElement.h +++ b/src/fsfw/serialize/SerializableListElement.h @@ -48,6 +48,17 @@ class ListElement : public SerializeIF { template using LE = ListElement; +using le_u8 = LE; +using le_u16 = LE; +using le_u32 = LE; +using le_u64 = LE; +using le_i8 = LE; +using le_i16 = LE; +using le_i32 = LE; +using le_i64 = LE; +using le_f32 = LE; +using le_f64 = LE; + template class ListArrayElement : public SerializeIF { public: @@ -121,4 +132,21 @@ class ListArrayElement : public SerializeIF { template using LAE = ListArrayElement; +template +using lae_u8 = LAE; +template +using lae_u16 = LAE; +template +using lae_u32 = LAE; +template +using lae_i8 = LAE; +template +using lae_i16 = LAE; +template +using lae_i32 = LAE; +template +using lae_f32 = LAE; +template +using lae_f64 = LAE; + } // namespace serialize diff --git a/src/fsfw_tests/integration/devices/TestDeviceHandler.cpp b/src/fsfw_tests/integration/devices/TestDeviceHandler.cpp index f26c6513..fb1ea7e8 100644 --- a/src/fsfw_tests/integration/devices/TestDeviceHandler.cpp +++ b/src/fsfw_tests/integration/devices/TestDeviceHandler.cpp @@ -680,12 +680,12 @@ ReturnValue_t TestDevice::getParameter(uint8_t domainId, uint8_t uniqueId, return result; } if (not enabled) { - PoolReadGuard readHelper(&dataset); - dataset.testUint8Var.value = 0; - dataset.testUint32Var.value = 0; - dataset.testFloat3Vec.value[0] = 0.0; - dataset.testFloat3Vec.value[0] = 0.0; - dataset.testFloat3Vec.value[1] = 0.0; + // PoolReadGuard readHelper(&dataset); + dataset.testU8 = 0; + dataset.testU32 = 0; + dataset.testFloat3Vec[0] = 0.0; + dataset.testFloat3Vec[0] = 0.0; + dataset.testFloat3Vec[1] = 0.0; } if (fullInfoPrintout) {