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 
103  FwSizeType serializedSize() const;
104 
105 #if FW_SERIALIZABLE_TO_STRING
106 
108  void toString(
109  Fw::StringBase& sb
110  ) const;
111 
112 #endif
113 
114  // ----------------------------------------------------------------------
115  // Getter functions
116  // ----------------------------------------------------------------------
117 
119  U32 get_seconds() const
120  {
121  return this->m_seconds;
122  }
123 
125  U32 get_useconds() const
126  {
127  return this->m_useconds;
128  }
129 
130  // ----------------------------------------------------------------------
131  // Setter functions
132  // ----------------------------------------------------------------------
133 
135  void set(
136  U32 seconds,
137  U32 useconds
138  );
139 
141  void set_seconds(U32 seconds);
142 
144  void set_useconds(U32 useconds);
145 
146  protected:
147 
148  // ----------------------------------------------------------------------
149  // Member variables
150  // ----------------------------------------------------------------------
151 
154 
155  };
156 
157 }
158 
159 #endif
Data structure for Time Interval.
PlatformSizeType FwSizeType
Fw::SerializeStatus serializeTo(Fw::SerializeBufferBase &buffer) const
Serialization.
The size of the serial representation.
void set_useconds(U32 useconds)
Set member useconds.
TimeIntervalValue & operator=(const TimeIntervalValue &obj)
Copy assignment operator.
SerializeStatus
forward declaration for string
U32 get_seconds() const
Get member seconds.
bool operator==(const TimeIntervalValue &obj) const
Equality operator.
FwSizeType serializedSize() const
Get the dynamic serialized size of the struct.
void set_seconds(U32 seconds)
Set member seconds.
Fw::SerializeStatus deserializeFrom(Fw::SerializeBufferBase &buffer)
Deserialization.
TimeIntervalValue()
Constructor (default value)
bool operator!=(const TimeIntervalValue &obj) const
Inequality operator.
forward declaration
U32 get_useconds() const
Get member useconds.