F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FileSystemStatusEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FileSystemStatusEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for FileSystemStatus enum
5 // ======================================================================
6 
7 #ifndef Os_FileSystemStatusEnumAc_HPP
8 #define Os_FileSystemStatusEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Os {
15 
18  public Fw::Serializable
19  {
20 
21  public:
22 
23  // ----------------------------------------------------------------------
24  // Types
25  // ----------------------------------------------------------------------
26 
28  typedef U8 SerialType;
29 
31  enum T {
33  OP_OK = 0,
37  NO_SPACE = 2,
41  NOT_DIR = 4,
43  IS_DIR = 5,
45  NOT_EMPTY = 6,
53  BUSY = 10,
66  };
67 
69  typedef T t;
70 
71  public:
72 
73  // ----------------------------------------------------------------------
74  // Constants
75  // ----------------------------------------------------------------------
76 
77  enum {
82  };
83 
84  public:
85 
86  // ----------------------------------------------------------------------
87  // Constructors
88  // ----------------------------------------------------------------------
89 
92  {
93  this->e = OP_OK;
94  }
95 
98  const T e1
99  )
100  {
101  this->e = e1;
102  }
103 
106  const FileSystemStatus& obj
107  )
108  {
109  this->e = obj.e;
110  }
111 
112  public:
113 
114  // ----------------------------------------------------------------------
115  // Operators
116  // ----------------------------------------------------------------------
117 
120  const FileSystemStatus& obj
121  );
122 
125  T e1
126  );
127 
129  operator T() const
130  {
131  return this->e;
132  }
133 
135  bool operator==(T e1) const
136  {
137  return this->e == e1;
138  }
139 
141  bool operator!=(T e1) const
142  {
143  return !(*this == e1);
144  }
145 
146 #ifdef BUILD_UT
147 
149  friend std::ostream& operator<<(
150  std::ostream& os,
151  const FileSystemStatus& obj
152  );
153 
154 #endif
155 
156  public:
157 
158  // ----------------------------------------------------------------------
159  // Member functions
160  // ----------------------------------------------------------------------
161 
163  bool isValid() const;
164 
167  Fw::SerialBufferBase& buffer,
169  ) const;
170 
173  Fw::SerialBufferBase& buffer,
175  );
176 
177 #if FW_SERIALIZABLE_TO_STRING
178 
180  void toString(
181  Fw::StringBase& sb
182  ) const;
183 
184 #endif
185 
186  public:
187 
188  // ----------------------------------------------------------------------
189  // Member variables
190  // ----------------------------------------------------------------------
191 
193  T e;
194 
195  };
196 
197 }
198 
199 #endif
Buffer size is too small to hold full path (for getWorkingDirectory)
FileSystemStatus & operator=(const FileSystemStatus &obj)
Copy assignment operator (object)
bool operator!=(T e1) const
Inequality operator.
Path is too long, too many sym links, etc.
FPP shadow-enum representing Os::FileSystem::Status.
Directory stream has no more files.
Operation was successful.
The size of the serial representation.
FileSystemStatus()
Constructor (default value of OP_OK)
FileSystemStatus(const FileSystemStatus &obj)
Copy constructor.
Operation is not supported by the current implementation.
SerializeStatus
forward declaration for string
The number of enumerated constants.
Operation failed due to overflow in calculation of the result.
bool isValid() const
Check raw enum value for validity.
Operand is in use by the system or by a process.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
T t
For backwards compatibility.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
FileSystemStatus(const T e1)
Constructor (user-provided value)
Endianness
Operation not supported across devices (e.g. rename)
U8 SerialType
The serial representation type.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
bool operator==(T e1) const
Equality operator.
Big endian serialization.