F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
RawTime.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title Os/Posix/RawTime.hpp
3 // \brief Posix definitions for Os::RawTime
4 // ======================================================================
5 #ifndef OS_POSIX_RAWTIME_HPP
6 #define OS_POSIX_RAWTIME_HPP
7 
8 #include <Os/RawTime.hpp>
9 #include <ctime>
10 
11 namespace Os {
12 namespace Posix {
13 namespace RawTime {
14 
16  timespec m_timespec = {0, 0};
17 };
18 
24  public:
26  PosixRawTime() = default;
27 
29  ~PosixRawTime() override = default;
30 
33  RawTimeHandle* getHandle() override;
34 
35  // ------------------------------------------------------------
36  // Implementation-specific RawTime overrides
37  // ------------------------------------------------------------
44  Status now() override;
45 
54  Status getTimeInterval(const Os::RawTime& other, Fw::TimeInterval& interval) const override;
55 
69 
83 
84  private:
86  PosixRawTimeHandle m_handle;
87 };
88 
89 } // namespace RawTime
90 } // namespace Posix
91 } // namespace Os
92 #endif // OS_POSIX_RAWTIME_HPP
PosixRawTime()=default
constructor
Status getTimeInterval(const Os::RawTime &other, Fw::TimeInterval &interval) const override
Calculate the time interval between this and another raw time.
Definition: RawTime.cpp:23
Fw::SerializeStatus serializeTo(Fw::SerializeBufferBase &buffer) const override
Serialize the contents of the RawTimeInterface object into a buffer.
Definition: RawTime.cpp:47
SerializeStatus
forward declaration for string
~PosixRawTime() override=default
destructor
Fw::SerializeStatus deserializeFrom(Fw::SerializeBufferBase &buffer) override
Deserialize the contents of the RawTimeInterface object from a buffer.
Definition: RawTime.cpp:57
Status now() override
Get the current time.
Definition: RawTime.cpp:15
RawTimeHandle * getHandle() override
return the underlying RawTime handle (implementation specific)
Definition: RawTime.cpp:74
Posix implementation of Os::RawTime.
Definition: RawTime.hpp:23