1
0
forked from fsfw/fsfw

Some improvements for time stamper API

This commit is contained in:
2022-09-05 14:44:35 +02:00
parent 04bff7a522
commit d64ad71529
22 changed files with 105 additions and 92 deletions

View File

@ -4,9 +4,9 @@
#include <array>
#include "fsfw/timemanager/TimeReaderIF.h"
#include "fsfw/timemanager/TimeStamperIF.h"
#include "fsfw/timemanager/TimeWriterIF.h"
class CdsShortTimestamperMock : public TimeStamperIF, public TimeReaderIF {
class CdsShortTimestamperMock : public TimeWriterIF, public TimeReaderIF {
public:
unsigned int serializeCallCount = 0;
unsigned int deserializeCallCount = 0;
@ -61,7 +61,6 @@ class CdsShortTimestamperMock : public TimeStamperIF, public TimeReaderIF {
}
[[nodiscard]] size_t getTimestampSize() const override { return getSerializedSize(); }
ReturnValue_t addTimeStamp(uint8_t *buffer, uint8_t maxSize) override { return 0; }
void reset() {
serializeCallCount = 0;
@ -75,9 +74,6 @@ class CdsShortTimestamperMock : public TimeStamperIF, public TimeReaderIF {
serFailRetval = returnvalue::FAILED;
}
ReturnValue_t readTimeStamp(const uint8_t *buffer, size_t maxSize) override {
return deSerialize(&buffer, &maxSize, SerializeIF::Endianness::NETWORK);
}
timeval &getTime() override { return dummyTime; }
private:

View File

@ -7,8 +7,8 @@
#include "tmtc/pusIds.h"
TEST_CASE("PUS Service 11", "[pus-srvc11]") {
Service11TelecommandScheduling<13> pusService11({objects::PUS_SERVICE_11_TC_SCHEDULER,
apid::DEFAULT_APID, pus::PUS_SERVICE_11}, nullptr);
Service11TelecommandScheduling<13> pusService11(
{objects::PUS_SERVICE_11_TC_SCHEDULER, apid::DEFAULT_APID, pus::PUS_SERVICE_11}, nullptr);
// TODO test something...
}