F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
TimeIntervalValueSerializableAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title TimeIntervalValueSerializableAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for TimeIntervalValue struct
5 // ======================================================================
6 
7 #ifndef Fw_TimeIntervalValueSerializableAc_HPP
8 #define Fw_TimeIntervalValueSerializableAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
13 #include "Fw/Types/String.hpp"
14 
15 namespace Fw {
16 
19  public Fw::Serializable
20  {
21 
22  public:
23 
24  // ----------------------------------------------------------------------
25  // Constants
26  // ----------------------------------------------------------------------
27 
28  enum {
31  sizeof(U32) +
32  sizeof(U32)
33  };
34 
35  public:
36 
37  // ----------------------------------------------------------------------
38  // Constructors
39  // ----------------------------------------------------------------------
40 
43 
46  U32 seconds,
47  U32 useconds
48  );
49 
52  const TimeIntervalValue& obj
53  );
54 
55  public:
56 
57  // ----------------------------------------------------------------------
58  // Operators
59  // ----------------------------------------------------------------------
60 
63  const TimeIntervalValue& obj
64  );
65 
67  bool operator==(
68  const TimeIntervalValue& obj
69  ) const;
70 
72  bool operator!=(
73  const TimeIntervalValue& obj
74  ) const;
75 
76 #ifdef BUILD_UT
77 
79  friend std::ostream& operator<<(
80  std::ostream& os,
81  const TimeIntervalValue& obj
82  );
83 
84 #endif
85 
86  public:
87 
88  // ----------------------------------------------------------------------
89  // Member functions
90  // ----------------------------------------------------------------------
91 
95  ) const;
96 
100  );
101 
102 #if FW_SERIALIZABLE_TO_STRING
103 
105  void toString(
106  Fw::StringBase& sb
107  ) const;
108 
109 #endif
110 
111  // ----------------------------------------------------------------------
112  // Getter functions
113  // ----------------------------------------------------------------------
114 
116  U32 getseconds() const
117  {
118  return this->m_seconds;
119  }
120 
122  U32 getuseconds() const
123  {
124  return this->m_useconds;
125  }
126 
127  // ----------------------------------------------------------------------
128  // Setter functions
129  // ----------------------------------------------------------------------
130 
132  void set(
133  U32 seconds,
134  U32 useconds
135  );
136 
138  void setseconds(U32 seconds);
139 
141  void setuseconds(U32 useconds);
142 
143  protected:
144 
145  // ----------------------------------------------------------------------
146  // Member variables
147  // ----------------------------------------------------------------------
148 
151 
152  };
153 
154 }
155 
156 #endif
Data structure for Time Interval.
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialization.
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialization.
U32 getuseconds() const
Get member useconds.
TimeIntervalValue & operator=(const TimeIntervalValue &obj)
Copy assignment operator.
U32 getseconds() const
Get member seconds.
The size of the serial representation.
SerializeStatus
forward declaration for string
bool operator==(const TimeIntervalValue &obj) const
Equality operator.
void setseconds(U32 seconds)
Set member seconds.
TimeIntervalValue()
Constructor (default value)
void setuseconds(U32 useconds)
Set member useconds.
bool operator!=(const TimeIntervalValue &obj) const
Inequality operator.
forward declaration