diff --git a/docs/usage_with_microcontroller.md b/docs/usage_with_microcontroller.md index 05f09b6f1f8e3e714846e0a0eab2e618b4d81c35..6496878e4297f3176fdde2231321184ca07d3614 100644 --- a/docs/usage_with_microcontroller.md +++ b/docs/usage_with_microcontroller.md @@ -17,6 +17,7 @@ compile this library independently for different projects. ## Examples Some people have already integrated this library with their own code: + - [AcubeSAT OBC Software](https://gitlab.com/acubesat/obc/obc-software), integration with ATSAMV71Q21 and FreeRTOS - [AcubeSAT FDIR Thesis](https://github.com/kongr45gpen/fdir-demo), integration with ATSAMV71Q21 and FreeRTOS - [AcubeSAT OBC Mockup](https://gitlab.com/acubesat/obc/mockup-4), integration with STM32L4S9 and FreeRTOS @@ -57,13 +58,15 @@ your project. The following sections list and explain the functions that need to be implemented by library users. It is enough to place the function body inside a compiled `.cpp` file. Otherwise, the linker will show errors about undefined functions. -For more details on the requirements, arguments and return values of each function, refer to their respective documentation. +For more details on the requirements, arguments and return values of each function, refer to their respective +documentation. ### Logger The logger is responsible for outputting messages through a serial interface used for debugging purposes. You need to define the following function: + ```cpp void Logger::log(Logger::LogLevel level, etl::istring & message); ``` @@ -73,6 +76,7 @@ be inspected by the developers. It is suggested to add any extra information tha execution thread. An example definition can be as follows: + ```cpp void Logger::log(Logger::LogLevel level, etl::istring &message) { etl::string<20> time; @@ -88,16 +92,19 @@ void Logger::log(Logger::LogLevel level, etl::istring &message) { ``` #### Setting the log level + You will also need to set the **minimum log level** of your application by setting the relevant `LOGLEVEL` constants. For example, you can add this to your `CMakeLists.txt` to log all messages: + ```cmake add_compile_definitions(LOGLEVEL_TRACE) ``` For a list of all possible log levels, refer to the documentation of the Logger. -@note If you want to have different log levels for different parts of your application, you can use [`target_compile_definitions`](https://cmake.org/cmake/help/latest/command/target_compile_definitions.html). +@note If you want to have different log levels for different parts of your application, you can +use [`target_compile_definitions`](https://cmake.org/cmake/help/latest/command/target_compile_definitions.html). @note All logs with a level lower than the specified one will not be compiled at all, and will not be included in any form in the resulting binary. This means that disabled log messages _will not_ have any negative impact on the @@ -111,6 +118,7 @@ Whenever PUS telemetry is generated, it needs to be transmitted or sent to a rec In this function, you can transmit the message via an antenna, send it through an interface for debugging, or both. An example definition can be as follows: + ```cpp void Service::storeMessage(Message& message) { message.finalize(); @@ -129,6 +137,7 @@ The @ref ErrorHandler::logError is responsible for logging errors for debugging ErrorHandler::logError function is used strictly for debugging purposes, and can be left empty if desired. An example definition can be as follows: + ```cpp template <typename ErrorType> void ErrorHandler::logError(const Message& message, ErrorType errorType) { @@ -144,13 +153,36 @@ void ErrorHandler::logError(ErrorType errorType) { } ``` +### Using the Timer + +A significant portion of the PUS functionalities uses timestamps, for example in order to compare message reception times, +or reporting event times as telemetry. However, time tracking is performed by the hardware, so the time-related functions +existing in the Services should be re-implemented, as the current functions contain dummy values. The **TimeGetter** class +is responsible for giving access to a Real-Time Clock, enabling the above capabilities. + +#### Getting the current UTC time + +The **getCurrentTimeUTC** function computes the current UTC time. In order to actually acquire the current time, +modify the arguments (which are dummy by default), so that they correspond to their real values. An example is given +below. + +```cpp +UTCTimestamp TimeGetter::getCurrentTimeUTC() { + UTCTimestamp currentTime(onBoardYear, onBoardMonth, onBoardDay, onBoardHour, onBoardMinute, onBoardSecond); + return currentTime; +} +``` + + ## Service initialisation Platform-specific code also gives a chance to every Service to use pre-initialised entities (e.g. parameters, monitoring definitions etc.) during boot. The following functions are called at initialisation: + 1. @ref ParameterService::initializeParameterMap An example definition can be as follows: + ```cpp Parameter<uint8_t> parameter1(200); Parameter<uint8_t> parameter2(150); @@ -165,6 +197,7 @@ void ParameterService::initializeParameterMap() { After making sure that your code compiles, you need to provide a way of feeding received TC into the services. This can be done easily: + ```cpp MessageParser::parse(string, size); ``` diff --git a/inc/Helpers/Statistic.hpp b/inc/Helpers/Statistic.hpp index 8934b9fcc434346d57dd535b625e6177fd44b5dd..bd451b44bf1f566c1c0a0ae59e716880922ae9d2 100644 --- a/inc/Helpers/Statistic.hpp +++ b/inc/Helpers/Statistic.hpp @@ -2,11 +2,10 @@ #define ECSS_SERVICES_STATISTIC_HPP #include "ECSS_Definitions.hpp" -#include "Service.hpp" #include "ErrorHandler.hpp" +#include "Service.hpp" +#include "TimeGetter.hpp" #include "etl/vector.h" -#include <cmath> -#include <cfloat> /** * Class containing all the statistics for every parameter. Includes functions that calculate and append the @@ -16,8 +15,8 @@ class Statistic { public: uint16_t selfSamplingInterval = 0; uint16_t sampleCounter = 0; - uint32_t maxTime = 0; - uint32_t minTime = 0; // TODO: CUC Format timestamp + Time::CustomCUC_t timeOfMaxValue; + Time::CustomCUC_t timeOfMinValue; double max = -std::numeric_limits<double>::infinity(); double min = std::numeric_limits<double>::infinity(); double sumOfSquares = 0; @@ -53,4 +52,4 @@ public: bool statisticsAreInitialized(); }; -#endif \ No newline at end of file +#endif diff --git a/inc/Helpers/TimeGetter.hpp b/inc/Helpers/TimeGetter.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d4b1c1cdd1f7a856b1978442f08afe07ab925cea --- /dev/null +++ b/inc/Helpers/TimeGetter.hpp @@ -0,0 +1,42 @@ +#ifndef ECSS_SERVICES_TIMEGETTER_HPP +#define ECSS_SERVICES_TIMEGETTER_HPP + +#include <cstdint> +#include <ctime> +#include "Time/TimeStamp.hpp" +#include "Time/UTCTimestamp.hpp" + +/** + * @brief Get the current time + */ +class TimeGetter { +public: + /** + * @brief Gets the current time in UNIX epoch + * @return Current UNIX epoch time, in elapsed seconds + */ + static inline uint32_t getSeconds() { + return static_cast<uint32_t>(time(nullptr)); + } + + /** + * Returns the current UTC time. + * @note + * The information needed to compute the UTC time is implementation-specific. This function should + * be reimplemented to work for every format of the time-related parameters. + */ + static UTCTimestamp getCurrentTimeUTC(); + + /** + * Converts the current UTC time, to a CUC formatted timestamp. + * @note + * The original format of the CUC (etl array of bits), is not used here, because it's easier to append + * a type uint64_t to a message object, rather than a whole array. Thus, we use the custom CUC format. + * + * @return CUC timestamp, formatted as elapsed 100ms ticks. + * @see Time.hpp + */ + static Time::CustomCUC_t getCurrentTimeCustomCUC(); +}; + +#endif // ECSS_SERVICES_TIMEGETTER_HPP diff --git a/inc/Message.hpp b/inc/Message.hpp index 9cb09f8281b1da17b104e74e1121f78e5073019a..d77a1e990c1c6e5e00096062dee641322c6ee248 100644 --- a/inc/Message.hpp +++ b/inc/Message.hpp @@ -5,8 +5,8 @@ #include <cstdint> #include <etl/String.hpp> #include <etl/wstring.h> -#include "ErrorHandler.hpp" #include "macros.hpp" +#include "Time/Time.hpp" /** * A telemetry (TM) or telecommand (TC) message (request/report), as specified in ECSS-E-ST-70-41C @@ -147,6 +147,13 @@ public: */ void appendWord(uint32_t value); + /** + * Appends a type CustomCUC (CUC formatted timestamp) to the message. + */ + void appendCustomCUCTimeStamp(const Time::CustomCUC_t& timeCUC) { + appendUint64(timeCUC.elapsed100msTicks); + } + /** * Appends a number of bytes to the message * @@ -676,6 +683,10 @@ template <> inline void Message::append(const double& value) { appendDouble(value); } +template <> +inline void Message::append(const Time::CustomCUC_t& timeCUC) { + appendCustomCUCTimeStamp(timeCUC); +} /** * Appends an ETL string to the message. ETL strings are handled as ECSS octet strings, meaning that the string size diff --git a/inc/Platform/x86/TimeGetter.hpp b/inc/Platform/x86/TimeGetter.hpp deleted file mode 100644 index d5da817d62de9548c355a0e757c8ebc275e40614..0000000000000000000000000000000000000000 --- a/inc/Platform/x86/TimeGetter.hpp +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef ECSS_SERVICES_TIMEGETTER_HPP -#define ECSS_SERVICES_TIMEGETTER_HPP - -#include <cstdint> -#include <ctime> - -/** - * @brief Get the current time - */ -class TimeGetter { -public: - /** - * @brief Gets the current time in UNIX epoch - * @return Current UNIX epoch time, in elapsed seconds - */ - static inline uint32_t getSeconds() { - return static_cast<uint32_t>(time(nullptr)); - } -}; - -#endif // ECSS_SERVICES_TIMEGETTER_HPP diff --git a/inc/Services/ParameterStatisticsService.hpp b/inc/Services/ParameterStatisticsService.hpp index b6f98580fca55357a6968d90fb7c4e9342e05db4..f2836767a26cbff0dafcd811d7942d0dacbd03bf 100644 --- a/inc/Services/ParameterStatisticsService.hpp +++ b/inc/Services/ParameterStatisticsService.hpp @@ -2,9 +2,10 @@ #define ECSS_SERVICES_PARAMETERSTATISTICSSERVICE_HPP #include "ECSS_Definitions.hpp" -#include "Service.hpp" #include "ErrorHandler.hpp" #include "Helpers/Statistic.hpp" +#include "Helpers/TimeGetter.hpp" +#include "Service.hpp" #include "etl/deque.h" #include "etl/map.h" @@ -15,6 +16,13 @@ * @author Konstantinos Petridis <petridkon@gmail.com> */ class ParameterStatisticsService : public Service { +private: + /** + * The time at which the evaluation of statistics is initialized. It is basically the time when the statistics + * are reset. + */ + Time::CustomCUC_t evaluationStartTime; + public: inline static const uint8_t ServiceType = 4; @@ -30,6 +38,8 @@ public: ParameterStatisticsDefinitionsReport = 9, }; + ParameterStatisticsService(); + /** * Map containing parameters' IDs followed by the statistics that correspond to the specified parameter */ diff --git a/inc/Services/TimeBasedSchedulingService.hpp b/inc/Services/TimeBasedSchedulingService.hpp index f49d8067a02a738a521c71ffcbee1d7b4718fc19..95780f21da786c7b8fbe9d7c6dc69abc6a42f3c4 100644 --- a/inc/Services/TimeBasedSchedulingService.hpp +++ b/inc/Services/TimeBasedSchedulingService.hpp @@ -8,7 +8,7 @@ #include "Helpers/CRCHelper.hpp" // Include platform specific files -#include "Platform/x86/TimeGetter.hpp" +#include "Helpers/TimeGetter.hpp" /** * @def SUB_SCHEDULES_ENABLED diff --git a/inc/Time/Time.hpp b/inc/Time/Time.hpp index 55dbaa16ec64dfac8a811d7b05ea719296c1e7b4..465f729b38d3b03dcc03e3a5df8e864c107ca47e 100644 --- a/inc/Time/Time.hpp +++ b/inc/Time/Time.hpp @@ -1,8 +1,10 @@ -#pragma once +#ifndef ECSS_TIMEHPP +#define ECSS_TIMEHPP + #include <cstdint> -#include <Message.hpp> #include "macros.hpp" #include "etl/String.hpp" +#include "ErrorHandler.hpp" /** * @defgroup Time Time @@ -266,3 +268,5 @@ typedef struct { } CustomCUC_t; } // namespace Time + +#endif diff --git a/src/Helpers/Statistic.cpp b/src/Helpers/Statistic.cpp index 70236a557d90496c08ac807b8d3783c38aca069c..9e43d8c7413fad77017b2b0c3631021e32999a86 100644 --- a/src/Helpers/Statistic.cpp +++ b/src/Helpers/Statistic.cpp @@ -1,20 +1,14 @@ -#include <iostream> #include "Helpers/Statistic.hpp" +#include <cmath> void Statistic::updateStatistics(double value) { - /* - * TODO: - * if periodic, just calculate next time without the CUC - * function. - * */ - if (value > max) { max = value; - // TODO: maxTime = as_CUC_timestamp(); + timeOfMaxValue = TimeGetter::getCurrentTimeCustomCUC(); } if (value < min) { min = value; - // TODO: minTime = as_CUC_timestamp(); + timeOfMinValue = TimeGetter::getCurrentTimeCustomCUC(); } if (sampleCounter + 1 > 0) { mean = (mean * sampleCounter + value) / (sampleCounter + 1); @@ -25,9 +19,9 @@ void Statistic::updateStatistics(double value) { void Statistic::appendStatisticsToMessage(Message& report) { report.appendFloat(static_cast<float>(max)); - report.appendUint32(maxTime); + report.append(timeOfMaxValue); report.appendFloat(static_cast<float>(min)); - report.appendUint32(minTime); + report.append(timeOfMinValue); report.appendFloat(static_cast<float>(mean)); if (SupportsStandardDeviation) { @@ -49,14 +43,15 @@ void Statistic::setSelfSamplingInterval(uint16_t samplingInterval) { void Statistic::resetStatistics() { max = -std::numeric_limits<double>::infinity(); min = std::numeric_limits<double>::infinity(); - maxTime = 0; - minTime = 0; + timeOfMaxValue.elapsed100msTicks = 0; + timeOfMinValue.elapsed100msTicks = 0; mean = 0; sumOfSquares = 0; sampleCounter = 0; } bool Statistic::statisticsAreInitialized() { - return (sampleCounter == 0 and mean == 0 and sumOfSquares == 0 and maxTime == 0 and minTime == 0 and + return (sampleCounter == 0 and mean == 0 and sumOfSquares == 0 and + timeOfMaxValue.elapsed100msTicks == 0 and timeOfMinValue.elapsed100msTicks == 0 and max == -std::numeric_limits<double>::infinity() and min == std::numeric_limits<double>::infinity()); } diff --git a/src/Platform/x86/TimeGetter.cpp b/src/Platform/x86/TimeGetter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d66917cabdf044516ec0bb3abffdd6ae59274b15 --- /dev/null +++ b/src/Platform/x86/TimeGetter.cpp @@ -0,0 +1,13 @@ +#include "Helpers/TimeGetter.hpp" + +UTCTimestamp TimeGetter::getCurrentTimeUTC() { + UTCTimestamp currentTime(2020, 4, 10, 10, 15, 0); + return currentTime; +} + +Time::CustomCUC_t TimeGetter::getCurrentTimeCustomCUC() { + UTCTimestamp timeUTC = getCurrentTimeUTC(); + TimeStamp<Time::CUCSecondsBytes, Time::CUCFractionalBytes> timeCUC(timeUTC); + Time::CustomCUC_t CUCtime = timeCUC.asCustomCUCTimestamp(); + return CUCtime; +} diff --git a/src/Services/ParameterStatisticsService.cpp b/src/Services/ParameterStatisticsService.cpp index 432be671a3356fcf071d53f632aa2ad5b582cf9e..c490c91a90fcc09bdb605b8c8d77e3447abe48e0 100644 --- a/src/Services/ParameterStatisticsService.cpp +++ b/src/Services/ParameterStatisticsService.cpp @@ -1,15 +1,14 @@ -#include <iostream> #include "ECSS_Configuration.hpp" #ifdef SERVICE_PARAMETER -#include "Services/ParameterStatisticsService.hpp" #include "ServicePool.hpp" +#include "Services/ParameterStatisticsService.hpp" + +ParameterStatisticsService::ParameterStatisticsService() : evaluationStartTime(TimeGetter::getCurrentTimeCustomCUC()) {} void ParameterStatisticsService::reportParameterStatistics(Message& request) { request.assertTC(ServiceType, MessageType::ReportParameterStatistics); parameterStatisticsReport(); - // TODO: append start time and end time to the report - if (hasAutomaticStatisticsReset) { resetParameterStatistics(); } else { @@ -22,11 +21,12 @@ void ParameterStatisticsService::reportParameterStatistics(Message& request) { void ParameterStatisticsService::parameterStatisticsReport() { Message report(ServiceType, MessageType::ParameterStatisticsReport, Message::TM, 1); - report.appendUint16(1); // Dummy value for start and end time, will change in the end - report.appendUint16(1); - uint16_t numOfValidParameters = 0; + report.append(evaluationStartTime); + auto evaluationStopTime = TimeGetter::getCurrentTimeCustomCUC(); + report.append(evaluationStopTime); - for (auto& currentStatistic : statisticsMap) { + uint16_t numOfValidParameters = 0; + for (auto& currentStatistic: statisticsMap) { uint16_t numOfSamples = currentStatistic.second.sampleCounter; if (numOfSamples == 0) { continue; @@ -35,7 +35,7 @@ void ParameterStatisticsService::parameterStatisticsReport() { } report.appendUint16(numOfValidParameters); - for (auto& currentStatistic : statisticsMap) { + for (auto& currentStatistic: statisticsMap) { uint16_t currentId = currentStatistic.first; uint16_t numOfSamples = currentStatistic.second.sampleCounter; if (numOfSamples == 0) { @@ -54,11 +54,10 @@ void ParameterStatisticsService::resetParameterStatistics(Message& request) { } void ParameterStatisticsService::resetParameterStatistics() { - // TODO: Stop the evaluation of parameter statistics - for (auto& it : statisticsMap) { + for (auto& it: statisticsMap) { it.second.resetStatistics(); } - // TODO: Restart the evaluation of parameter statistics + evaluationStartTime = TimeGetter::getCurrentTimeCustomCUC(); } void ParameterStatisticsService::enablePeriodicStatisticsReporting(Message& request) { @@ -166,7 +165,7 @@ void ParameterStatisticsService::statisticsDefinitionsReport() { definitionsReport.appendUint16(currentReportingInterval); definitionsReport.appendUint16(statisticsMap.size()); - for (auto& currentParam : statisticsMap) { + for (auto& currentParam: statisticsMap) { uint16_t currentId = currentParam.first; uint16_t samplingInterval = currentParam.second.selfSamplingInterval; definitionsReport.appendUint16(currentId); diff --git a/test/Helpers/Statistic.cpp b/test/Helpers/Statistic.cpp index 036d583950b11819260cbdd3c4ecf7b54fed8d9e..75d69c0ce115b8438dbb0d40d0df6ed071dd28a4 100644 --- a/test/Helpers/Statistic.cpp +++ b/test/Helpers/Statistic.cpp @@ -52,9 +52,9 @@ TEST_CASE("Appending of statistics to message") { stat.appendStatisticsToMessage(report); REQUIRE(report.readFloat() == 8.35f); - REQUIRE(report.readUint32() == 0); // No CUC integration yet + REQUIRE(report.readUint64() == 86769000); // dummy time value REQUIRE(report.readFloat() == 1.09f); - REQUIRE(report.readUint32() == 0); + REQUIRE(report.readUint64() == 86769000); REQUIRE(report.readFloat() == Catch::Approx(4.99501).epsilon(0.00001)); REQUIRE(report.readFloat() == Catch::Approx(2.76527).epsilon(0.00001)); } @@ -81,4 +81,4 @@ TEST_CASE("Reset statistics") { stat.resetStatistics(); REQUIRE(stat.statisticsAreInitialized()); } -} \ No newline at end of file +} diff --git a/test/Message.cpp b/test/Message.cpp index e20e0769e47d128d7514692c28b4c825d2562cf2..619b6be89c410649c20fed6a0f5af4ca2511021d 100644 --- a/test/Message.cpp +++ b/test/Message.cpp @@ -166,6 +166,28 @@ TEST_CASE("Test appending double") { CHECK(message.read<double>() == Catch::Approx(2.324).epsilon(0.0001)); } +TEST_CASE("Append a CUC timestamp") { + SECTION("Test 1") { + auto timeCUC = TimeGetter::getCurrentTimeCustomCUC(); + REQUIRE(timeCUC.elapsed100msTicks == 86769000); + + Message message(0, 0, Message::TC, 0); + message.appendCustomCUCTimeStamp(timeCUC); + + REQUIRE(message.readUint64() == 86769000); + } + + SECTION("Test 2") { + Time::CustomCUC_t timeCUC; + timeCUC.elapsed100msTicks = 34511; + + Message message(0, 0, Message::TC, 0); + message.appendCustomCUCTimeStamp(timeCUC); + + REQUIRE(message.readUint64() == 34511); + } +} + TEST_CASE("Requirement 7.3.8 (Octet-string)", "[message][ecss]") { Message message(0, 0, Message::TC, 0); diff --git a/test/Services/ParameterStatisticsService.cpp b/test/Services/ParameterStatisticsService.cpp index 8f712121feb39681897ce66ab6aa5955ba083a45..b950df1ebe7da3f02ef1b858ab8081885a178798 100644 --- a/test/Services/ParameterStatisticsService.cpp +++ b/test/Services/ParameterStatisticsService.cpp @@ -44,25 +44,25 @@ TEST_CASE("Reporting of statistics") { Message report = ServiceTests::get(0); CHECK(report.serviceType == ParameterStatisticsService::ServiceType); CHECK(report.messageType == ParameterStatisticsService::MessageType::ParameterStatisticsReport); - CHECK(report.readUint16() == 1); // start time - CHECK(report.readUint16() == 1); // end time - CHECK(report.readUint16() == 2); // number of parameters reported + CHECK(report.readUint64() == 86769000); // start time + CHECK(report.readUint64() == 86769000); // end time + CHECK(report.readUint16() == 2); // number of parameters reported // Parameter B - CHECK(report.readUint16() == 5); // ID-2 - CHECK(report.readUint16() == 6); // number of samples - CHECK(report.readFloat() == 13); // max value - CHECK(report.readUint32() == 0); // max time - CHECK(report.readFloat() == 3); // min value - CHECK(report.readUint32() == 0); // min time - CHECK(report.readFloat() == 8); // mean + CHECK(report.readUint16() == 5); // ID-2 + CHECK(report.readUint16() == 6); // number of samples + CHECK(report.readFloat() == 13); // max value + CHECK(report.readUint64() == 86769000); // max time + CHECK(report.readFloat() == 3); // min value + CHECK(report.readUint64() == 86769000); // min time + CHECK(report.readFloat() == 8); // mean CHECK(report.readFloat() == Catch::Approx(3.41565).epsilon(0.01)); // Parameter A CHECK(report.readUint16() == 7); // ID-1 CHECK(report.readUint16() == 3); // number of samples CHECK(report.readFloat() == 5); // max value - CHECK(report.readUint32() == 0); // max time + CHECK(report.readUint64() == 86769000); // max time CHECK(report.readFloat() == 1); // min value - CHECK(report.readUint32() == 0); // min time + CHECK(report.readUint64() == 86769000); // min time CHECK(report.readFloat() == 3); // mean CHECK(static_cast<int>(report.readFloat()) == 1); // stddev diff --git a/test/TestPlatform.cpp b/test/TestPlatform.cpp index d9ceaddfd223ded44d7b7295af1f434756be44b0..f5560304dd7d7cdaa925363a5d71002cfb492473 100644 --- a/test/TestPlatform.cpp +++ b/test/TestPlatform.cpp @@ -5,10 +5,23 @@ #include <Service.hpp> #include <catch2/catch_all.hpp> #include "Helpers/Parameter.hpp" +#include "Helpers/TimeGetter.hpp" #include "Parameters/PlatformParameters.hpp" #include "Services/ParameterService.hpp" #include "Services/ServiceTests.hpp" +UTCTimestamp TimeGetter::getCurrentTimeUTC() { + UTCTimestamp currentTime(2020, 4, 10, 10, 15, 0); + return currentTime; +} + +Time::CustomCUC_t TimeGetter::getCurrentTimeCustomCUC() { + UTCTimestamp timeUTC = getCurrentTimeUTC(); + TimeStamp<Time::CUCSecondsBytes, Time::CUCFractionalBytes> timeCUC(timeUTC); + Time::CustomCUC_t CUCtime = timeCUC.asCustomCUCTimestamp(); + return CUCtime; +} + // Explicit template specializations for the logError() function template void ErrorHandler::logError(const Message&, ErrorHandler::AcceptanceErrorType); template void ErrorHandler::logError(const Message&, ErrorHandler::ExecutionStartErrorType); @@ -94,4 +107,4 @@ void ParameterService::initializeParameterMap() { {static_cast<uint16_t>(10), PlatformParameters::parameter11}, {static_cast<uint16_t>(11), PlatformParameters::parameter12}}; } -CATCH_REGISTER_LISTENER(ServiceTestsListener) \ No newline at end of file +CATCH_REGISTER_LISTENER(ServiceTestsListener)