F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
TimeBaseEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title TimeBaseEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for TimeBase enum
5 // ======================================================================
6 
7 #ifndef TimeBaseEnumAc_HPP
8 #define TimeBaseEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Types/String.hpp"
13 
15 class TimeBase :
16  public Fw::Serializable
17 {
18 
19  public:
20 
21  // ----------------------------------------------------------------------
22  // Types
23  // ----------------------------------------------------------------------
24 
26  typedef U16 SerialType;
27 
29  enum T {
31  TB_NONE = 0,
37  TB_DONT_CARE = 65535,
38  };
39 
41  typedef T t;
42 
43  public:
44 
45  // ----------------------------------------------------------------------
46  // Constants
47  // ----------------------------------------------------------------------
48 
49  enum {
54  };
55 
56  public:
57 
58  // ----------------------------------------------------------------------
59  // Constructors
60  // ----------------------------------------------------------------------
61 
64  {
65  this->e = TB_NONE;
66  }
67 
70  const T e1
71  )
72  {
73  this->e = e1;
74  }
75 
78  const TimeBase& obj
79  )
80  {
81  this->e = obj.e;
82  }
83 
84  public:
85 
86  // ----------------------------------------------------------------------
87  // Operators
88  // ----------------------------------------------------------------------
89 
92  const TimeBase& obj
93  );
94 
97  T e1
98  );
99 
101  operator T() const
102  {
103  return this->e;
104  }
105 
107  bool operator==(T e1) const
108  {
109  return this->e == e1;
110  }
111 
113  bool operator!=(T e1) const
114  {
115  return !(*this == e1);
116  }
117 
118 #ifdef BUILD_UT
119 
121  friend std::ostream& operator<<(
122  std::ostream& os,
123  const TimeBase& obj
124  );
125 
126 #endif
127 
128  public:
129 
130  // ----------------------------------------------------------------------
131  // Member functions
132  // ----------------------------------------------------------------------
133 
135  bool isValid() const;
136 
139  Fw::SerializeBufferBase& buffer
140  ) const;
141 
144  Fw::SerializeBufferBase& buffer
145  );
146 
147 #if FW_SERIALIZABLE_TO_STRING
148 
150  void toString(
151  Fw::StringBase& sb
152  ) const;
153 
154 #endif
155 
156  public:
157 
158  // ----------------------------------------------------------------------
159  // Member variables
160  // ----------------------------------------------------------------------
161 
163  T e;
164 
165 };
166 
167 #endif
Fw::SerializeStatus serializeTo(Fw::SerializeBufferBase &buffer) const
Serialize raw enum value to SerialType.
Don&#39;t care value for sequences. If FwTimeBaseStoreType is changed, value should be changed (Required)...
T t
For backwards compatibility.
TimeBase(const T e1)
Constructor (user-provided value)
TimeBase(const TimeBase &obj)
Copy constructor.
No time base has been established (Required)
The size of the serial representation.
T
The raw enum type.
bool isValid() const
Check raw enum value for validity.
T e
The raw enum value.
SerializeStatus
forward declaration for string
Time as reported on workstation where software is running. For testing. (Required) ...
TimeBase()
Constructor (default value of TB_NONE)
Fw::SerializeStatus deserializeFrom(Fw::SerializeBufferBase &buffer)
Deserialize raw enum value from SerialType.
TimeBase & operator=(const TimeBase &obj)
Copy assignment operator (object)
bool operator==(T e1) const
Equality operator.
Indicates time is processor cycle time. Not tied to external time.
U16 SerialType
The serial representation type.
forward declaration
Define enumeration for Time base types.
The number of enumerated constants.
bool operator!=(T e1) const
Inequality operator.