2016-06-15 23:48:41 +02:00
|
|
|
#ifndef FRAMEWORK_TIMEMANAGER_TIMESTAMPERIF_H_
|
|
|
|
#define FRAMEWORK_TIMEMANAGER_TIMESTAMPERIF_H_
|
|
|
|
|
2020-08-13 20:53:35 +02:00
|
|
|
#include "../returnvalues/HasReturnvaluesIF.h"
|
2016-06-15 23:48:41 +02:00
|
|
|
|
2018-07-12 16:29:32 +02:00
|
|
|
/**
|
|
|
|
* A class implementing this IF provides facilities to add a time stamp to the
|
|
|
|
* buffer provided.
|
|
|
|
* Implementors need to ensure that calling the method is thread-safe, i.e.
|
|
|
|
* addTimeStamp may be called in parallel from a different context.
|
|
|
|
*/
|
2016-06-15 23:48:41 +02:00
|
|
|
class TimeStamperIF {
|
|
|
|
public:
|
2018-07-12 16:29:32 +02:00
|
|
|
static const uint8_t INTERFACE_ID = CLASS_ID::TIME_STAMPER_IF;
|
|
|
|
static const ReturnValue_t BAD_TIMESTAMP = MAKE_RETURN_CODE(1);
|
|
|
|
|
2020-10-28 02:20:12 +01:00
|
|
|
//! This is a mission-specific constant and determines the total
|
|
|
|
//! size reserved for timestamps.
|
|
|
|
//! TODO: Default define in FSFWConfig ?
|
|
|
|
static const uint8_t MISSION_TIMESTAMP_SIZE = 8;
|
|
|
|
virtual ReturnValue_t addTimeStamp(uint8_t* buffer,
|
|
|
|
const uint8_t maxSize) = 0;
|
2016-06-15 23:48:41 +02:00
|
|
|
virtual ~TimeStamperIF() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* FRAMEWORK_TIMEMANAGER_TIMESTAMPERIF_H_ */
|