F´ Flight Software - C/C++ Documentation  devel
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 "FpConfig.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 I32 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::SerializeBufferBase& buffer
168  ) const;
169 
172  Fw::SerializeBufferBase& buffer
173  );
174 
175 #if FW_SERIALIZABLE_TO_STRING
176 
178  void toString(
179  Fw::StringBase& sb
180  ) const;
181 
182 #endif
183 
184  public:
185 
186  // ----------------------------------------------------------------------
187  // Member variables
188  // ----------------------------------------------------------------------
189 
191  T e;
192 
193  };
194 
195 }
196 
197 #endif
C++-compatible configuration header for fprime configuration.
forward declaration
FPP shadow-enum representing Os::FileSystem::Status.
FileSystemStatus()
Constructor (default value of OP_OK)
I32 SerialType
The serial representation type.
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialize raw enum value to SerialType.
bool operator!=(T e1) const
Inequality operator.
bool isValid() const
Check raw enum value for validity.
T t
For backwards compatibility.
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialize raw enum value from SerialType.
@ IS_DIR
Path is a directory.
@ INVALID_PATH
Path is too long, too many sym links, etc.
@ BUFFER_TOO_SMALL
Buffer size is too small to hold full path (for getWorkingDirectory)
@ NOT_SUPPORTED
Operation is not supported by the current implementation.
@ NOT_DIR
Path is not a directory.
@ BUSY
Operand is in use by the system or by a process.
@ ALREADY_EXISTS
File already exists.
@ OTHER_ERROR
other OS-specific error
@ NO_MORE_FILES
Directory stream has no more files.
@ DOESNT_EXIST
Path doesn't exist.
@ OVERFLOW_ERROR
Operation failed due to overflow in calculation of the result.
@ EXDEV_ERROR
Operation not supported across devices (e.g. rename)
@ NOT_EMPTY
directory is not empty
@ OP_OK
Operation was successful.
@ NO_PERMISSION
No permission to write.
@ FILE_LIMIT
Too many files or links.
bool operator==(T e1) const
Equality operator.
@ NUM_CONSTANTS
The number of enumerated constants.
@ SERIALIZED_SIZE
The size of the serial representation.
FileSystemStatus(const FileSystemStatus &obj)
Copy constructor.
FileSystemStatus(const T e1)
Constructor (user-provided value)
FileSystemStatus & operator=(const FileSystemStatus &obj)
Copy assignment operator (object)
SerializeStatus
forward declaration for string