F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
Memory.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title Os/Stub/Memory.hpp
3 // \brief stub implementation for Os::Memory, header and test definitions
4 // ======================================================================
5 #include <cstdio>
6 #include <Os/Memory.hpp>
7 #ifndef OS_Stub_Memory_HPP
8 #define OS_Stub_Memory_HPP
9 
10 namespace Os {
11 namespace Stub {
12 namespace Memory {
13 
16 struct StubMemoryHandle : public MemoryHandle {
17 };
18 
23 class StubMemory : public MemoryInterface {
24  public:
27  StubMemory() = default;
28 
30  StubMemory(const StubMemory& other) = delete;
31 
33  MemoryInterface& operator=(const MemoryInterface& other) override = delete;
34 
37  ~StubMemory() override = default;
38 
39  // ------------------------------------
40  // Functions overrides
41  // ------------------------------------
42 
49  Status _getUsage(Usage& memory_usage) override;
50 
58  MemoryHandle *getHandle() override;
59  private:
61  StubMemoryHandle m_handle;
62 };
63 } // namespace Memory
64 } // namespace Stub
65 } // namespace Os
66 
67 #endif // OS_Stub_Memory_HPP
Memory variable handle parent.
Definition: Memory.hpp:13
interface for memory implementation
Definition: Memory.hpp:16
stub implementation of Os::MemoryInterface
Definition: Memory.hpp:23
MemoryInterface & operator=(const MemoryInterface &other) override=delete
default copy assignment
StubMemory()=default
constructor
~StubMemory() override=default
destructor
StubMemory(const StubMemory &other)=delete
copy constructor
MemoryHandle * getHandle() override
returns the raw console handle
Definition: Memory.cpp:18
Status _getUsage(Usage &memory_usage) override
get system memory usage
Definition: Memory.cpp:11
Status
Generic OK/ERROR status.
Definition: Os.hpp:25
Generic used/total struct.
Definition: Os.hpp:31