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 
94  Fw::SerialBufferBase& buffer,
96  ) const;
97 
100  Fw::SerialBufferBase& buffer,
102  );
103 
105  FwSizeType serializedSize() const;
106 
107 #if FW_SERIALIZABLE_TO_STRING
108 
110  void toString(
111  Fw::StringBase& sb
112  ) const;
113 
114 #endif
115 
116  // ----------------------------------------------------------------------
117  // Getter functions
118  // ----------------------------------------------------------------------
119 
121  U32 get_seconds() const
122  {
123  return this->m_seconds;
124  }
125 
127  U32 get_useconds() const
128  {
129  return this->m_useconds;
130  }
131 
132  // ----------------------------------------------------------------------
133  // Setter functions
134  // ----------------------------------------------------------------------
135 
137  void set(
138  U32 seconds,
139  U32 useconds
140  );
141 
143  void set_seconds(U32 seconds);
144 
146  void set_useconds(U32 useconds);
147 
148  protected:
149 
150  // ----------------------------------------------------------------------
151  // Member variables
152  // ----------------------------------------------------------------------
153 
156 
157  };
158 
159 }
160 
161 #endif
Data structure for Time Interval.
PlatformSizeType FwSizeType
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.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialization.
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.
TimeIntervalValue()
Constructor (default value)
The size of the serial representation.
bool operator!=(const TimeIntervalValue &obj) const
Inequality operator.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialization.
U32 get_useconds() const
Get member useconds.
Implementation of malloc based allocator.
Endianness
Big endian serialization.