2021-12-11 11:56:47 +01:00
|
|
|
#ifndef MISSION_UTILITY_TIMESTAMP_H_
|
|
|
|
#define MISSION_UTILITY_TIMESTAMP_H_
|
|
|
|
|
2021-12-23 11:07:19 +01:00
|
|
|
#include <iomanip>
|
2022-01-17 13:48:55 +01:00
|
|
|
#include <sstream>
|
|
|
|
#include <string>
|
|
|
|
|
2021-12-11 11:56:47 +01:00
|
|
|
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
2022-01-17 13:48:55 +01:00
|
|
|
#include "fsfw/timemanager/Clock.h"
|
2021-12-11 11:56:47 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief This class generates timestamps for files.
|
|
|
|
*
|
|
|
|
* @author J. Meier
|
|
|
|
*/
|
|
|
|
class Timestamp : public HasReturnvaluesIF {
|
2022-01-17 13:48:55 +01:00
|
|
|
public:
|
|
|
|
Timestamp();
|
|
|
|
virtual ~Timestamp();
|
2021-12-11 11:56:47 +01:00
|
|
|
|
2022-01-17 13:48:55 +01:00
|
|
|
/**
|
|
|
|
* @brief Returns the timestamp string
|
|
|
|
*/
|
|
|
|
std::string str();
|
2021-12-11 11:56:47 +01:00
|
|
|
|
2022-01-17 13:48:55 +01:00
|
|
|
private:
|
|
|
|
std::stringstream timestamp;
|
|
|
|
Clock::TimeOfDay_t time;
|
2021-12-11 11:56:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* MISSION_UTILITY_TIMESTAMP_H_ */
|