F´ Flight Software - C/C++ Documentation  devel
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 <FpConfig.hpp>
17 #include <Fw/Cfg/SerIds.hpp>
18 
19 namespace Fw {
20 
21  class LogBuffer : public SerializeBufferBase {
22  public:
23 
24  enum {
27  };
28 
29  LogBuffer(const U8 *args, NATIVE_UINT_TYPE size);
30  LogBuffer();
31  LogBuffer(const LogBuffer& other);
32  virtual ~LogBuffer();
33  LogBuffer& operator=(const LogBuffer& other);
34 
35  NATIVE_UINT_TYPE getBuffCapacity() const; // !< returns capacity, not current size, of buffer
36  U8* getBuffAddr();
37  const U8* getBuffAddr() const;
38 
39  private:
40  U8 m_bufferData[FW_LOG_BUFFER_MAX_SIZE]; // command argument buffer
41  };
42 
43 }
44 
45 #endif
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:26
PlatformUIntType NATIVE_UINT_TYPE
Definition: BasicTypes.h:52
#define FW_LOG_BUFFER_MAX_SIZE
Definition: FpConfig.h:294
FwSizeStoreType FwBuffSizeType
Definition: FpConfig.h:389
C++-compatible configuration header for fprime configuration.
Definitions for ISF type serial IDs.
NATIVE_UINT_TYPE getBuffCapacity() const
returns capacity, not current size, of buffer
Definition: LogBuffer.cpp:32
virtual ~LogBuffer()
Definition: LogBuffer.cpp:14
LogBuffer & operator=(const LogBuffer &other)
Definition: LogBuffer.cpp:22
U8 * getBuffAddr()
gets buffer address for data filling
Definition: LogBuffer.cpp:40
@ FW_TYPEID_LOG_BUFF
Log Buffer type id.
Definition: SerIds.hpp:49