eive-obsw/mission/utility/Timestamp.h

32 lines
590 B
C
Raw Normal View History

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 15:58:27 +01:00
#include <sstream>
#include <string>
2021-12-11 11:56:47 +01:00
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
2022-01-17 15:58:27 +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 15:58:27 +01:00
public:
Timestamp();
virtual ~Timestamp();
2021-12-11 11:56:47 +01:00
2022-01-17 15:58:27 +01:00
/**
* @brief Returns the timestamp string
*/
std::string str();
2021-12-11 11:56:47 +01:00
2022-01-17 15:58:27 +01:00
private:
std::stringstream timestamp;
Clock::TimeOfDay_t time;
2021-12-11 11:56:47 +01:00
};
#endif /* MISSION_UTILITY_TIMESTAMP_H_ */