F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
LogBuffer.cpp
Go to the documentation of this file.
1 #include <Fw/Log/LogBuffer.hpp>
2 #include <Fw/Types/Assert.hpp>
3 
4 namespace Fw {
5 
8  FW_ASSERT(FW_SERIALIZE_OK == stat, static_cast<FwAssertArgType>(stat));
9  }
10 
12  }
13 
15  }
16 
18  SerializeStatus stat = SerializeBufferBase::setBuff(other.m_bufferData,other.getBuffLength());
19  FW_ASSERT(FW_SERIALIZE_OK == stat, static_cast<FwAssertArgType>(stat));
20  }
21 
23  if(this == &other) {
24  return *this;
25  }
26 
27  SerializeStatus stat = SerializeBufferBase::setBuff(other.m_bufferData,other.getBuffLength());
28  FW_ASSERT(FW_SERIALIZE_OK == stat, static_cast<FwAssertArgType>(stat));
29  return *this;
30  }
31 
33  return sizeof(this->m_bufferData);
34  }
35 
36  const U8* LogBuffer::getBuffAddr() const {
37  return this->m_bufferData;
38  }
39 
41  return this->m_bufferData;
42  }
43 
44 }
45 
#define FW_ASSERT(...)
Definition: Assert.hpp:14
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:30
PlatformUIntType NATIVE_UINT_TYPE
Definition: BasicTypes.h:56
PlatformAssertArgType FwAssertArgType
Definition: FpConfig.h:39
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
Serializable::SizeType getBuffLength() const
returns current buffer size
SerializeStatus setBuff(const U8 *src, Serializable::SizeType length)
sets buffer contents and size
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.