From f698275a0bafc6494780f9b65858ca7d920e8e5a Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Sat, 5 Sep 2020 21:59:17 +0200 Subject: [PATCH] removed seconds typedef, confusing --- datapoollocal/HasLocalDataPoolIF.h | 4 +++- datapoollocal/LocalPoolDataSetBase.h | 9 +++++---- datapoollocal/SharedLocalDataSet.h | 9 +++++---- datapoollocal/StaticLocalDataSet.h | 12 +++++++----- timemanager/Clock.h | 1 - timemanager/Stopwatch.cpp | 2 +- timemanager/Stopwatch.h | 2 +- 7 files changed, 22 insertions(+), 17 deletions(-) diff --git a/datapoollocal/HasLocalDataPoolIF.h b/datapoollocal/HasLocalDataPoolIF.h index 3e6b843f..4b49ee11 100644 --- a/datapoollocal/HasLocalDataPoolIF.h +++ b/datapoollocal/HasLocalDataPoolIF.h @@ -4,6 +4,8 @@ #include "../datapool/PoolEntryIF.h" #include "../ipc/MessageQueueSenderIF.h" #include "../housekeeping/HousekeepingMessage.h" +#include "../timemanager/Clock.h" + #include class LocalDataPoolManager; @@ -85,7 +87,7 @@ public: return HasReturnvaluesIF::RETURN_FAILED; }; virtual ReturnValue_t changeCollectionInterval(sid_t sid, - dur_seconds_t newInterval) { + float newIntervalSeconds) { return HasReturnvaluesIF::RETURN_FAILED; }; }; diff --git a/datapoollocal/LocalPoolDataSetBase.h b/datapoollocal/LocalPoolDataSetBase.h index bd127db4..77c1df1b 100644 --- a/datapoollocal/LocalPoolDataSetBase.h +++ b/datapoollocal/LocalPoolDataSetBase.h @@ -1,8 +1,9 @@ -#ifndef FRAMEWORK_DATAPOOLLOCAL_LOCALPOOLDATASETBASE_H_ -#define FRAMEWORK_DATAPOOLLOCAL_LOCALPOOLDATASETBASE_H_ +#ifndef FSFW_DATAPOOLLOCAL_LOCALPOOLDATASETBASE_H_ +#define FSFW_DATAPOOLLOCAL_LOCALPOOLDATASETBASE_H_ + +#include "HasLocalDataPoolIF.h" #include "../datapool/DataSetIF.h" #include "../datapool/PoolDataSetBase.h" -#include "../datapoollocal/HasLocalDataPoolIF.h" #include "../serialize/SerializeIF.h" #include @@ -130,4 +131,4 @@ private: }; -#endif /* FRAMEWORK_DATAPOOLLOCAL_LOCALPOOLDATASETBASE_H_ */ +#endif /* FSFW_DATAPOOLLOCAL_LOCALPOOLDATASETBASE_H_ */ diff --git a/datapoollocal/SharedLocalDataSet.h b/datapoollocal/SharedLocalDataSet.h index f6748e4d..b1f9aa3d 100644 --- a/datapoollocal/SharedLocalDataSet.h +++ b/datapoollocal/SharedLocalDataSet.h @@ -1,7 +1,8 @@ -#ifndef FRAMEWORK_DATAPOOLLOCAL_SHAREDLOCALDATASET_H_ -#define FRAMEWORK_DATAPOOLLOCAL_SHAREDLOCALDATASET_H_ +#ifndef FSFW_DATAPOOLLOCAL_SHAREDLOCALDATASET_H_ +#define FSFW_DATAPOOLLOCAL_SHAREDLOCALDATASET_H_ + +#include "LocalPoolDataSetBase.h" #include "../datapool/SharedDataSetIF.h" -#include "../datapoollocal/LocalPoolDataSetBase.h" #include "../objectmanager/SystemObject.h" #include @@ -28,4 +29,4 @@ private: -#endif /* FRAMEWORK_DATAPOOLLOCAL_SHAREDLOCALDATASET_H_ */ +#endif /* FSFW_DATAPOOLLOCAL_SHAREDLOCALDATASET_H_ */ diff --git a/datapoollocal/StaticLocalDataSet.h b/datapoollocal/StaticLocalDataSet.h index b3e8422c..7c2f0039 100644 --- a/datapoollocal/StaticLocalDataSet.h +++ b/datapoollocal/StaticLocalDataSet.h @@ -1,5 +1,6 @@ -#ifndef FRAMEWORK_DATAPOOLLOCAL_STATICLOCALDATASET_H_ -#define FRAMEWORK_DATAPOOLLOCAL_STATICLOCALDATASET_H_ +#ifndef FSFW_DATAPOOLLOCAL_STATICLOCALDATASET_H_ +#define FSFW_DATAPOOLLOCAL_STATICLOCALDATASET_H_ + #include "LocalPoolDataSetBase.h" #include "../objectmanager/SystemObjectIF.h" #include @@ -16,12 +17,13 @@ template class StaticLocalDataSet: public LocalPoolDataSetBase { public: - StaticLocalDataSet(sid_t sid): - LocalPoolDataSetBase(sid, poolVarList.data(), NUM_VARIABLES) { + StaticLocalDataSet(sid_t sid): LocalPoolDataSetBase(sid, nullptr, + NUM_VARIABLES) { + this->setContainer(poolVarList.data()); } private: std::array poolVarList; }; -#endif /* FRAMEWORK_DATAPOOLLOCAL_STATICLOCALDATASET_H_ */ +#endif /* FSFW_DATAPOOLLOCAL_STATICLOCALDATASET_H_ */ diff --git a/timemanager/Clock.h b/timemanager/Clock.h index 9463b5a6..acb68e2e 100644 --- a/timemanager/Clock.h +++ b/timemanager/Clock.h @@ -10,7 +10,6 @@ //! Don't use these for time points, type is not large enough for UNIX epoch. using dur_millis_t = uint32_t; -using dur_seconds_t = double; class Clock { public: diff --git a/timemanager/Stopwatch.cpp b/timemanager/Stopwatch.cpp index 637c5078..28ae4543 100644 --- a/timemanager/Stopwatch.cpp +++ b/timemanager/Stopwatch.cpp @@ -18,7 +18,7 @@ dur_millis_t Stopwatch::stop() { return elapsedTime.tv_sec * 1000 + elapsedTime.tv_usec / 1000; } -dur_seconds_t Stopwatch::stopSeconds() { +double Stopwatch::stopSeconds() { stopInternal(); return timevalOperations::toDouble(elapsedTime); } diff --git a/timemanager/Stopwatch.h b/timemanager/Stopwatch.h index 191929dc..49b686f9 100644 --- a/timemanager/Stopwatch.h +++ b/timemanager/Stopwatch.h @@ -45,7 +45,7 @@ public: * Calculates the elapsed time since start and returns it * @return elapsed time in seconds (double precision) */ - dur_seconds_t stopSeconds(); + double stopSeconds(); /** * Displays the elapsed times on the osstream, depending on internal display