F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
File.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title Os/Stub/File.cpp
3 // \brief stub implementation for Os::File
4 // ======================================================================
5 #include "Os/Stub/File.hpp"
6 
7 namespace Os {
8 namespace Stub {
9 namespace File {
10 
11  StubFile::Status StubFile::open(const char *filepath, StubFile::Mode open_mode, OverwriteType overwrite) {
12  Status status = Status::NOT_SUPPORTED;
13  return status;
14  }
15 
16  void StubFile::close() {}
17 
19  Status status = Status::NOT_SUPPORTED;
20  return status;
21  }
22 
24  Status status = Status::NOT_SUPPORTED;
25  return status;
26  }
27 
29  Status status = Status::NOT_SUPPORTED;
30  return status;
31  }
32 
34  Status status = Status::NOT_SUPPORTED;
35  return status;
36  }
37 
39  Status status = Status::NOT_SUPPORTED;
40  return status;
41  }
42 
44  Status status = Status::NOT_SUPPORTED;
45  return status;
46  }
47 
49  Status status = Status::NOT_SUPPORTED;
50  return status;
51  }
52 
54  return &this->m_handle;
55  }
56 
57 } // namespace File
58 } // namespace Stub
59 } // namespace Os
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:26
PlatformSignedSizeType FwSignedSizeType
Definition: FpConfig.h:25
Status preallocate(FwSignedSizeType offset, FwSignedSizeType length) override
pre-allocate file storage
Definition: File.cpp:28
Status read(U8 *buffer, FwSignedSizeType &size, WaitType wait) override
read data from this file into supplied buffer bounded by size
Definition: File.cpp:43
Status size(FwSignedSizeType &size_result) override
get size of currently open file
Definition: File.cpp:18
void close() override
close the file, if not opened then do nothing
Definition: File.cpp:16
Os::FileInterface::Status open(const char *path, Mode mode, OverwriteType overwrite) override
open file with supplied path and mode
Definition: File.cpp:11
Status seek(FwSignedSizeType offset, SeekType seekType) override
seek the file pointer to the given offset
Definition: File.cpp:33
FileHandle * getHandle() override
returns the raw file handle
Definition: File.cpp:53
Status flush() override
flush file contents to storage
Definition: File.cpp:38
Status write(const U8 *buffer, FwSignedSizeType &size, WaitType wait) override
read data from this file into supplied buffer bounded by size
Definition: File.cpp:48
Status position(FwSignedSizeType &position_result) override
get file pointer position of the currently open file
Definition: File.cpp:23
base implementation of FileHandle
Definition: File.hpp:14