F´ Flight Software - C/C++ Documentation  NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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>
16 #include <Fw/Types/BasicTypes.hpp>
17 #include <Fw/Types/Serializable.hpp>
18 #include <Fw/Cfg/SerIds.hpp>
19 
20 namespace Fw {
21 
22  class LogBuffer : public SerializeBufferBase {
23  public:
24 
25  enum {
28  };
29 
30  LogBuffer(const U8 *args, NATIVE_UINT_TYPE size);
31  LogBuffer();
32  LogBuffer(const LogBuffer& other);
33  virtual ~LogBuffer();
34  LogBuffer& operator=(const LogBuffer& other);
35 
36  NATIVE_UINT_TYPE getBuffCapacity() const; // !< returns capacity, not current size, of buffer
37  U8* getBuffAddr();
38  const U8* getBuffAddr() const;
39 
40  private:
41  U8 m_bufferData[FW_LOG_BUFFER_MAX_SIZE]; // command argument buffer
42  };
43 
44 }
45 
46 #endif
Fw::LogBuffer::LogBuffer
LogBuffer()
Definition: LogBuffer.cpp:11
Fw::SerializeBufferBase
Definition: Serializable.hpp:43
Fw::LogBuffer::getBuffAddr
U8 * getBuffAddr()
gets buffer address for data filling
Definition: LogBuffer.cpp:36
U8
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.hpp:73
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition: BasicTypes.hpp:28
Fw::LogBuffer
Definition: LogBuffer.hpp:22
FwBuffSizeType
#define FwBuffSizeType
Type representation for storing a buffer or string size.
Definition: FpConfig.hpp:79
Fw::LogBuffer::SERIALIZED_SIZE
@ SERIALIZED_SIZE
Definition: LogBuffer.hpp:27
FW_LOG_BUFFER_MAX_SIZE
#define FW_LOG_BUFFER_MAX_SIZE
Definition: FpConfig.hpp:238
Fw::LogBuffer::~LogBuffer
virtual ~LogBuffer()
Definition: LogBuffer.cpp:14
Fw::LogBuffer::getBuffCapacity
NATIVE_UINT_TYPE getBuffCapacity() const
returns capacity, not current size, of buffer
Definition: LogBuffer.cpp:32
Fw::FW_TYPEID_LOG_BUFF
@ FW_TYPEID_LOG_BUFF
Log Buffer type id.
Definition: SerIds.hpp:49
Fw::LogBuffer::SERIALIZED_TYPE_ID
@ SERIALIZED_TYPE_ID
Definition: LogBuffer.hpp:26
Fw::LogBuffer::operator=
LogBuffer & operator=(const LogBuffer &other)
Definition: LogBuffer.cpp:22
Fw
Definition: SerIds.hpp:20