eive-obsw/mission/utility/Timestamp.h

32 lines
557 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>
2022-08-24 17:27:47 +02:00
#include "fsfw/returnvalues/returnvalue.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
*/
2022-08-24 17:27:47 +02:00
class Timestamp {
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_ */