F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
OsTime.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title OsTime.hpp
3 // \author kubiak
4 // \brief hpp file for OsTime component implementation class
5 // ======================================================================
6 
7 #ifndef Svc_OsTime_HPP
8 #define Svc_OsTime_HPP
9 
11 
12 #include <Fw/Time/Time.hpp>
13 #include <Os/RawTime.hpp>
14 #include <Os/Mutex.hpp>
15 
16 namespace Svc {
17 
18 class OsTime final : public OsTimeComponentBase {
19  public:
20  // ----------------------------------------------------------------------
21  // Component construction and destruction
22  // ----------------------------------------------------------------------
23 
25  OsTime(const char* const compName
26  );
27 
29  ~OsTime();
30 
33  void set_epoch(const Fw::Time& fw_time, const Os::RawTime& os_time);
34 
35  PRIVATE:
36  // ----------------------------------------------------------------------
37  // Handler implementations for user-defined typed input ports
38  // ----------------------------------------------------------------------
39 
43  void timeGetPort_handler(FwIndexType portNum,
44  Fw::Time& time
45  ) override;
46 
48  void setEpoch_handler(FwIndexType portNum,
49  const Fw::Time& fw_time,
50  const Os::RawTime& os_time) override;
51 
52  Fw::Time m_epoch_fw_time;
53  Os::RawTime m_epoch_os_time;
54  bool m_epoch_valid;
55  Os::Mutex m_epoch_lock;
56 };
57 
58 } // namespace Svc
59 
60 #endif
~OsTime()
Destroy OsTime object.
Definition: OsTime.cpp:26
Definition: Time.hpp:9
void set_epoch(const Fw::Time &fw_time, const Os::RawTime &os_time)
Definition: OsTime.cpp:29
OsTime(const char *const compName)
Construct OsTime object.
Definition: OsTime.cpp:18
Auto-generated base for OsTime component.
PlatformIndexType FwIndexType
RateGroupDivider component implementation.