F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
LogBuffer.hpp
Go to the documentation of this file.
1 /*
2  * LogBuffer.hpp
3  *
4  * Created on: Sep 10, 2012
5  * Author: ppandian
6  */
7 
8 /*
9  * Description:
10  * This object contains the LogBuffer type, used for storing log entries
11  */
12 #ifndef FW_LOG_BUFFER_HPP
13 #define FW_LOG_BUFFER_HPP
14 
15 #include <Fw/FPrimeBasicTypes.hpp>
16 #include <Fw/Types/SerIds.hpp>
18 
19 namespace Fw {
20 
21 class LogBuffer final : public SerializeBufferBase {
22  public:
24 
25  LogBuffer(const U8* args, FwSizeType size);
26  LogBuffer();
27  LogBuffer(const LogBuffer& other);
28  virtual ~LogBuffer();
29  LogBuffer& operator=(const LogBuffer& other);
30 
31  DEPRECATED(FwSizeType getBuffCapacity() const, "Use getCapacity() instead");
32  FwSizeType getCapacity() const; // !< returns capacity, not current size, of buffer
33 
34  U8* getBuffAddr();
35  const U8* getBuffAddr() const;
36 
37  private:
38  U8 m_bufferData[FW_LOG_BUFFER_MAX_SIZE]; // command argument buffer
39 };
40 
41 } // namespace Fw
42 
43 #endif
U8 * getBuffAddr()
Get buffer address for data filling (non-const version)
Definition: LogBuffer.cpp:42
PlatformSizeType FwSizeType
virtual ~LogBuffer()
Definition: LogBuffer.cpp:13
FwSizeStoreType FwBuffSizeType
FwSizeType getCapacity() const
Get buffer capacity.
Definition: LogBuffer.cpp:30
Definitions for ISF type serial IDs.
LogBuffer & operator=(const LogBuffer &other)
Definition: LogBuffer.cpp:20
Log Buffer type id.
Definition: SerIds.hpp:49
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
DEPRECATED(FwSizeType getBuffCapacity() const, "Use getCapacity() instead")
Implementation of malloc based allocator.